This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Conversation
This file contains 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
yihau
reviewed
Mar 8, 2023
afaik we have two kinds of cache. 1 is the local one which stored in the ~/.cargo and 2 is sccache. if [[ -n $CI ]]; then
# Share the real ~/.cargo between docker containers in CI for speed
ARGS+=(--volume "$HOME:/home")
if [[ -n $BUILDKITE ]]; then
- # sccache
- ARGS+=(
- --env "RUSTC_WRAPPER=/home/.cargo/bin/sccache"
- --env AWS_ACCESS_KEY_ID
- --env AWS_SECRET_ACCESS_KEY
- --env SCCACHE_BUCKET
- --env SCCACHE_REGION
- )
+ # Fully disable caching to create a clean-room environment to preclude any
+ # cache-related bugs for our sanity
+ if [[ $BUILDKITE_RETRY_COUNT -ge 3 ]]; then
+ # I hate buildkite-esque echo is leaking into this generic shell wrapper.
+ # but it's easiest, in edge-case, and properly guarded under $BUILDKITE_ env...
+ echo "--- DISABLING SCCACHE DUE TO MANY (${BUILDKITE_RETRY_COUNT}) RETRIES"
+ else
+ # sccache
+ ARGS+=(
+ --env "RUSTC_WRAPPER=/home/.cargo/bin/sccache"
+ --env AWS_ACCESS_KEY_ID
+ --env AWS_SECRET_ACCESS_KEY
+ --env SCCACHE_BUCKET
+ --env SCCACHE_REGION
+ )
+ fi
fi
else
# Avoid sharing ~/.cargo when building locally to avoid a mixed macOS/Linux
fi
ARGS+=(--env "HOME=/home" --env "CARGO_HOME=/home/.cargo") |
@yihau thanks for the suggestion. I've took your advance with some tweak. could you take a look at it? |
yihau
approved these changes
Mar 8, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
ryoqun
commented
Mar 8, 2023
# sccache-related bugs | ||
echo "--- $0 ... (with sccache being DISABLED due to many (${BUILDKITE_RETRY_COUNT}) retries)" | ||
else | ||
echo "--- $0 ... (with sccache enabled)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Problem
There's no way for team eng to get out of being stuck after ci cache issue. Also, there's no way to disable it for debugging as well.
Summary of Changes
implement ala circleci's build-without-cache feature under very limited ui functionality we have at buildkite => hit retry 3 times for third time luck boost. lol
seems to work: