Files
floci/src/main/java/io
Priamo Germosen 300e62a0ed feat(codeartifact): retain NuGet packages from a public external connection (#7104)
NuGet's native v3/package route can now retain a missing package version
from a repository's own public:nuget-org external connection and serve
it, instead of always 404ing, matching AWS's documented external-
connection behavior already shipped for Maven.

- A version's retention origin is claimed atomically before any fetch
  happens, rejecting a later attempt under a different connection
  outright ("checking asset origins").
- Package-level upstream: BLOCK is respected, including when the
  restriction and the request spell the package name differently
  (nuget/pypi names are case/punctuation normalized everywhere this
  service tracks a package; PackageOriginConfig now keys by that same
  normalization too, instead of the caller's raw spelling).
- A retained version reports originType: EXTERNAL and its source
  connection through DescribePackageVersion/ListPackageVersions, for
  any format that retains (not just Maven).
- A concurrent retention attempt racing a real client's own direct
  push is never mislabeled as an external import: existence in the
  real sidecar alone no longer implies success, only a confirmed claim
  under the exact same connection does.
- Retained bytes are counted toward DescribeDomain's assetSizeBytes,
  never double-counted on a concurrent retry.
- A real HTTP redirect from the public repository is followed instead
  of being treated as a 404.
- Fixed-version retention only; resolving a floating/omitted version by
  merging in nuget.org's own version listing is left for a follow-up,
  the same baseline scope Maven's own external-connection work shipped
  first.

New: NuGetExternalConnectionClient (the outbound client for
public:nuget-org) and CodeArtifactNuGetExternalConnectionImporter (the
retention decision logic), wired into CodeArtifactNuGetController.

The claim/fence/deploy machinery CodeArtifactService already used for
Maven's own external-connection retention is generalized into
format-parameterized methods so npm and pypi can reuse it too, with
Maven's own public methods kept as thin, behavior-identical delegates
over the generic ones.
2026-10-31 16:16:06 -05:00
..