Skip to content

kbld appends duplicate preresolved origin #206

Open
@gabegorelick

Description

@gabegorelick

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue describes a defect or unexpected behaviorcarvel acceptedThis issue should be considered for future work and that the triage process has been completedpriority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.

    Type

    No type

    Projects

    • Status

      To Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions