carvel-dev / carvel-dev/imgpkg

Incorrect parsing of image URL provided in the command line

Open
#154 5 comments 0 reactions 0 assignees View on GitHub
can be replicated carvel accepted discussion enhancement priority/unprioritized-backlog
Dominant language
Go
Stars
284
Forks
70
PR merge metrics
No merged PRs in 30d

Description

**What steps did you take:**
Try to pull a bundle while providing the protocol (e.g. `https://`, `http://`) as part URL fails with a strange error

**What happened:**
```
imgpkg pull -b https://index.docker.io/k8slt/demo-repo@sha256:aef6d96cde8e41fbdd67202106c89a5c55bd0cd47398de619a60a4ae06a3e388 -o /tmp/lol
Error: Checking if image is bundle: Collecting images: Working with https://index.docker.io/k8slt/demo-repo@sha256:aef6d96cde8e41fbdd67202106c89a5c55bd0cd47398de619a60a4ae06a3e388: Get "https://https/v2/": dial tcp: lookup https on 10.21.82.100:53: no such host
```

**What did you expect:**
The bundle to be pulled. If you execute without the protocol is works
```
imgpkg pull -b https://index.docker.io/k8slt/demo-repo@sha256:aef6d96cde8e41fbdd67202106c89a5c55bd0cd47398de619a60a4ae06a3e388 -o /tmp/lol
Pulling bundle 'index.docker.io/k8slt/demo-repo@sha256:aef6d96cde8e41fbdd67202106c89a5c55bd0cd47398de619a60a4ae06a3e388'
Extracting layer 'sha256:34de6e22982f89d95517c1cdb76e4d81f6a0735c78f89c56ab7a627b785b0aad' (1/1)

Locating image lock file images...
One or more images not found in bundle repo; skipping lock file update

Succeeded
```

**Anything else you would like to add:**
[Additional information that will assist in solving the issue.]

**Environment:**

- imgpkg version (use `imgpkg --version`): 0.8.0
- Docker registry used (e.g. `Docker HUB`): docker hub, but is unrelated
- OS (e.g. from `/etc/os-release`): MacOS

---
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 to work on this issue.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported `imgpkg pull -b https://...` command and compare it with the working command without the protocol. Trace the `imgpkg pull` URL parsing and registry request path, then add regression coverage showing that `http://` and `https://` bundle URLs are accepted and pulled successfully without breaking protocol-less URLs.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.