sentry-dotnet icon indicating copy to clipboard operation
sentry-dotnet copied to clipboard

Verify in CI that required packages are being prepared/published

Open bruno-garcia opened this issue 2 years ago • 3 comments

Problem

The change from fixed slfn to generating the list: https://github.com/getsentry/sentry-dotnet/pull/2576/files#diff-46881cdd7821ad7176579363f56637c65f5f5fb0bf7e7ef39e7d6bd8b5e803a6 resulted in missing Sentry.AspNet which stayed on 3.36.0 while the rest went on to 3.39.0 (not sure what happened to 37 and 38).

This is easy to break since we have no checks and guards. I found this by accident while browsing Sentry's NuGet packages and noticing the different logos: (we changed logos between 36 and 39.

image

Suggestion

We mark projects as IsPackable:true to generate nuget packages but besides that, now we need to build the right sln/slnf. Due to this complexity such mistakes can happen.

Regardless of these .NET specific things, we release to NuGet with craft. And we must mark what gets published on the craft config file:

https://github.com/getsentry/sentry-dotnet/blob/9d52929356ef8285ba188aea81809902b587f4fd/.craft.yml#L8-L19

Craft won't complain if something is missing but we know that we want to pack and publish everything we have listed there, everytime. And if we're packing something that isnt' getting published, we probably don't want to pack either so we could also break the build there (optional) to alert there's some useless packing happening.

bruno-garcia avatar Sep 12 '23 02:09 bruno-garcia

There are packages that we publish that aren't in craft.yml, because we don't maintain documentation for these. In particular, the bindings packages... so there's no easy way to validate packages that we should be publishing vs those we are using craft.yml as the source of truth.

Any other ideas for how we might do this or should we close this issue?

jamescrosswell avatar Sep 18 '23 05:09 jamescrosswell

Craft won't complain if something is missing

IMO that is what should be changed - if we have configured craft to publish something, it should publish it, not fail silently.

There are packages that we publish that aren't in craft.yml

How are these published then? And what is the gap to get them published by craft?

vaind avatar Nov 22 '23 12:11 vaind

@vaind craft runs the nuget target which is dotnet nuget upload command on the folder with all nupkg files So it uploads anything we publish from CI.

The craft list of packages under release-registry is only about pushing a file with configs to: https://github.com/getsentry/sentry-release-registry

Good I'm writing here because I forget about this and it's definitely something that got me before

bruno-garcia avatar Nov 22 '23 21:11 bruno-garcia