fix: persist Pulumi plugin cache across container runs#361
fix: persist Pulumi plugin cache across container runs#361alexjurkiewicz wants to merge 1 commit into
Conversation
~/.pulumi/plugins contains provider binaries (e.g. pulumi-resource-aws) that Pulumi downloads at runtime. This directory was not bind-mounted, so plugins were re-downloaded on every container invocation. Rather than mounting a separate ~/.pulumi directory (which would require users to have Pulumi installed locally), set PULUMI_HOME to a path inside ~/.cloudypad, which is already bind-mounted. This keeps all CloudyPad runtime state in one place and works regardless of what the user has installed on the host. Note: ~/.cloudypad/pulumi-backend/.pulumi is the Pulumi state backend (stack checkpoints) and is already persisted via the ~/.cloudypad mount. This change addresses the separate plugin cache. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
You're hitting a spot I intended to work on for some time - however instead of persistent plugins locally I had in mind to bake them directly into the image from Dockerfile, by adding commands Do you think it's possible ? |
|
It sounds possible. The AWS plugin is 700mb -- if you The runner is currently about 3gb. Another 700mb is quite a lot to swallow. It's up to you. |
|
Fair point ^^' resulting image may be too big. I'll do a quick test to check, but your solution seems the right fit! |
|
Pulumi has no lockfile, but you can explicitly install a certain provider version and check its hash yourself. That might be sufficient? It's more self-managed infrastructure tooling though ⚖️ |
Summary
PULUMI_HOMEto~/.cloudypad/pulumi-homeincloudypad.shso Pulumi's plugin cache (provider binaries) is stored inside the already-mounted~/.cloudypaddirectorypulumi-resource-awsare re-downloaded on every container invocationDetails
~/.pulumi/pluginscontains provider binaries that Pulumi downloads at runtime. This directory was not bind-mounted, so plugins were re-downloaded on every container run (adding ~30–60s to every command).Rather than mounting a separate
~/.pulumidirectory (which would require users to have Pulumi installed locally),PULUMI_HOMEis redirected to~/.cloudypad/pulumi-home, which is already bind-mounted. This keeps all CloudyPad runtime state in one place.Note:
~/.cloudypad/pulumi-backend/.pulumiis the Pulumi state backend (stack checkpoints) and is already persisted. This change addresses only the separate plugin cache.Test plan
cloudypadcommand twice; confirm second run does not re-download provider plugins~/.cloudypad/pulumi-home/plugins/is populated after first run🤖 Generated with Claude Code