feat(azure): make the package workflow say where the artifact went and what to do with it - #310
Merged
Merged
Conversation
…d what to do with it The job ended with a green tick and no answer to the only question its operator has. The digests it pinned were buried in the build log, the artifact link existed nowhere in the output, and the Partner Center steps lived in a document that is no longer in the repo. So the run now explains itself. Three sections, each written by the step that knows its facts, as soon as it knows them - a run that fails validation still leaves a usable summary rather than none: 1. what was built: package version, app version, both image digests, the zip name and its SHA-256; 2. the arm-ttk result, with every failure and warning named (written BEFORE the gate, so a failing run explains itself in the summary and not only in the log); 3. where it went and what to do by hand. The builder now writes dist/azure/build-metadata.json beside the zip, because none of that provenance is recoverable from the zip itself: two JSON files with no trace of which app version or image digests they deploy. The checksum is read back off disk rather than computed from the bytes we meant to write, since its whole purpose is to describe the file a human uploads. One trap the summary spells out, verified by downloading the artifact from the last run: GitHub wraps artifacts in an archive of its own, so the download is a zip CONTAINING libredb-studio-azure-<version>.zip. Partner Center needs the inner one - uploading GitHub's wrapper would fail certification on package structure. The two bash summary steps were rendered locally by extracting their `run:` blocks from the workflow file itself, not by retyping them, and executing them against a real build-metadata.json.
|
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.



Why
The workflow ended with a green tick and no answer to the only question its operator has: where did the package go, and what do I do with it? The image digests it pinned were buried in the build log, the artifact link appeared nowhere in the output, and the Partner Center steps used to live in a document that is no longer in the repo.
What the run now says
Three sections, each written by the step that knows its facts, as soon as it knows them — so a run that fails validation still leaves a usable summary instead of nothing:
sha256sum -cline, and the Partner Center sequence.Rendered output from run 31173195066 (dispatched on this branch):
The builder writes its provenance down
dist/azure/build-metadata.jsonnow lands beside the zip, because none of that provenance is recoverable from the zip itself — it is two JSON files with no trace of which app version or image digests they deploy. It is also what the summary reads, so the workflow does not have to parse the build's stdout.The checksum is read back off disk rather than computed from the bytes we meant to write, since its entire purpose is to describe the file a human uploads by hand.
One trap worth the paragraph it costs
Verified by downloading the artifact from the previous run: GitHub wraps artifacts in an archive of its own, so the download is a zip containing
libredb-studio-azure-1.0.0.zip, whose own root holds the two JSON files. Partner Center needs the inner one — uploading GitHub's wrapper would fail certification on package structure. The summary says so where someone about to make that mistake will read it, anddeploy/azure/README.mdrepeats it.Verification
run:blocks from the workflow file itself, not by retyping them, and executing them against a realbuild-metadata.json— the same technique fix(ci): let the arm-ttk gate decide the azure package job, not the error stream #309 established after the local check there failed to predict the job.artifact-urlpopulated (.../artifacts/8991777005), so the link in the summary is live.zipSha256against an independently computed hash of the zip on disk.coverage:check→ 100.00% (29254/29254).