fix(release): clean stale build state before first verification build (#649) - #650
Merged
Merged
Conversation
…#649) The verification build (run_verification_build → build_modules.sh manifest) could pass on a developer machine while failing on a fresh clone, because: - out/build/include is staged incrementally by prior builds, so a missing dependency header (e.g. #638 PropertyValue.h) is invisible once a full build has been run; and - out/.build-cache skips the verification build entirely when input AIDL hashes are unchanged, even if staged artefacts are stale. A release could thus be cut having passed verification without ever proving the cohort builds from scratch. Add verification_clean_once(): before the first verification build of a release run it removes build/, out/build/include and the build cache, while keeping the Binder SDK in out/target (no SDK rebuild — clean is fast). The guard ensures it runs once per invocation; later passes reuse the freshly staged state.
Contributor
There was a problem hiding this comment.
Pull request overview
Ensures scripts/release.sh release verification builds reflect a clean-checkout build by clearing only the stale staged headers and verification cache once per invocation, without forcing a Binder SDK rebuild.
Changes:
- Add
verification_clean_once()guarded by_VERIFY_CLEAN_DONEto perform a targeted clean (build/,out/build/include,out/.build-cache) once per release run. - Invoke the one-time clean at the start of
run_verification_build()so the first verification build re-stages headers and does not get skipped by a stale cache.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Closes #649.
Problem
The release verification build (
run_verification_build→./build_modules.sh manifest) can pass on a developer machine yet fail on a fresh clone:out/build/include/<dep>/<ver>/include/is populated incrementally by prior builds, so a missing dependency header (the Build failure in VideoSink (v0.2.0.0) – Missing PropertyValue.h dependency #638PropertyValue.hcase) is invisible to anyone who has already done a full build.out/.build-cacheskips the verification build entirely when input AIDL hashes are unchanged, even if on-disk staged artefacts are stale.Net effect: a release could be cut and tagged "having passed verification" without ever proving the cohort builds cleanly from scratch.
Fix
verification_clean_once()runs before the first verification build of a release invocation (guarded to once per run) and performs a targeted clean:rm -rf build/rm -rf out/build/includerm -f out/.build-cacheout/target/(the Binder SDK) — no SDK rebuild, so the clean is fastThe verification build then re-stages all dependency headers from scratch, so release verification reflects a clean-checkout build. Both
build_modules.sh manifestandallrepopulateout/build/includethemselves, so nothing downstream breaks.Test
bash -n scripts/release.shcleanout/target).