Skip to content
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

kctrl: Re-running "kctrl package init" deletes info from vendir.yml #966

Closed
ThomasVitale opened this issue Nov 2, 2022 · 3 comments · Fixed by #972
Closed

kctrl: Re-running "kctrl package init" deletes info from vendir.yml #966

ThomasVitale opened this issue Nov 2, 2022 · 3 comments · Fixed by #972
Labels
bug This issue describes a defect or unexpected behavior carvel-accepted This issue should be considered for future work and that the triage process has been completed cli Issue for kapp-controller cli priority/important-soon Must be staffed and worked on currently or soon.

Comments

@ThomasVitale
Copy link
Contributor

What steps did you take:
It seems that a regression has been introduce in v0.42.0 affecting the behaviour of the kctrl CLI when running kctrl package init a second time.

  1. Get an existing Carvel package based on an upstream tool: git clone https://github.com/arktonix/package-for-knative-eventing.git
  2. Navigate to the package directory: cd package
  3. Run kctrl package init

What happened:
The upstream repository name and version are deleted from the vendir.yml file and I'm asked to insert them again via the CLI.

What did you expect:
The kctrl package init command should use the information already provided and stored in vendir.yml and package-build.yml, just like it used to do in previous versions.

Anything else you would like to add:
I noticed that the CLI works correctly when the upstream manifests come from a Git repository source (option 4). Instead, it doesn't work correctly when the source is a GitHub release (option 2), resulting in the vendir.yml info being deleted.

Environment:

  • kapp Controller version: v0.42.0
  • Kubernetes version (use kubectl version): v1.25.3

Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

@ThomasVitale ThomasVitale added bug This issue describes a defect or unexpected behavior carvel-triage This issue has not yet been reviewed for validity labels Nov 2, 2022
@ThomasVitale ThomasVitale changed the title kctrl: re-running "kctrl package init" deletes info from vendir.yml kctrl: Re-running "kctrl package init" deletes info from vendir.yml Nov 2, 2022
@100mik
Copy link
Contributor

100mik commented Nov 3, 2022

The expected behaviour is that init will load defaults from the file.
If run with the --yes flag, it will simply use the defaults instead of prompting the user.

I am going to verify this ^

Another issue that @mamachanko pointed out is that kctrl overwrites comments and rearranges keys in PackageBuild when the user runs init/release. This is something we will be creating an issue for

@rohitagg2020 rohitagg2020 added the cli Issue for kapp-controller cli label Nov 10, 2022
@renuy renuy added carvel-accepted This issue should be considered for future work and that the triage process has been completed priority/important-soon Must be staffed and worked on currently or soon. and removed carvel-triage This issue has not yet been reviewed for validity labels Nov 10, 2022
@100mik
Copy link
Contributor

100mik commented Nov 10, 2022

@ThomasVitale looks like it is a regression :(
Gonna take a closer look at it (the other issue I mentioned is unrelated)

@ThomasVitale
Copy link
Contributor Author

@100mik thanks for looking into this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue describes a defect or unexpected behavior carvel-accepted This issue should be considered for future work and that the triage process has been completed cli Issue for kapp-controller cli priority/important-soon Must be staffed and worked on currently or soon.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants