Skip to content

detect if running in plan mode and skip envbuilder invocation #7

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

Closed
johnstcn opened this issue Aug 1, 2024 · 1 comment
Closed

Comments

@johnstcn
Copy link
Member

johnstcn commented Aug 1, 2024

Currently when running in 'plan' mode we get this warning showing up:

2024-08-01 16:46:21.424+01:00 Plan: 0 to add, 0 to change, 1 to destroy.
2024-08-01 16:46:21.429+01:00 Warning: Cached image not found
2024-08-01 16:46:21.429+01:00 on main.tf line 121, in data "envbuilder_cached_image" "cached":
2024-08-01 16:46:21.430+01:00   121: data "envbuilder_cached_image" "cached" {
2024-08-01 16:46:21.430+01:00 
2024-08-01 16:46:21.431+01:00 get cached image: error probing build cache: uncached RUN command is not supported in cache probe mode
=== ✔ Planning infrastructure [3777ms]

Invoking a cached build in plan mode is likely to be expensive so we should reserve this for apply.
This may involve migrating envbuilder_cached_image to be a resource instead of a data source.

@johnstcn
Copy link
Member Author

johnstcn commented Aug 9, 2024

Fixed by #15

@johnstcn johnstcn closed this as completed Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant