Error if --cache and --fetch is enabled
MatteoVoges opened this issue · comments
Describe the bug/feature
Kapitan should raise an error if the user uses flags --cache
and --force-fetch
(--fetch --force
) together in one command.
To Reproduce
Steps to reproduce the behavior:
run $ kapitan compile --cache --fetch --force
Error:
$ kapitan compile --fetch --force --cache
Dependency helm chart filebeat and version 7.17.3: fetching now
Dependency helm chart filebeat and version 7.17.3: Error: failed to untar: a file or directory with the name .dependency_cache/a7918653/filebeat-7.17.3.tgz already exists
Error: failed to untar: a file or directory with the name .dependency_cache/a7918653/filebeat-7.17.3.tgz already exists
I don't know where the error comes from but it could be a problem for many targets with dependencies.
Furthermore with upcoming change #862 where you can specify the fetch_always
tag in your dependencies we have to decide how kapitan should handle this situation.
Scenario:
You have one target, which has its fetch_always
-tag set to true
and one target where you want to get the dependencies from cache.
Currently Kapitan would throw an uncaught error.
The options to resolve that would be:
- exclude all targets with
fetch_always
-tag from caching-process - add a
get_from_cache
-tag in the dependencies to allow the user to choose - don't allow different fetch/cache behavior for targets
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.