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

kbld appends duplicate preresolved origin #206

Open
gabegorelick opened this issue Dec 21, 2021 · 3 comments
Open

kbld appends duplicate preresolved origin #206

gabegorelick opened this issue Dec 21, 2021 · 3 comments
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 priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@gabegorelick
Copy link

What steps did you take:

  1. Run kbld -f foo.yaml --imgpkg-lock-output lock.yaml
  2. Rerun kbld with the resulting ImagesLock file: kbld -f foo.yaml -f lock.yaml --imgpkg-lock-output lock.yaml
  3. Notice you now have a preresolved entry under kbld.carvel.dev/origins. So far so good.
  4. Run kbld again with the lockfile: kbld -f foo.yaml -f lock.yaml --imgpkg-lock-output lock.yaml
  5. Notice that the lockfile now has duplicate entries for preresolved

What happened:
In general, every time you run kbld while passing in the lockfile, kbld will append another preresolved entry.

Example:

---
apiVersion: imgpkg.carvel.dev/v1alpha1
images:
- annotations:
    kbld.carvel.dev/id: fluent/fluent-bit:x86_64-1.7.9
    kbld.carvel.dev/origins: |
      - resolved:
          tag: x86_64-1.7.9
          url: fluent/fluent-bit:x86_64-1.7.9
      - preresolved:
          url: index.docker.io/fluent/fluent-bit@sha256:8e3fdc011d3ff98502143650dfa3261860b11f1f289dbb3184c630f71236a366
      - preresolved:
          url: index.docker.io/fluent/fluent-bit@sha256:8e3fdc011d3ff98502143650dfa3261860b11f1f289dbb3184c630f71236a366
  image: index.docker.io/fluent/fluent-bit@sha256:8e3fdc011d3ff98502143650dfa3261860b11f1f289dbb3184c630f71236a366
kind: ImagesLock

What did you expect:
Stop after the first addition of preresolved.

Anything else you would like to add:
https://kubernetes.slack.com/archives/CH8KCCKA5/p1640125213244500?thread_ts=1640041938.237600&cid=CH8KCCKA5

Environment:

  • kbld version (use kbld --version): 0.32.0
  • Docker registry used (e.g. Docker HUB): n/a
  • OS (e.g. from /etc/os-release): macOS

If building images using docker: n/a

  • Docker CLI Version (e.g. docker version)

If building images using buildkit: n/a

  • Buildkit version (e.g. kubectl buildkit version):
  • Kubernetes version (e.g. kubectl version):

If building images using pack

  • Pack Version (e.g. pack version):

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.

@gabegorelick gabegorelick added bug This issue describes a defect or unexpected behavior carvel triage This issue has not yet been reviewed for validity labels Dec 21, 2021
@gcheadle-vmware
Copy link
Contributor

Hi @gabegorelick,

Thank you for pointing out this bug, I agree that the duplicate preresolved origin should probably not be there and could cause confusion. Additionally, in CI we want the same inputs to create the same outputs. For those reasons we agree that kbld should not append duplicate preresolved entries in the origins.

@gcheadle-vmware gcheadle-vmware added carvel accepted This issue should be considered for future work and that the triage process has been completed priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed carvel triage This issue has not yet been reviewed for validity labels Jan 4, 2022
@DennisDenuto
Copy link
Contributor

Hi @gabegorelick

We have merged this PR into develop. Assuming all goes well, expect to see this bug fix in the next kbld release!

@aaronshurley aaronshurley moved this to To Triage in Carvel Jul 25, 2022
@github-project-automation github-project-automation bot moved this to To Triage in Carvel Feb 14, 2023
@ChristianCiach
Copy link

Should this issue be closed? The MR has been merged well over a year ago.

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 priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
Status: To Triage
Development

No branches or pull requests

4 participants