Skip to content

feat: Add the accelerate option for s3 buckets - #7314

Merged
mmaietta merged 3 commits into
electron-userland:masterfrom
lbestftr:master
Dec 18, 2022
Merged

feat: Add the accelerate option for s3 buckets#7314
mmaietta merged 3 commits into
electron-userland:masterfrom
lbestftr:master

Conversation

@lbestftr

Copy link
Copy Markdown
Contributor

Currently it appears there's no support for the s3 accelerated bucket option.
Attempting to supply an endpoint causes the bucket to be appended on the URL, pushing the artifacts into a subfolder.

This PR adds the option to 'accelerate' the s3 bucket, where the s3 URL will be formatted as expected by s3.

For more information on s3 bucket acceleration and the expected URL formats, see:
https://docs.aws.amazon.com/AmazonS3/latest/userguide/transfer-acceleration.html

Let me know if I missed anything, I'm happy to throw this PR away if I am off the mark, or there's an easier way to achieve this.

@changeset-bot

changeset-bot Bot commented Dec 13, 2022

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2f09500

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 12 packages
Name Type
app-builder-lib Minor
builder-util-runtime Minor
dmg-builder Minor
electron-builder-squirrel-windows Minor
electron-builder Minor
electron-forge-maker-appimage Minor
electron-forge-maker-nsis-web Minor
electron-forge-maker-nsis Minor
electron-forge-maker-snap Minor
builder-util Minor
electron-publish Minor
electron-updater Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify

netlify Bot commented Dec 13, 2022

Copy link
Copy Markdown

Deploy Preview for car-park-attendant-cleat-11576 ready!

Name Link
🔨 Latest commit 2f09500
🔍 Latest deploy log https://app.netlify.com/sites/car-park-attendant-cleat-11576/deploys/63990ce12ed03a000875db2b
😎 Deploy Preview https://deploy-preview-7314--car-park-attendant-cleat-11576.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@mmaietta

mmaietta commented Dec 13, 2022

Copy link
Copy Markdown
Collaborator

Curious. Why not set the endpoint to the full s3 url and then set bucket: ''? Then it should render:

url = https://yourActualBucket.s3-accelerate.amazonaws.com/

@lbestftr

Copy link
Copy Markdown
Contributor Author

Curious. Why not set the endpoint to the full s3 url and then set bucket: ''? Then it should render:

url = https://yourActualBucket.s3-accelerate.amazonaws.com/

Sadly I tried that and it throws - minimum field size of 1, PutObjectInput.Bucket.

@lbestftr lbestftr changed the title Add the accelerate option for s3 buckets feat: Add the accelerate option for s3 buckets Dec 13, 2022
@mmaietta

Copy link
Copy Markdown
Collaborator

Ahh, I see. It gets pulled elsewhere via getBucketName() and that in turn calls app-builder-bin directly. (not sure why aws SDK wasn't used, maybe it didn't exist yet 🤷 )

Okay, this seems fine to me. I can't see another way to decrease the wonky logic going on here without breaking backward compatibility.

@mmaietta
mmaietta merged commit cc1ddab into electron-userland:master Dec 18, 2022
@github-actions github-actions Bot mentioned this pull request Mar 4, 2023
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.

2 participants