feat(ota): let publish-ota take baseline-tag latest and default the smoke's runtime version - #103
Merged
Merged
Conversation
…moke's runtime version A hotfix caller had to find its own baseline: list the releases for the newest store build, download its build-info.json, and read the iOS fingerprint out of it for the smoke check. That is a job of inline shell in every consumer, re-fetching a file publish-ota.yml downloads anyway. - baseline.sh takes `latest`: the newest published release that is neither a draft nor a pre-release. None, or a failed listing, is fatal. - smoke.sh, with no OTA_RUNTIME_VERSION, sends the platform's fingerprint from the baseline publish-ota.yml hands it. The fingerprint gate has just proven this commit fingerprints the same, and that fingerprint is the runtime version the update is served under. An explicit value still wins; a baseline without that fingerprint sends no header. So every caller can drop its runtime-version, and a hotfix caller its whole baseline job.
# Conflicts: # README.md
# Conflicts: # README.md
# Conflicts: # README.md # docs/consumer-guide.md
# Conflicts: # README.md
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.
What and why
A hotfix caller has to find its own baseline. The template's
cd-ota-hotfix.ymlruns a job of inline shell that:build-info.json;fingerprint.iosout of it to pass asruntime-version.publish-ota.ymldownloads that same file itself, one step later. Every other caller also passesruntime-version, carried frombuild-prepare, and it is always the same value: the baseline's iOS fingerprint.scripts/ota/baseline.sh:latestresolves to the newest published release that is neither a draft nor a pre-release (gh release list --exclude-drafts --exclude-pre-releases); the-build.Ninternal pre-releases never are. No such release, or a failed listing, is fatal.scripts/ota/smoke.sh: with noOTA_RUNTIME_VERSION, it sends the platform's fingerprint fromOTA_BASELINE_BUILD_INFO.publish-ota.yml: hands the smoke step the baseline path, and both input descriptions say what empty andlatestmean.Not breaking. A caller passing
runtime-versionis unchanged. A caller that passed amanifest-urland noruntime-versionused to send no runtime header, and now sends the fingerprint the update is actually served under.How to verify
make checkpasses: exit 0.test/baseline.bats, 3 new cases:latestresolves, excludes drafts and pre-releases, and downloads from the resolved tag;latestwith no release is fatal and says to pass the tag, with no download;test/smoke.bats, 5 new cases:OTA_SMOKE_PLATFORM;test/consumer-contract.bats: the guide'spublish-ota.ymltable still matches the inputs.Docs
docs/consumer-guide.md:baseline-tagandruntime-versionrows;latestand the runtime default;baseline-tag latest), and the prose on callers that never prepare.README.md: the test count.The template's
cd-ota-hotfix.ymlloses itsbaselinejob, and its other callers theirruntime-version:lines, after it moves its pin to the release carrying this.Checklist
make checkpasses locallytest/baseline.bats,test/smoke.bats)docs/consumer-guide.mdupdated: two inputs changed meaning