ci(publish): seed the DAR local feed from the release's own packages - #43
Merged
Merged
Conversation
The DAR legs generate csprojs that reference Daml.Runtime and Daml.Ledger.Abstractions at the version this same release pushed moments earlier, then resolve them from nuget.org. nuget.org accepts a package immediately but does not serve it to restore until indexing completes, so the legs race an external queue: the packages are already downloadable while restore still reports the previous version as the newest available. Losing that race fails every pack, including leaf packages with no sibling dependencies -- 41 of them on the last tag, with the unauthenticated github source turning the lookup miss into a hard NU1301. The local feed already sits ahead of nuget.org in the generated NuGet.config and already carries sibling DAR packages, so seed it with the core nupkgs attached to the release being built. Restores then resolve the exact bits that were published rather than whatever nuget.org happens to be serving, and the indexing delay stops mattering. Seeding is best-effort: a run whose release has no attached packages warns and behaves exactly as it does today.
Contributor
Contributor
C# coverage
|
Contributor
Scala build matrix
|
Contributor
C# build matrix
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unblocks the
0.5.0-preview.1release, and removes the cause of the same failure on the previous one.The race
The DAR legs generate csprojs that reference
Daml.RuntimeandDaml.Ledger.Abstractionsat the version this same workflow run pushed moments earlier, then resolve them from nuget.org.nuget.org accepts a package immediately but does not serve it to restore until indexing completes. Right now, for
0.5.0-preview.1:The package is downloadable and a real
dotnet restorestill fails:So the legs race an external queue whose latency is not ours to control.
Why losing it is fatal rather than slow
Every pack fails — including leaf packages with no sibling dependencies. On the
0.5.0-preview.1tag that was all 33 Splice plus all 8 Daml.Finance packages, with 280 ×NU1301and zeroNU1102:When nuget.org cannot answer, NuGet falls through to the
githubsource, whose 401 is a hard error rather than a warning. On the previous release the same 401 appeared only as a warning, because resolution had already succeeded elsewhere.The fix
local-feedalready sits ahead of nuget.org in the generatedNuGet.config(build-pack.sh:79-82) and already carries sibling DAR packages (build-pack.sh:112). It is simply never seeded with the core packages.This seeds it from the nupkgs attached to the release being built, before
build-pack.shruns. Restores then resolve the exact bits that were published rather than whatever nuget.org is currently serving, and the indexing delay stops mattering.build-pack.shonly evermkdir -ps that directory, so a pre-seeded feed survives.Seeding is best-effort: a run whose release has no attached packages emits a warning and behaves exactly as it does today.
This also closes the sibling-resolution variant of the same race — the
NU1102failure on the previous release tag, which is this bug one level down.Deliberately out of scope
Removing the unauthenticated
githubsource. It contributes nothing here and converts lookup misses into hard failures, but it is a separate change and this one is wanted while a release is in flight.Verification
Before merge this is a workflow-only change, so CI cannot exercise it. After merge, and before any real publish: a
publish-splice.yamldispatch withdry_run=trueand bothcodegen_cs_versionandruntime_versionpinned to0.5.0-preview.1— the exact combination that fails today, with no push and no counter write-back.