-
Notifications
You must be signed in to change notification settings - Fork 252
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
When nupkg exists on push --skip-duplicate, don't automatically push snupkg #9647
Comments
Which version of dotnet are you using? |
Hi there! I’m using dotnet nuget push on .net core 3.1.300 on Linux. |
Isn't this The client works as designed, it's the server that's defined a contract for snupkgs different from nupkgs. |
It's not very functional from a build-script point of view.
However since symbol packages are accepted all packages that was skipped goes into this state when logged into It's not visible for the person consuming the packages, but it's not optimal. Best regards |
The documented behavior of If you disagree with the nuget.org implementation, please contribute to an issue I opened here: NuGet/NuGetGallery#7681 |
I buy that, I just want the conversation to reach the right audience (which is why I mentioned the issue on NuGetGallery side. There were good reasons for that behavior.). On a different note, different builds, from different sources, should not create the same version of a package. So ensure you are not doing something like that. Deterministic builds are enabled by default on newer versions of the compiler, so ideally it should generate the same dlls and pdbs, so nuget.org maybe wouldn't complain? That's beyond my expertise though. |
@donnie-msft I'm trying to understand what I've misunderstood here 😀 I was certain the @nkolev92 Yes we use deterministic builds, but they point to a certain commit (if I'm not mistaken). Since we have 1 repository, containing projects that will eventually result in 22 different NuGet-packages, and the fact that we might release a hot fix for package x, but not y, this means the entire repository with all packages will be build but only some packages will be updated. However the commit the packages are built from will not be the same for any of the packages. |
No, this option is about ignoring responses from a server. Here's the test I wrote which illustrates the nupkg/snupkg behavior being discussed. |
@donnie-msft Just by looking at your comment in the code:
I can see that I can most likely get the behavior I expect just by removing the As a user I must say the naming of the switch is rather confusing, it would've been clearer if it would've been called I'll make sure I update my action workflow and hopefully it will work as expected on next build. Thanks a lot! |
@tidyui That makes sense. @donnie-msft , @nkolev92 - Would we be willing to accept a PR to change the flag? :) |
To The concept of duplicate is owned by the server rather than the client. It's the server that's supposed to ensure that duplicate aren't allowed and reply with with a documented protocol response to indicate that there's been a clash. Prior to the The As such, I'm not sure Personally, I think it might be a good idea to look into improving the description of the option if at all possible. |
@anangaur can you comment on this? You and I worked on this feature's naming. I recall this being the result of a Twitter poll... |
One final question as I'm not still 100% sure what the option does. If I'm uploading over 20 packages with:
By omitting Regards |
So I just tried and when run in a build script, omitting / Regards |
@donnie-msft No I don’t want to use —no-symbols, I want to:
What I don’t want is to push new symbol packages for the ones that got a 409. Regards |
That's not quite possible without some extra work. Refer to the issue @donnie-msft linked: NuGet/NuGetGallery#7681. The NuGetGallery issue would attract the right audience. |
Reopening this under the context that it's acceptable to break our existing behavior of automatically pushing snupkgs when |
Another comment in support of this change...
Originally posted by @Aarklendoia in #8148 (comment) |
Another comment in support of this change #11013 |
I also favor a change here. It's very common for me (multiple repositories) to push several packages with symbols. Now one package may fail, or even Had the issue last month with Orchard (200 packages, now half of them have wrong symbols) and this morning with another set of package where one package was wrong, so publishing it with the same script broke all other symbols. Only solution is to do a full new set of packages, and hope that all go well in a single step. At least, if |
When uploading packages with
--skip-duplicate
duplicatenupkg
packages are skipped, but symbol packages are uploaded again.You can take a look at this script from GitHub Actions which causes this behavior.
https://github.com/PiranhaCMS/piranha.core/blob/master/.github/workflows/publish_to_nuget.yml
Best regards
The text was updated successfully, but these errors were encountered: