Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PackageUpdateResource to receive bool to indicate if snupkg are enabled #6249

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

jgonz120
Copy link
Contributor

@jgonz120 jgonz120 commented Jan 31, 2025

Bug

Fixes: NuGet/Home#11871

Description

SymbolPackageUpdateResource is currently only being used in PackageUpdateResource to determine if snupkg are enabled for symbol sources. Since the push command allows users to specify a SymbolSource, there may not be a SymbolPackageUpdateResource available. This created a new function which takes in "allowSnupkg" as a parameter instead of trying to determine if it's available based on whether or not SymbolPackageUpdateResource is null.

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

@jgonz120 jgonz120 requested a review from a team as a code owner January 31, 2025 23:06
@jgonz120 jgonz120 marked this pull request as draft February 1, 2025 00:12
@jgonz120 jgonz120 changed the title Set symbolPackageUpdateResource when symbolSource is passed by param to nuget push Update PackageUpdateResource to receive bool to indicate if snupkg are enabled Feb 1, 2025
@jgonz120 jgonz120 marked this pull request as ready for review February 5, 2025 18:57
Copy link
Member

@nkolev92 nkolev92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but we need tests.

I see you've crossed off the added tests part but there's no justification for missing tests.

https://github.com/NuGet/NuGet.Client/blob/dev/test/NuGet.Clients.FuncTests/NuGet.CommandLine.FuncTest/Commands/PushCommandTest.cs has some tests.

Ideally, we can consider adding these tests to dotnet nuget push instead.

The setup code should be very similar.

@jebriede jebriede marked this pull request as draft February 18, 2025 23:10
@jgonz120 jgonz120 marked this pull request as ready for review February 24, 2025 22:27
@jgonz120 jgonz120 force-pushed the dev-jgonz120-allowSnupkgWhenSymbolUrlSpecified branch from 445655c to 4f0fcc2 Compare February 24, 2025 22:29
Copy link
Member

@nkolev92 nkolev92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had left some comments, but didn't click submit :D

@jgonz120 jgonz120 requested a review from nkolev92 February 26, 2025 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: dotnet nuget push symbols not working as expected
2 participants