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

feat: Add the accelerate option for s3 buckets #7314

Merged
merged 3 commits into from
Dec 18, 2022
Merged

feat: Add the accelerate option for s3 buckets #7314

merged 3 commits into from
Dec 18, 2022

Conversation

lbestftr
Copy link
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
Copy link

changeset-bot bot commented Dec 13, 2022

🦋 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
Copy link

netlify bot commented Dec 13, 2022

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
Copy link
Collaborator

mmaietta commented Dec 13, 2022

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
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
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