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

Address dotnet nuget push asking for unnecessary parameter #4326

Merged
merged 1 commit into from
Nov 8, 2021

Conversation

erdembayar
Copy link
Contributor

@erdembayar erdembayar commented Oct 28, 2021

Bug

Fixes: NuGet/Home#4864

Regression? Last working version: n/a

Description

Currently --no-symbols or --disable-buffering options are asking for unnecessary values not actually used, so removing them to match with doc.

Previously : dotnet nuget push *.nupkg --api-key xxxxx --no-symbol 111111
Now: dotnet nuget push *.nupkg --api-key xxxxx --no-symbol

Debug> dotnet nuget push *.nupkg  -s https://xxxxx/v3/index.json --api-key xxxxxxxx -n
Pushing 4864.1.3.0.nupkg to 'https://xxxxx/package'...
  PUT https://xxxxxx/package/
warn : All published packages should have license information specified. Learn more: https://aka.ms/deprecateLicenseUrl.
  Created https://xxxxxxxx/package/ 6889ms
Your package was pushed.

Previously: dotnet nuget push **.nupkg -k ******* --disable-buffering 1111111
Now: dotnet nuget push **.nupkg -k ******* --disable-buffering

dotnet nuget push *.nupkg  -s https://xxxx/index.json --api-key xxxxxxxxxx --disable-buffering
Pushing 4864.1.5.0.nupkg to 'https://xxxxxx/package'...
  PUT https://xxxxxxxxx/package/
warn : All published packages should have license information specified. Learn more: https://aka.ms/deprecateLicenseUrl.
  Created https://xxx/ 4851ms
Your package was pushed.
Pushing 4864.1.5.0.snupkg to 'xxxxx'...
  PUT https://xxxxxxx/symbolpackage/
  Created https://xxxxxx/symbolpackage/ 851ms
Your package was pushed.

Currently I didn't add any test because dotnet nuget push to server tests are disabled(#1267) long time ago. Also dotnet nuget push behaves quite different between local folder vs baGet vs server nuget.org, so I can't simply add push to local folder test here.

For example if we push from location with both nupkg and snupkg using dotnet nuget push *.nupkg:

  • to local folder: Only .nupkg is uploaded, always ignore .snupkg.
  • to baGet: Only one is uploaded, other one is not uploaded due to 409 conflict.
  • to nuget server: Both of them uploaded.

For sake of completeness push command with above options still working as expected, it'll push both .nupkg and .snupkg files to server.

Debug [master ≡]> dotnet nuget push *.nupkg  -s https://xxxxxx/index.json --api-key xxxxxxxxxx
Pushing 4864.1.4.0.nupkg to 'https://xxxxxxx/package'...
  PUT https://xxxxxxxx/
warn : All published packages should have license information specified. Learn more: https://aka.ms/deprecateLicenseUrl.
  Created https://xxxxxxxx/ 3582ms
Your package was pushed.
Pushing 4864.1.4.0.snupkg to 'https://xxxxxxx/symbolpackage'...
  PUT https://xxxxxxxxxx/
  Created https://xxxxxxx/symbolpackage/ 5135ms
Your package was pushed.

PR Checklist

  • PR has a meaningful title

  • PR has a linked issue.

  • Described changes

  • Tests

    • Automated tests added
    • OR
    • Test exception: Manually test with patched sdk, dotnet push to server is disabled for long time ago.
    • OR
    • N/A
  • Documentation

    • Documentation PR or issue filled
    • OR
    • N/A

@erdembayar erdembayar marked this pull request as ready for review November 1, 2021 16:06
@erdembayar erdembayar requested a review from a team as a code owner November 1, 2021 16:06
Copy link
Contributor

@donnie-msft donnie-msft left a comment

Choose a reason for hiding this comment

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

If I recall, the reason I didn't make this change when I first looked at the issue is concerns over breaking changes.
Everyone who had to specify --disable-buffering 1 will now get syntax errors, right?

@erdembayar
Copy link
Contributor Author

If I recall, the reason I didn't make this change when I first looked at the issue is concerns over breaking changes. Everyone who had to specify --disable-buffering 1 will now get syntax errors, right?

Yes, we need to mention it's breaking change.

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.

dotnet nuget push - Missing value for option
5 participants