Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible: fix promotion to R2 dist-prod for releases #3840

Merged
merged 1 commit into from
Oct 30, 2024
Merged

ansible: fix promotion to R2 dist-prod for releases #3840

merged 1 commit into from
Oct 30, 2024

Conversation

richardlau
Copy link
Member

@richardlau richardlau commented Jul 19, 2024

Due to R2 limitations, aws s3 cp and aws s3 sync only succeed in
copying different sets of files across. Fortunately the sets are
disjoint, so running both commands (ignoring errors) will copy all the
files across.

Update resha_release.sh to redirect to a log file the output from the
upload_to_cloudflare.sh to prevent extra output interfering with the
release.sh script.

Fixes: #3838
Refs: #3838 (comment)

@richardlau

This comment was marked as outdated.

@richardlau
Copy link
Member Author

Updating to use both aws s3 cp and aws s3 sync, ignoring errors: #3838 (comment)

@richardlau richardlau marked this pull request as ready for review July 23, 2024 12:45
@richardlau
Copy link
Member Author

Updating to use both aws s3 cp and aws s3 sync, ignoring errors: #3838 (comment)

This appears to have promoted everything for v23.0.0-nightly20240723cad73dadba and looks to be a less than ideal but working workaround of the current R2 S3 compatibility limitations.

Due to R2 limitations, `aws s3 cp` and `aws s3 sync` only succeed in
copying different sets of files across. Fortunately the sets are
disjoint, so running both commands (ignoring errors) will copy all the
files across.

Update `resha_release.sh` to redirect to a log file the output from the
`upload_to_cloudflare.sh` to prevent extra output interfering with the
`release.sh` script.
@richardlau richardlau changed the title ansible: mirror upload_to_cloudflare.sh changes ansible: fix promotion to R2 dist-prod for releases Oct 29, 2024
@richardlau
Copy link
Member Author

Updated with changes to get 22.11.0 successfully promoted to R2's dist-prod.
Refs: #3838 (comment)

Logs on the server are stored in /home/staging/tools/promote/logs/cloudflare.log.

aws s3 cp $staging_bucket/$relativedir/$tmpversion/ $dist_bucket/$relativedir/$tmpversion/ --endpoint-url=$cloudflare_endpoint --profile $cloudflare_profile --recursive --no-follow-symlinks
# Due to R2 limitations, `aws s3 cp` and `aws s3 sync` only succeed in copying
# different sets of files across. Fortunately the sets are disjoint, so running
# both commands (ignoring errors) will copy all the files across.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of scope of this PR, but I wonder if it would be worth switching to rclone for moving files around like this? I've found it to be reliable across different S3 providers (rclone has various workarounds for different S3 providers.)

@richardlau richardlau merged commit 21fc64a into main Oct 30, 2024
5 checks passed
@richardlau richardlau deleted the r2 branch October 30, 2024 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Promotion to R2's dist-prod bucket never happens
3 participants