Commit 00c5d07
chore: build-time quick wins — rsp DAG rebuild fix, CI queue hygiene, symbols retention, LF scripts (#9616)
* chore: commit compiler rsp files, preBuildScript writes only on drift
Every cloud build wrote Assets/csc.rsp (+4 siblings) fresh onto a clean
checkout; Bee logged 'Rebuilding DAG because FileSignature timestamp
changed: Assets/csc.rsp' and re-ran IL2CPP+Usym (~267s) on no-change
builds. Committed rsp files keep a stable checkout state; the script now
rewrites only on content drift. Their .meta files are committed too, and
Explorer/Assets/*.rsp is pinned to eol=lf so CRLF-converting Windows
builders cannot defeat the byte-compare.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* chore: CI queue hygiene — cancel-first ordering, orphan-build cleanup
UBA allows one pending build per target and the org concurrency cap
counts queued builds, so superseded or orphaned builds inflate everyone's
queue.
- workflow: the Unity-side cancel now runs first-after-build with a 2-min
timeout — GitHub force-kills a cancelled job 5 minutes after the
request, and a large-log upload ahead of the DELETE could eat the
window. Log steps gate on the log existing (in-queue cancels never
write one).
- build.py: persist the target before the build POST and let --cancel
fall back to the target's latest non-terminal build, so a runner death
between POST and id write cannot leave a queued build holding a slot;
the cancel DELETE gets a 30s timeout.
A 90s push debounce was considered and rejected: flat latency tax on
every push build.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* chore: upload debug-symbol artifacts only on release builds, 7-day retention
The *_debug_symbols artifacts (546-935 MB per platform) uploaded on every
build at default retention with zero consumers: Sentry symbolication runs
against the on-disk build/ folder in the same job, and release drafting
only downloaded them because its Decentraland_.* regex accidentally
matched before attaching just the four player zips. Gate the upload to
release builds, cap retention at 7 days, and anchor the drafting regex to
the player zips.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* chore: force LF checkout for shell scripts
Windows cloud builders check out with CRLF conversion, so the UBA
preBuildScript (scripts/generate-ignore-warnings.sh) failed with
"$'\r': command not found" on every Windows build —
preBuildScriptFailsBuild=false hid it. All committed *.sh blobs are
already LF; this only pins the checkout.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* chore: extend stale watchdog to active build phase via log growth detection
The existing STALE_POLL_THRESHOLD watchdog (600 s) only monitors queue
statuses (created / queued / sentToBuilder). Once a build transitions to
`started` the watchdog goes blind — a deadlocked builder keeps reporting
`started` indefinitely, leaving BUILD_TIMEOUT (3 h) as the only backstop.
This change adds a log-growth liveness signal for the active phase:
• New `get_log_byte_count(id)` probes `/builds/{id}/log` via HEAD (then a
single-byte Range request as fallback) to return the current log size
without downloading the full log.
• `run_poll_loop` tracks `last_log_byte_count` / `last_log_growth`. On
every poll tick while `status in ACTIVE_STATUSES` the log size is checked;
if it has not grown for `LOG_STALL_THRESHOLD` seconds (default 900 s /
15 min) the build is cancelled and `log_stall` is returned.
• `log_stall` is handled identically to `build_timeout`: build_info is
deleted, the log downloaded for debugging, and exit code 99 triggers
nick-fields/retry on a fresh builder VM.
• `LOG_STALL_THRESHOLD: 900` is exposed in build-unitycloud.yml alongside
the existing `STALE_POLL_THRESHOLD`.
Closes #9628
* chore: address review — harden rsp generator, guard cancel fallback, add drift CI check
- generate-ignore-warnings.sh: temp file via mktemp outside Assets/ (an
interrupted run no longer leaves a stray file for Unity to import),
explicit write/copy error handling replacing the stale $? idiom, cp
keeps the destination inode, distinct unchanged/updated messages.
- build.py: the --cancel fallback only cancels a build still in an
explicit queue status — targets are shared (release pool, consecutive
runs per branch), so an already-started build may belong to a
concurrent run; a missing status is treated as not-cancellable.
get_latest_build gains timeout=30: it now sits on the 2-minute
cancellation critical path.
- test.yml: new rsp-drift job regenerates the rsp files and fails on
diff, so generator drift can't silently reintroduce the per-build
Bee DAG rebuild.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* chore: address watchdog re-review — growth-armed stall cancel, probe hardening, drift-guard gaps
- build.py watchdog: the stall cancel now arms only after one observed
log-size increase, so a probe reporting a constant value (proxy
answering HEAD with Content-Length: 0, endpoint dead during builds)
reads as inactive instead of cancelling every build at 15 min. A size
decrease (restarted builds can truncate the log) resets the clock.
First probe result is printed once; non-2xx probe responses are
surfaced once instead of silently returning None.
Threshold evidence: longest log silence across 18 preserved warm
builds is 99 s (IL2CPP), giving the 900 s threshold a ~9x margin.
- get_log_byte_count: allow_redirects=True on HEAD (requests defaults
HEAD to not following redirects; the endpoint may 302 to signed
storage), timeouts lowered 30 -> 10 s on the poll critical path.
- test.yml: generator added to the pull_request paths filter (an edit to
warnings_to_ignore alone never triggered the workflow); drift check
uses git status --porcelain so a new untracked rsp file counts as
drift; rsp-drift job gets timeout-minutes and contents: read.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* chore: retry externally-canceled builds instead of hard-failing
Observed on this branch's own CI (run 31087915798): the Windows build sat
sentToBuilder for 9 minutes, UBA canceled it platform-side (builder
provisioning failure; the same window produced a transient HTTP 500 from
the API), and build.py mapped the external 'canceled' to exit 1 - which
nick-fields/retry does not retry, so an infra flake became a hard red
job with the second attempt unused.
This run's own cancellations exit through the watchdog/timeout branches,
so a 'canceled' final outcome is always external: exit 99 after deleting
build_info, letting the retry create a fresh build. Bounded by
max_attempts: 2, so a supersede race cannot loop.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* chore: don't retry a superseded build on shared targets
The unconditional canceled->retry turned a supersede on the shared
release pool into a ping-pong: the superseded run's retry re-POSTs, hits
'already a build pending', cancels the superseding run's build, and
hands it the same exit 99 - both runs burn a queue+build cycle and one
still ends red (and set_parameters clobbers the winner's env vars).
Build numbers are monotonic per target: if the target's newest build is
newer than ours we were superseded and exit 1 without retrying; if ours
is still the newest, the cancel was platform-side (builder provisioning)
and the retry stands. Also download the log best-effort on this path -
with the log steps now gated on the log existing, an externally-canceled
run would otherwise finish with no log artifact at all.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* chore: close the supersede-probe gap, fail-open on probe errors
Two residuals in the canceled-outcome guard:
- run_build cancels the pending build and only re-POSTs ~30 s later, so
a supersede is invisible to a probe landing inside that gap (~coin
flip with POLL_TIME=60). When the first probe does not show a newer
build, sleep 35 s and re-probe once before deciding to retry.
- get_latest_build was the one bare call site on this path: a transient
RequestException would traceback to exit 1 - skipping build_info
cleanup and the log download, and converting the provisioning-flake
retry this branch exists for into a red job. The probe now fails open
(latest = None -> retry), matching the non-200 behaviour.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Esteban Ordano <42750+eordano@users.noreply.github.com>
Co-authored-by: decentraland-bot <44584806+decentraland-bot@users.noreply.github.com>1 parent 162f73f commit 00c5d07
16 files changed
Lines changed: 353 additions & 31 deletions
File tree
- .github/workflows
- Explorer/Assets
- scripts
- cloudbuild
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
573 | 573 | | |
574 | 574 | | |
575 | 575 | | |
| 576 | + | |
576 | 577 | | |
577 | 578 | | |
578 | 579 | | |
| |||
599 | 600 | | |
600 | 601 | | |
601 | 602 | | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
602 | 616 | | |
603 | 617 | | |
604 | 618 | | |
| |||
877 | 891 | | |
878 | 892 | | |
879 | 893 | | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
880 | 897 | | |
| 898 | + | |
881 | 899 | | |
882 | 900 | | |
883 | 901 | | |
884 | 902 | | |
885 | 903 | | |
886 | 904 | | |
887 | 905 | | |
| 906 | + | |
888 | 907 | | |
889 | 908 | | |
890 | 909 | | |
| |||
899 | 918 | | |
900 | 919 | | |
901 | 920 | | |
902 | | - | |
| 921 | + | |
| 922 | + | |
903 | 923 | | |
904 | | - | |
| 924 | + | |
905 | 925 | | |
906 | 926 | | |
907 | 927 | | |
908 | 928 | | |
909 | 929 | | |
910 | 930 | | |
911 | | - | |
912 | 931 | | |
913 | | - | |
| 932 | + | |
914 | 933 | | |
915 | 934 | | |
916 | 935 | | |
917 | | - | |
| 936 | + | |
918 | 937 | | |
919 | 938 | | |
920 | 939 | | |
| |||
931 | 950 | | |
932 | 951 | | |
933 | 952 | | |
934 | | - | |
935 | | - | |
936 | | - | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
943 | 953 | | |
944 | 954 | | |
945 | 955 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
39 | 70 | | |
40 | 71 | | |
41 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments