dotnet / maintenance-packages

Repository that hosts packages from the .NET platform whose original home/branch is not building any longer.
MIT License
14 stars 9 forks source link

Ship dotnet-maintenance-packages #16

Open ericstj opened 11 months ago

ericstj commented 11 months ago

cc @ViktorHofer @carlossanlop

carlossanlop commented 10 months ago

Update the SDK / tools / arcade - 8.0

I assume we want to update to 8.0 because this repo is merely for servicing, so we want the latest released version of arcade, not the one currently in development. Correct?

In that case, I updated this repo's darc subscription to arcade to point to the .NET 8 Eng channel (it was pointing to 7).

Here's the deps flow PR, it was already open, but triggering the subscription updated the same PR: https://github.com/dotnet/maintenance-packages/pull/17

ericstj commented 9 months ago

I assume we want to update to 8.0 because this repo is merely for servicing

That was my assumption as well. I was also expecting us to want to ship from this repo before 9.0 releases.

@ViktorHofer can you let us know what features we might need out of 9.0 here? Could those be backported to 8.0 arcade to avoid a dependency on non-stable tools?

ViktorHofer commented 9 months ago

@ViktorHofer can you let us know what features we might need out of 9.0 here? Could those be backported to 8.0 arcade to avoid a dependency on non-stable tools?

None. 8.0 and 9.0 versions of the Arcade.Sdk are nearly identical aside from version updates.

ViktorHofer commented 9 months ago

Refine Assembly versioning pattern

@ericstj I'm unsure what this item tracks, can you please elaborate? @carlossanlop and I met few weeks ago, discussed the versioning infrastructure and agreed on that what we now have in main makes sense and just needs documentation.

ericstj commented 9 months ago

One thing I noticed is that it needs to handle cases with pinned assembly versions and non-pinned in the same package. For example for packages like System.Buffers and System.Memory we'd need to freeze the netstandard & netcore assembly versions while rev'ing the netframework one. I think it needs more discussion to understand all the details of how it works. Ideally I want to make sure we keep it simple without developers having to maintain complexity in their projects. It's possible that the current scheme can achieve this, but we need to work that out. I said "refine" here to indicate that what we have is fine we just need to walk through all the cases it needs to handle (package types and servicing operations) and describe how those work and make any changes we see necessary.

My assumptions based on what I'm seeing right now (this is not complete, but this is the sort of docs I'm expecting that might reveal what refinement we need).

Initial porting:

  1. PackageVersion should initially be one minor version higher than the last shipped package version.
  2. AssemblyVersion should be initially set as follows:
  3. PackageValidationBaselineVersion should be set to the last shipped package version.

Every release time:

  1. Developers set IsPackable on a project when they wish for that project to ship in a given release.
  2. A branding operation done by the repo owner is responsible for incrementing AssemblyVersion, PackageVersion, PackageValidationBaselineVersion after a release when a package set's IsPackable.
    • NOTE: any frozen AssemblyVersions should not be incremented, we should distinguish these in some way.
ViktorHofer commented 9 months ago

Yes that exactly describes what we currently do in main. I just had another meeting with @carlossanlop and he will document the steps.

Our plan is to do the first few version updates ourselves and then automate that process via the Azure SDK bot.

ericstj commented 9 months ago

Something I couldn't quite see working here is how the AssemblyVersion exclusions will work - how do we keep those separate and make sure the branding operations won't touch them?

ViktorHofer commented 9 months ago

I would just move the fixed assembly version somewhere else so that whoever increments the versions (i.e. a bot) doesn't touch it. And I recommend to add a code comment to highlight that the assembly version is frozen because of X.

Alternatively we could keep the line where it is and just add an inline (in the same line) xml comment to make the bot ignore the line but at the same time explain that this is frozen, i.e.

<AssemblyVersion>4.0.3.0</AssemblyVersion> <!-- NO-INCREMENT: This version is frozen for .NET Standard and .NETCoreApp because the assembly ships inbox. -->

The Azure SDK bot might already have such a capability but if not, adding that should be easy: !line.Contains("NO-INCREMENT").

carlossanlop commented 9 months ago

Refine Assembly versioning pattern, document the process, and trial it (readiness)

@ericstj is it possible to try the servicing process without accidentally pushing the nuget package?

ViktorHofer commented 9 months ago

Yeah you can change the default channel to General Testing so that a package gets pushed to the general testing nuget feed only.

ericstj commented 9 months ago

We should also make sure that these stable builds don't directly publish to shared feeds. Normally our stable servicing builds of repos like dotnet/runtime will push their stable packages to a temporary feed. (perhaps separately) We should make sure this repo is set up to do that.

Additionally we might think about if it makes sense to have this repo produce "pre-release" servicing packages so that it's easier to test nightly builds. Then we flip the switch at some point to make it stable.

carlossanlop commented 9 months ago

Define branch scheme for releases, create internal branch

Done. I created a branch named internal/main and made sure it got registered in dotnet/versions so it gets all changes introduced to main mirrored into it (internal-code-merge pipeline).

The internal main branch already existed and it was already working well with the regular code-mirror pipeline.

ViktorHofer commented 6 months ago

Determine how new builds of packages that ship from this repo flow into the rest of the product - eg: Microsoft.Windows.Compatibility, netstandard2.0 and netframework builds from in-support branches.

Just my take on this, I don't think repositories should connect to maintenance-packages via dependency flow. I would rather have them use dependabot to update packages when a new version's out on nuget.org.

ericstj commented 6 months ago

Determine how new builds of packages that ship from this repo flow into the rest of the product - eg: Microsoft.Windows.Compatibility, netstandard2.0 and netframework builds from in-support branches.

Just my take on this, I don't think repositories should connect to maintenance-packages via dependency flow. I would rather have them use dependabot to update packages when a new version's out on nuget.org.

NuGet.org might be too late in the case of servicing events that we wish to sim-ship - suppose a critical fix to System.Memory that needs be referenced by many products. Still I don't think dependency flow is the answer because that's used for product releases.