fix: import-url command exits early on first failure when importing multiple URLs
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Start with cmd/importURL.go and compare the corresponding fix in PR #394 for the import command. Update the import-url loop so every URL is attempted and the command exits with code 1 only when at least one import fails. Verify that later URLs are still processed after an earlier failure.
Written by the indexing model from the issue text.
Description
Why we need this:
When importing multiple comma-separated URLs, if one URL fails,
the command immediately exits and remaining URLs are never imported.
This is the same issue that was fixed in the import command in PR #394.
How this will help:
All URLs should be attempted regardless of individual failures,
giving users complete feedback in one run.
Motivation:
Consistent behavior across all import commands (import, import-url).
Problem
When running:
microcks import-url "https://url1.yaml,https://url2.yaml,https://url3.yaml"
If url1 fails, os.Exit(1) is called immediately inside the loop
and url2, url3 are never imported.
Looking at cmd/importURL.go:
for _, f := range sepSpecificationFiles {
msg, err := mc.DownloadArtifact(f, mainArtifact, secret)
if err != nil {
os.Exit(1) // exits immediately, remaining URLs skipped
}
}
Same bug as #393, fixed in import command via PR #394.
Fix
- Collect errors instead of exiting immediately
- Attempt all URLs regardless of individual failures
- Exit with code 1 only if any URL failed
- Dominant language
- Go
- Stars
- 52
- Forks
- 67
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 13
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microcks/microcks-cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
microcks/microcks-cli#536 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
microcks/microcks-cli#535 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
microcks/microcks-cli#534 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
microcks/microcks-cli#511 ·
-
component/cli kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
microcks/microcks-cli#503 · 4 comments ·
All issues in microcks/microcks-cli
Similar issues
-
kind/bug needs-triage
Difficulty 1/5 Under an hour Newbie friendliness 72/100
matrixorigin/matrixone#29223 ·
-
needs-acceptance wg/data-plane-networking
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vllm-project/semantic-router#4024 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
alexgorbatchev/dotfiles#107 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100