-
Notifications
You must be signed in to change notification settings - Fork 230
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
kpt pkg update
overwrites local changes to Kptfile
#2529
Comments
@jafcrocker This is a known issue with merging pipeline section in Kptfile. Please refer to this comment for the reason behind this behavior. While this item is on our backlog, we want to know how blocked are you on this issue to prioritize it appropriately. However, I want to know use-case further and see if I can help with a possible workaround. To summarize the issue:
I think you might have added the apply-setters function back manually after cc @mikebz |
Regarding (4), the reasons are twofold:
|
@jafcrocker I have a few questions (if it is okay for you to share them here):
What factors influenced your decision to moved to the new model?
Programmatic customizations can be done by functions in the parent, but I am curious about the manual edits, how are you achieving those. |
We have been able to make all necessary edits via a combination of existing and custom kpt functions in the parent. We commonly use search-replace, create-setters/apply-setters, and set-annotations/set-namespace/set-labels. We have a custom function that allows us to apply We haven't used this model extensively, so we may yet run into problems, but so far it's working out well. |
@jafcrocker This request has been addressed. Please try out beta.12 version of kpt which will be released soon. |
Expected behavior
Performing a
kpt pkg update
should merge changes to the Kptfile committed to the local directory with changes from the source package.Actual behavior
Performing a
kpt pkg update
overwrites changes to the Kptfile committed to the local directory with changes from the source directory.Information
Items of possible interest:
.pipeline
)Steps to reproduce the behavior
1) Inspect the package source. Note the changes to the Kptfile
2) Change to the repo that instantiates the package; switch to the commit that updates the version.
3) Inspect the current state of the Kptfile
4) Update the package
5) Inspect the results of the update.
Note that the local changes (i.e., apply-setters) were overwritten by the changes from the source package (i.e., set-annotations).
The text was updated successfully, but these errors were encountered: