Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/cache-warm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,27 @@ jobs:
echo "- Target: at most 8 GiB"
echo "- Hard budget: 10 GiB"
} >> "$GITHUB_STEP_SUMMARY"
# Going over budget evicts by last-access, so the entries that every
# PR depends on lose to bulk written by rarely-run workflows. Name the
# biggest consumers so the trade-off is visible instead of implicit.
{
echo
echo "<details><summary>Largest cache entries</summary>"
echo
echo "| Size (GiB) | Last accessed | Key | Ref |"
echo "| ---: | --- | --- | --- |"
# `head` would close sort's stdout early and SIGPIPE it under
# pipefail, so cap the row count inside the same awk pass.
gh api --method GET "repos/$REPOSITORY/actions/caches" \
-F per_page=100 --paginate \
--jq '.actions_caches[] | [.size_in_bytes, .last_accessed_at, .key, .ref] | @tsv' \
| sort -rn \
| awk -F"$(printf '\t')" 'NR <= 15 \
{ printf "| %.2f | %s | `%s` | `%s` |\n", \
$1 / 1073741824, substr($2, 1, 10), $3, $4 }'
echo
echo "</details>"
} >> "$GITHUB_STEP_SUMMARY"
if (( bytes > 10737418240 )); then
echo "::error::Actions cache usage is above the 10 GiB budget ($gib GiB)"
exit 1
Expand Down
5 changes: 4 additions & 1 deletion harness/tests/e2e/src/types/scenario.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ mod tests {
fn deadline_defaults_are_safe() {
let timeouts = DeadlinesV1::default();
assert_eq!(timeouts.readiness_ms, 60_000);
assert_eq!(timeouts.scenario_ms, 60_000);
assert_eq!(timeouts.scenario_ms, 25_000);
assert_eq!(timeouts.teardown_ms, 15_000);
// The await deadline must stay well clear of the slowest passing
// scenario (~4s in CI) so a slow runner does not read as a failure.
assert!(timeouts.scenario_ms >= 5 * 4_000);
}
}
7 changes: 6 additions & 1 deletion harness/tests/e2e/src/types/scenario/compiled.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@ impl Default for DeadlinesV1 {
fn default() -> Self {
Self {
readiness_ms: 60_000,
scenario_ms: 60_000,
// Stack boot is budgeted by `readiness_ms`; this covers only the
// await phase, where the slowest passing scenario observed in CI
// takes ~4s. 25s keeps ~6x headroom while capping what a wedged
// scenario costs — at 60s, a red run spent more time waiting on
// deadlines than doing work.
scenario_ms: 25_000,
teardown_ms: 15_000,
}
}
Expand Down
Loading