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

Cache pulumi plugins #804

Open
RobbieMcKinstry opened this issue Dec 21, 2022 · 3 comments · May be fixed by #841
Open

Cache pulumi plugins #804

RobbieMcKinstry opened this issue Dec 21, 2022 · 3 comments · May be fixed by #841
Labels
area/cicd good-first-issue Start here if you'd like to start contributing to Pulumi help-wanted We'd love your contributions on this issue impact/performance Something is slower than expected kind/enhancement Improvements or new features size/S Estimated effort to complete (1-2 days).

Comments

@RobbieMcKinstry
Copy link
Contributor

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

Originally opened by @JoseAlban in setup-pulumi:
Jose writes:

Pulumi plugin download can take awhile - it would be great if this action optionally cached (disabled by default) the plugins directory and up/downloaded via github artifact action

Affected area/feature

Actions cache.

@RobbieMcKinstry RobbieMcKinstry added kind/enhancement Improvements or new features impact/performance Something is slower than expected size/S Estimated effort to complete (1-2 days). area/cicd labels Dec 21, 2022
@RobbieMcKinstry
Copy link
Contributor Author

We could start by caching the CLI binary itself.

@RobbieMcKinstry RobbieMcKinstry added help-wanted We'd love your contributions on this issue good-first-issue Start here if you'd like to start contributing to Pulumi labels Dec 21, 2022
@RobbieMcKinstry
Copy link
Contributor Author

I'm starting to implement this.

@RobbieMcKinstry RobbieMcKinstry self-assigned this Jan 13, 2023
@RobbieMcKinstry RobbieMcKinstry added this to the 0.84 milestone Jan 13, 2023
@RobbieMcKinstry
Copy link
Contributor Author

Here's my crude first pass.
I'm unsure if we need to add the tools cache to the path at the beginning of execution, or perform some other action to rehydrate executables from the cache.

Also, it would also be wise to include a test to validate cache hits vs cache misses, but I'm not quite sure how to do that.

Another approach would be to have a second executable (post-execution.ts) that caches plugins after execution, only if the status code was successful. This would decouple caching from the main execution loop, and I think it's more idiomatic for GitHub Actions.

@justinvp justinvp modified the milestones: 0.84, 0.85 Feb 14, 2023
@justinvp justinvp modified the milestones: 0.85, 0.86 Mar 10, 2023
@justinvp justinvp modified the milestones: 0.86, 0.87 Apr 4, 2023
@RobbieMcKinstry RobbieMcKinstry removed this from the 0.87 milestone Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cicd good-first-issue Start here if you'd like to start contributing to Pulumi help-wanted We'd love your contributions on this issue impact/performance Something is slower than expected kind/enhancement Improvements or new features size/S Estimated effort to complete (1-2 days).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants