Repository navigation
Add package staging protocol - #7703
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Critical build-analysis and query-string routing findings remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds NuGet.Protocol support for discovering PackageStaging/1.0.0 endpoints and uploading package and symbol files.
Changes:
- Adds staging service discovery, provider registration, and public API entries.
- Implements authenticated multipart package and symbol uploads.
- Adds provider, upload, service type, and repository tests.
File summaries
| File | Summary |
|---|---|
test/NuGet.Core.Tests/NuGet.Protocol.Tests/ServiceTypesTests.cs |
Tests the staging service type. |
test/NuGet.Core.Tests/NuGet.Protocol.Tests/Resources/PackageStagingResourceV3Tests.cs |
Tests uploads and HTTP security behavior. |
test/NuGet.Core.Tests/NuGet.Protocol.Tests/RepositoryTests.cs |
Updates provider count coverage. |
test/NuGet.Core.Tests/NuGet.Protocol.Tests/Providers/PackageStagingResourceV3ProviderTests.cs |
Tests staging endpoint discovery. |
src/NuGet.Core/NuGet.Protocol/SourceRepository.cs |
Updates provider cache capacity. |
src/NuGet.Core/NuGet.Protocol/ServiceTypes.cs |
Defines the staging service type. |
src/NuGet.Core/NuGet.Protocol/Resources/PackageStagingResourceV3.cs |
Implements uploads; unresolved routing, CA2000, and diagnostic-format findings remain. |
src/NuGet.Core/NuGet.Protocol/Repository.cs |
Registers the staging provider. |
src/NuGet.Core/NuGet.Protocol/PublicAPI/net472/PublicAPI.Unshipped.txt |
Tracks new public APIs. |
src/NuGet.Core/NuGet.Protocol/PublicAPI/net10.0/PublicAPI.Unshipped.txt |
Tracks new public APIs. |
src/NuGet.Core/NuGet.Protocol/Providers/PackageStagingResourceV3Provider.cs |
Discovers resources; unresolved CA1062 handling remains. |
Review details
Suppressed comments (1)
src/NuGet.Core/NuGet.Protocol/Resources/PackageStagingResourceV3.cs:121
Error_Insecure_HTTPdocuments its first placeholder as the package source URL, but passingPackageSourcehere invokesPackageSource.ToString()and rendersName [Source]. This makes the new diagnostic inconsistent with the existing HTTP checks; pass the source URL (_httpSource.PackageSource.Source) instead.
_httpSource.PackageSource,
- Files reviewed: 11/11 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
donnie-msft
reviewed
Sep 15, 2026
2 of 3 tasks
jeffkl
approved these changes
Sep 15, 2026
donnie-msft
approved these changes
Sep 15, 2026
nkolev92
reviewed
Sep 15, 2026
| string? apiKey, | ||
| string? groupId, | ||
| TimeSpan requestTimeout, | ||
| bool allowInsecureConnections, |
Member
There was a problem hiding this comment.
There's 2 push symbols methods, can we just have 1?
We should favor simpler APIs until proven absolutely necessary to need mroe.
Member
Author
There was a problem hiding this comment.
I will remove one of the overloads.
This was referenced Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Fixes: NuGet/Home#15084
First PR for : NuGet/Home#15015
Description
design spec: NuGet/Home#15048
It adds the
NuGet.ProtocolAPIs required to publish packages to a staging service:PackageStaging/1.0.0endpoint from the V3 service index.PushPackageAsyncfor uploading a package to the staging service'spackageroute.PushSymbolsAsyncfor uploading a symbol package to the staging service'ssymbolsroute.These APIs are the protocol layer that a follow-up PR will use to implement the
dotnet nuget stage pushcommand. This PR does not add the command-line experience itself.PR Checklist