-
Notifications
You must be signed in to change notification settings - Fork 604
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
[rush-lib] Add AWS support for build cache feature #2475
Conversation
@@ -18,6 +18,7 @@ | |||
}, | |||
"license": "MIT", | |||
"dependencies": { | |||
"@aws-sdk/client-s3": "~3.3.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iclanton these @aws-sdk
dependencies bring in 3,371files (16MB uncompressed). The Azure stuff also brought in a bunch of dependencies. Maybe it's time to consider an install-on-demand facility for Rush.
apps/rush-lib/src/logic/buildCache/AmazonS3BuildCacheProvider.ts
Outdated
Show resolved
Hide resolved
apps/rush-lib/src/logic/buildCache/AmazonS3BuildCacheProvider.ts
Outdated
Show resolved
Hide resolved
@raihle are you able to sign the CLA? |
This is awesome! Thanks for putting this together. I agree with @octogonz - I think we need to split some of these big-but-optional Rush features into "feature packages" that are only installed in repositories that require them. |
apps/rush-lib/src/logic/buildCache/AmazonS3BuildCacheProvider.ts
Outdated
Show resolved
Hide resolved
apps/rush-lib/src/logic/buildCache/AmazonS3BuildCacheProvider.ts
Outdated
Show resolved
Hide resolved
@@ -4,815 +4,815 @@ | |||
"packages": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you revert the formatting changes to this file?
I'd like to spend some time on Rush as part of my day-job, so I'm trying to get permission for that, but I'll sign it for myself otherwise. |
8cae1ed
to
6d0556e
Compare
6d0556e
to
cb6642e
Compare
* Allow user to pass credential using the --credential flag * Use RUSH_BUILD_CACHE_WRITE_CREDENTIAL if present * Fall back on credentials configured in aws-cli, as before
cb6642e
to
152e2ea
Compare
@iclanton Can we double-check:
|
This PR adds 73 AWS dependencies. That's unfortunate but not the end of the world. We should try to cut that down in a follow-up.
Doesn't seem to, no.
Rundown is the same after my changes. |
Summary
AWS adapter for #2393. Build output can be cached in and fetched from an S3 bucket.
Details
Uses aws-sdk-js-v3, which has some unfortunate characteristics:
skipLibCheck
in tsconfig.json, to work around the fact that AWS SDK types are often a union of Node, DOM, and React Native types, while we only want to know about Node types.I haven't implemented the
--interactive
flag, except for providing a somewhat useful error message. I don't know of any flows (similar to the Azure implementation) a developer could use in order to authenticate rush with AWS.How it was tested
Added the same basic set of unit tests as the Azure integration (no check for region names, as valid options are not exposed by AWS SDK).
Enabled the experiment and configured one of our in-house projects to use AWS S3 for build cache.
rush build
rush build
againtemp/build-cache
folderrush build
and confirmed that it was using the uploaded cache-filesRepeated the same experiment, but deleted the uploaded cache-files before the final step to confirm that it wasn't magically finding the files somewhere else.