fix: purge restored Burst cache in Cloud Build PreExport#8966
Draft
aixaCode wants to merge 1 commit into
Draft
Conversation
Contributor
|
Windows and Mac build successful in Unity Cloud! You can find a link to the downloadable artifact below. |
Collaborator
|
PR #8966, run #27372815381 Builds: Windows change, Windows baseline, macOS change, macOS baseline How to read this table
Framework 13 i7
Exception breakdown
|
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.
Pull Request Description
What does this PR change?
Windows Cloud Builds have been failing intermittently (24/55 runs on Jun 10) with:
The Library cache restored by Unity Cloud Build contains truncated Burst hash-cache files — most likely from builds cancelled mid-cache-write (our
cancel-in-progresscancels in-flight Cloud Builds on every push). Burst crashes on the corrupt file instead of treating it as a cache miss, and the poisoned target then fails every incremental build until someone runs a clean build. New PR targets can also inherit a poisoned cache from the template target viabuildTargetCopyCache. Evidence it's not code: the same commit succeeded and failed 24s apart (runs 27354802918 / 27354828088), and no package/Unity/asmdef changes landed when the spike started.This PR deletes
Library/BurstCacheinCloudBuild.PreExport()— which runs on the build worker after cache restore, before the Burst AOT step — so the cache always regenerates. Costs a few minutes of Burst recompile per build; a poisoned target costs a failed ~30 min build plus human retries. Non-fatal on error (logs a warning and proceeds). No Cloud Build config changes needed:PreExportis already wired in the template targets all PR targets are cloned from.Draft for testing: verifying on this PR's own builds that
[BURST]: purged restored Library/BurstCacheappears in the log and theEndOfStreamExceptionfailures stop, plus measuring the build-time cost before merging.Test Instructions
Steps (standard run): N/A — build infrastructure change only.
Expected result: N/A
Steps (fresh account): N/A
Expected result: N/A
Automation (if applicable): N/A
Prerequisites
Test Steps
[BURST]: purged restored Library/BurstCache(or the "nothing to purge" line on a clean target).Unity ran in N secondsagainst recent dev builds to measure the Burst recompile cost.EndOfStreamException/ "Failed to find entry-points" failures should occur.Additional Testing Notes
Library/BurstCache(e.g. underLibrary/Bee) and the purge path needs widening.Quality Checklist