Construct release URLs from the tag instead of the draft html_url#170
Merged
Conversation
A draft release's html_url always points at an untagged-* placeholder until the release is published, so both the URL baked into the firmware and the one patched into the manifests 404'd once the release went live. The final URL is deterministic from the tag, so build it.
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.
Summary
Follow-up to #168, fixing a fleet-wide defect surfaced by a review on esphome/serial-proxies: shipped manifests carry
ota.release_urlvalues likehttps://github.com/esphome/serial-proxies/releases/tag/untagged-48a68f5b50a03b2b1927, which 404.The root cause is not the tag-reset failure the workflows already guard against: a draft release's
html_urlalways points at anuntagged-*placeholder until the release is published, even when itstag_nameis healthy (verified live: the current esphome/infrared-proxies draft hastag_name: 26.7.2but anuntagged-*html_url). So every firmware built against a draft, and every manifest patched at publish time, baked in a URL that 404s the moment the release goes live.Since the final URL is deterministic from the tag, construct
https://github.com/<repo>/releases/tag/<tag>instead of reading.html_url, in both places that emit it:build-to-draft-release.ymldetermine-version(the URL baked into the firmware)publish-draft-release.ymlresolve step (the URL patched into the*.manifest.jsonassets before publishing)No per-repo fixes are needed: converting the fleet to these workflows fixes the defect going forward. Manifests on already-published releases keep the broken URL until each repository's next release.