Skip to content

Stop a metadata step from taking down a finished release - #67

Merged
tonytonycoder11 merged 1 commit into
mainfrom
fix/release-metadata-must-not-fail-a-release
Jul 31, 2026
Merged

Stop a metadata step from taking down a finished release#67
tonytonycoder11 merged 1 commit into
mainfrom
fix/release-metadata-must-not-fail-a-release

Conversation

@tonytonycoder11

Copy link
Copy Markdown
Contributor

The v2.0.0 tag published every jar to Maven Central and attested all eight, and then the job went red.

The linked-artifacts step got 404 no artifacts found for a digest that does have an attestation
(gh api repos/NaCode-Studios/Kdrant/attestations/sha256:18ad27e2… returns one). Because that step is
fatal and runs before the release object is created, a release that had already succeeded finished
with a red run and no GitHub Release. I created the release by hand from the changelog — the same awk
extraction the workflow does, so the body is derived and not composed.

What changes

  • The step is continue-on-error, each record failure is a warning instead of an exit, and the log
    still names what was not written. Supply-chain metadata is worth having; it is not worth undoing a
    successful publish.
  • The GitHub Release moves ahead of it, so the user-visible half of a release can never again be
    lost to the optional half.
  • The endpoint is checked before writing. It has no DELETE, so a duplicate is permanent.
  • GH_TOKEN falls back from an ARTIFACT_METADATA_TOKEN secret to GITHUB_TOKEN. Whether the default
    token may write to this org-level endpoint is undocumented — the published docs state only
    artifact-metadata:read for reads — and this tag is the first that tried it.

What this does not do. It does not diagnose the 404. It may be permission, or a record may need an
artifact the org already knows about rather than one reachable through an attestation. That is worth
finding out, and the release should not have failed while we do.

2.0.0 itself is fine: published, attested, tagged, and the Release exists.

The v2.0.0 tag published every jar to Maven Central and attested all eight,
and then the job went red. The linked-artifacts step got a 404, "no
artifacts found", for a digest that does have an attestation — and because
the step is fatal and runs before the release object is created, a release
that had already succeeded ended with no GitHub Release and a failed run.

The metadata is worth having. It is not worth that. The step is
continue-on-error now, each record failure is a warning rather than an exit,
and the run's log still names what was not written. The GitHub Release moves
ahead of it, so the user-visible half of a release can never again be lost to
the optional half.

Two things the failure taught, both written where the next person will look.
The endpoint is checked before writing, because it has no DELETE and a
duplicate cannot be cleaned up. And GH_TOKEN falls back from an
ARTIFACT_METADATA_TOKEN secret to GITHUB_TOKEN: whether the default token may
write to this org-level endpoint is undocumented, the published docs state
only artifact-metadata:read, and this tag is the first that tried.

The 404 itself is not diagnosed here. It may be permission, it may be that a
record needs an artifact the org already knows about rather than one it can
reach through an attestation. Either way the release should not have failed
while we find out.
@tonytonycoder11
tonytonycoder11 requested a review from a team as a code owner July 31, 2026 14:47
@tonytonycoder11
tonytonycoder11 merged commit b232fb4 into main Jul 31, 2026
7 checks passed
@tonytonycoder11
tonytonycoder11 deleted the fix/release-metadata-must-not-fail-a-release branch July 31, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant