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

Upload dist assets to a staging R2 bucket before a release is promoted #3602

Closed
4 tasks done
flakey5 opened this issue Jan 2, 2024 · 7 comments
Closed
4 tasks done

Comments

@flakey5
Copy link
Member

flakey5 commented Jan 2, 2024

For anyone unfamiliar with what we're trying to do with the R2 migration, see #3461

Due to some issues we've experienced with syncing release assets from the DO server to the dist-prod R2 bucket, we want to look into having a dist-staging R2 bucket that will have the assets before the release is promoted. What we think the issue is is that the DO server simply doesn't have enough resources to handle all of the traffic that comes after a release and handle uploading assets to the prod R2 bucket at the same time. By uploading to a staging bucket before the release is promoted (and thus before cache is purged), we should be able to solve this issue.

Note this will not replace uploading the release assets to the DO server. The assets will still be uploaded there like usual.

TODO:

  • Create the dist-staging bucket on Node.js's Cloudflare account
  • Upload the release binaries and docs to the dist-staging bucket as soon as they're uploaded to the DO server
  • Update release tooling in nodejs/node to allow for uploading signed shasums to the staging bucket
  • Update release promotion script to copy dist assets from dist-staging to dist-prod instead of from the dist folder in the DO server.

cc @MoLow @ovflowd

@targos
Copy link
Member

targos commented Jan 3, 2024

Upload the release binaries and docs to the dist-staging bucket as soon as they're uploaded to the DO server

I suggest doing this between the "upload to DO" and "touch .done file" steps in the existing scripts (present in nodejs/node's Makefile and vcbuild.bat files). We can do the upload from the DO server via SSH.

@targos
Copy link
Member

targos commented Jan 3, 2024

I created the dist-staging bucket.

@targos
Copy link
Member

targos commented Jan 3, 2024

Give each releaser their own S3 api token to write to the staging bucket (unless we want this step to happen from the DO server as well)

It will be easier to do it from the DO server, as the releaser already has access to it and already copies the shasums to it.

@MoLow
Copy link
Member

MoLow commented Jan 4, 2024

Sounds like a good way to go. see #3501 - I already started implementing the part of uploading the release artifacts to R2

@flakey5
Copy link
Member Author

flakey5 commented Jan 6, 2024

Pr opened here in the node repo to copy both release assets and the signed shasum files to the staging R2 bucket: nodejs/node#51394

flakey5 added a commit to flakey5/nodejs-build that referenced this issue Jan 28, 2024
flakey5 added a commit to flakey5/nodejs-build that referenced this issue Jan 29, 2024
flakey5 added a commit to flakey5/nodejs-build that referenced this issue May 6, 2024
flakey5 added a commit to flakey5/nodejs-build that referenced this issue May 15, 2024
flakey5 added a commit to flakey5/nodejs-build that referenced this issue May 16, 2024
@trivikr
Copy link
Member

trivikr commented Jul 3, 2024

PR to promote release assets from staging r2 bucket is merged in #3620

What are the next steps for this issue?

@flakey5
Copy link
Member Author

flakey5 commented Jul 3, 2024

Nightly build was promoted from the looks of it!

https://r2.nodejs.org/download/nightly/v23.0.0-nightly2024070366b76e24e2/
https://nodejs.org/download/nightly/v23.0.0-nightly2024070366b76e24e2/

There is a weird thing with the dates going on in the directory listing, but should be an easy fix. Will take a look later.

@flakey5 flakey5 closed this as completed Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants