-
Notifications
You must be signed in to change notification settings - Fork 609
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] Add plugin and cloud build cache with rush plugins #2900
Conversation
c1cc15d
to
b054b72
Compare
apps/rush-lib/src/plugins/AzureStorageBuildCachePlugin/index.ts
Outdated
Show resolved
Hide resolved
apps/rush-lib/src/plugins/AzureStorageBuildCachePlugin/index.ts
Outdated
Show resolved
Hide resolved
Thanks for putting this together @chengcyber! Haven't reviewed the whole thing yet but I left some initial thoughts about the API. |
5a6cbce
to
54513d8
Compare
rush-plugins/rush-amazon-s3-build-cache-plugin/src/RushAmazonS3BuildCachePlugin.ts
Outdated
Show resolved
Hide resolved
rush-plugins/rush-azure-storage-build-cache-plugin/src/RushAzureStorageBuildCachePlugin.ts
Outdated
Show resolved
Hide resolved
rush-plugins/rush-amazon-s3-build-cache-plugin/src/RushAmazonS3BuildCachePlugin.ts
Outdated
Show resolved
Hide resolved
b8342e5
to
d925465
Compare
Copy of my notes from the Rush Hour breakout meeting: (These were informal suggestions and not final decisions.)
|
@chengcyber I will ready your other questions/comments and follow up separately. |
|
@dmichon-msft this is a good point. Can you think of a design that provides: (1) VS Code IntelliSense for people who are editing the config files and (2) support for Like, maybe the filenames have a suffix with an integer or instance id?
Agreed. And maybe you could have a
If |
d925465
to
f171513
Compare
The easiest way I could think of to do this would be to have the list of plugins contain a single option for each, which is the name of the independent config file; that would allow collisions to be resolved while maintaining a fixed schema for the rush.json/rush-plugins.json file. Since we can load all the plugin configs in parallel it shouldn't be too bad on load perf. Alternatively, is it valid to define a |
Agreed, for now plugin configuration need specify Update: Do some experiments in vscode and specifing
Had a lightbulb: we can dynamically generate a
meanwhile,
|
Update 2021/10/13
Use case 1: custom cache providerPlugin Part:
You might notice
User Part: setup in Repo
Use Case 2: custom command-linePlugin Part:
User Part:
run supports package binaryLet's say we want to use plugin defines install
supports js file in plugin
Things might need discussions
|
FYI I seem to remember reading somewhere that the JSON Schema specification only permits URLs in the
Naming collisions don't seem like a significant concern. For example the NPM package names are unique, so maybe the filename simply includes the package name? Having each plugin's settings in a separate files has some upsides. It makes it much easier to sync settings between repos, and also to update the |
Update 2021/10/25After another call with @octogonz, I'd like to record a TODO list here:
|
f46a5b3
to
923f6f3
Compare
af937ca
to
400b6d7
Compare
// @beta (undocumented) | ||
export type IBuildCacheJson = ICloudBuildCacheJson | ILocalBuildCacheJson; | ||
|
||
// Warning: (ae-forgotten-export) The symbol "IBaseBuildCacheJson" needs to be exported by the entry point index.d.ts |
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 FYI I'd like to tune up rush-lib.api.md
a bit before we release this feature, to eliminate some of these warnings and better distinguish experimental APIs from production APIs. However PR #2900 has accumulated a lot of work already, so I've decided to merge it and use a clean PR for the tune up.
Summary
Fixes #2898
Rush plugin is the first step to build rush ecosystem. 😃
Details
Further roadmap:
Cloud build cache with plugin workflow
Rush plugin Load workflow
How it was tested
Tried to add jests but not too much, tested in local with MacOS