Skip to content

[DE-4549] refactor(release): move artifact distribution into its own package - #13893

Open
radTuti wants to merge 12 commits into
projectcalico:masterfrom
radTuti:de-4549-distribution-step
Open

[DE-4549] refactor(release): move artifact distribution into its own package#13893
radTuti wants to merge 12 commits into
projectcalico:masterfrom
radTuti:de-4549-distribution-step

Conversation

@radTuti

@radTuti radTuti commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Publishing artifacts moves into its own package. A flow now assembles an ordered list of what goes where, instead of a function per destination, so the difference between a release and a hashrelease is the list rather than a branch in the code. Release publishing talks to the GitHub API instead of shelling out to ghr and gh.

Additionally:

  • release publish is now re-runnable. If a run fails partway, re-running it finds the draft release the earlier run left and takes it live, rather than creating a second one alongside it.
  • Hashreleases get a working dry run for the first time to allow testing without actually uploading to the bucket.

Release note:

None

AI assistance: Claude Code wrote most of the code and tests. Design decisions and review are mine.

Replaces ghr and gh for release publishing: go-github handles drafts, asset
replacement and undrafting, none of which the CLIs did idempotently.
Splits hashreleaseserver.Publish into Record: the upload is now the shared
GCS handler, which gives hashreleases a working dry run.
Publish is sequential: the list is a pipeline, so a later upload can depend
on an earlier one having landed.
release publish already undrafts and sets latest, so the separate command
was a second path to the same GitHub calls.
Drops WithRecord: distribution's destinations are idempotent, so there is
nothing for a resume to skip, and the refs it wrote could not be verified.
A draft carries no git tag, so taking one live by tag never found it. Also
takes the latest release from GitHub rather than inferring it from list order.
@radTuti
radTuti requested a review from a team as a code owner September 11, 2026 20:10
Copilot AI lite review requested due to automatic review settings September 11, 2026 20:10
@marvin-tigera marvin-tigera added this to the Calico v3.34.0 milestone Sep 11, 2026
@marvin-tigera marvin-tigera added release-note-required Change has user-facing impact (no matter how small) docs-pr-required Change is not yet documented labels Sep 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@radTuti radTuti added docs-not-required Docs not required for this change release-note-not-required Change has no user-facing impact and removed release-note-required Change has user-facing impact (no matter how small) docs-pr-required Change is not yet documented labels Sep 11, 2026
With metadata being built at publish, it needs to read for manifest dir in the hashrelease source dir.

Also moves the release metadata record onto the manager, so the shared package defines the Attester interface and each product owns what it writes.
A retried release checksummed the previous run's SHA256SUMS into itself,
so verification always failed, and queued it for upload twice. The chart
index also went out before the github release serving its download URLs.
@radTuti
radTuti enabled auto-merge (squash) September 12, 2026 04:39
@radTuti
radTuti disabled auto-merge September 12, 2026 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-not-required Docs not required for this change release-note-not-required Change has no user-facing impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants