-
-
Notifications
You must be signed in to change notification settings - Fork 200
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
Feature: Added force-fetch functionality (#858) #862
Conversation
Hi @ramaro @ademariag , I applied the changes we discussed, so the PR is ready to review. But there is one more thing I noticed: [...]
# getting the flag values
if fetch:
# fetch inventories
# fetch dependencies
else:
# fetch targets with fetch_always tag
[...] So with that we would have one if-statement, which indicates if we are fetching or not. Should I dump my suggestion into this PR or wait until this PR is merged and then create a new one? |
@MatteoVoges thanks for getting this done!
|
This lgtm @MatteoVoges ! Would you mind updating the doc changes and title to force_fetch instead of fetch_always? We can merge straight after that, |
Hey @ramaro, |
@MatteoVoges there's some |
@ramaro , you're right. I updated it now. Please let me know if there is still something to do here. |
Fixes issue: #858
Proposed Changes
Added a option to have a
force_fetch
-property in your external dependencies.If
force_fetch
is set totrue
, this dependency will always get fetched and overwrite existing files (force-fetch).Renamed
--force
-flag to--force-fetch
, so you have to run$ kapitan compile --fetch
to fetch (existing files won't get overwritten) or$ kapitan compile --force-fetch
to fetch the dependencies and overwrite existing files.If the property is false or not given, the default-behavior of the fetch-functionality doesn't change.
Also the behavior of
--fetch
and (now:)--force-fetch
doesn't change either.NOTE: Using
--force
will still work with its default behavior, but is now a deprecated flag and will be removed soon.Documentation and testing
Updated flag-name in the docs and in the tests.