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
24 changes: 16 additions & 8 deletions scripts/earthly-ci
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ export GITHUB_ACTIONS=true
export FORCE_COLOR=1
export EARTHLY_CONFIG=$(git rev-parse --show-toplevel)/.github/earthly-ci-config.yml

function wipe_non_cache_docker_state {
echo "Detected corrupted docker images. Wiping and trying again."
# Based on https://stackoverflow.com/a/75849307
# wipe everything but volumes where we have earthly cache
sudo service docker stop
sudo bash -c 'rm -rf /var/lib/docker/{buildkit,containers,image,network,overlay2,plugins.runtimes,swarm,tmp,trust}/*'
# restart docker - might take down builds, but we need to recover anyway
sudo service docker restart
}

# Handle earthly commands and retries
while [ $ATTEMPT_COUNT -lt $MAX_ATTEMPTS ]; do
if earthly $@ 2>&1 | tee $OUTPUT_FILE >&2 ; then
Expand All @@ -49,16 +59,14 @@ while [ $ATTEMPT_COUNT -lt $MAX_ATTEMPTS ]; do
echo "Detected earthly unable to find buildkit, waiting and trying again..."
sleep 20
elif grep 'The container name "/earthly-buildkitd" is already in use by container' $OUTPUT_FILE >/dev/null; then
echo "Detected earthly bootstrap happening in parallel and failing, waiting and trying again."
if [ $ATTEMPT_COUNT -lt 3 ] ; then
echo "Detected earthly bootstrap happening in parallel and failing, waiting and trying again."
else
wipe_non_cache_docker_state
fi
sleep 20
elif grep 'status 125: docker: Error response from daemon: layer does not exist.' $OUTPUT_FILE >/dev/null || grep 'could not determine buildkit address - is Docker or Podman running?' $OUTPUT_FILE >/dev/null ; then
echo "Detected corrupted docker images. Wiping and trying again."
# Based on https://stackoverflow.com/a/75849307
# wipe everything but volumes where we have earthly cache
sudo service docker stop
sudo bash -c 'rm -rf /var/lib/docker/{buildkit,containers,image,network,overlay2,plugins.runtimes,swarm,tmp,trust}/*'
# restart docker - might take down builds, but we need to recover anyway
sudo service docker restart
wipe_non_cache_docker_state
# wait for other docker restarts
sleep 20
else
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion yarn-project/circuits.js/src/structs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export * from './caller_context.js';
export * from './complete_address.js';
export * from './content_commitment.js';
export * from './context/private_context_inputs.js';
export * from './context/public_context_inputs.js';
export * from './contract_storage_read.js';
export * from './contract_storage_update_request.js';
export * from './function_data.js';
Expand Down