Fall back to local compilation when sccache has no workers - #387
Open
kjmph wants to merge 1 commit into
Open
Conversation
The distributed scheduler can remain reachable while reporting zero compilation servers. The setup check treated any SchedulerStatus as available, so cache misses waited on 7,140-second requests and retries until GitHub Actions canceled the ARM jobs at six hours. The existing local fallback was also exported from a child shell, so it could not reach compiler requests in the subsequent Docker build. Require a nonempty server list, reuse one status snapshot, and source the setup script from both Presto and Velox image builds. This preserves S3 caching while bypassing distributed compilation whenever the scheduler is unavailable. Add regression coverage for healthy, empty, missing, malformed, failed, explicitly disabled, and fallback-disabled scheduler states, and run it from PR checks.
simoneves
reviewed
Jul 28, 2026
simoneves
left a comment
Contributor
There was a problem hiding this comment.
Looks plausible although I am by no means a power-user of this mechanism
| fi | ||
| } | ||
|
|
||
| healthy_status='{"SchedulerStatus":["https://arm64.example",{"servers":[{"id":"worker-1"}]}]}' |
| fi | ||
| bash /sccache_setup.sh; | ||
| # Source the setup so its automatic local-fallback export reaches the build. | ||
| source /sccache_setup.sh; |
Contributor
There was a problem hiding this comment.
Please explain the previous failing here in more detail
| runs-on: ubuntu-latest | ||
| outputs: | ||
| benchmark_data_tools: ${{ steps.filter.outputs.benchmark_data_tools }} | ||
| sccache: ${{ steps.filter.outputs.sccache }} |
Contributor
There was a problem hiding this comment.
What does the sccache tag actually do here? (and below)
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.
The distributed scheduler can remain reachable while reporting zero compilation servers. The setup check treated any SchedulerStatus as available, so cache misses waited on 7,140-second requests and retries until GitHub Actions canceled the ARM jobs at six hours.
The existing local fallback was also exported from a child shell, so it could not reach compiler requests in the subsequent Docker build.
Require a nonempty server list, reuse one status snapshot, and source the setup script from both Presto and Velox image builds. This preserves S3 caching while bypassing distributed compilation whenever the scheduler is unavailable.
Add regression coverage for healthy, empty, missing, malformed, failed, explicitly disabled, and fallback-disabled scheduler states, and run it from PR checks.