deckhouse / deckhouse/deckhouse-cli

mirror: --only-extra-images pulls nothing without an explicit version constraint

Open Beginner friendly
#426 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
20
Forks
7
Avg merge
3d 16h
Merged PRs (30d)
33

Description

Summary

d8 mirror pull --only-extra-images silently pulls nothing for a module/package unless that module/package is given an explicit version constraint. There is no error — the run looks successful but produces an empty (or extra-image-less) result.

Details

In --only-extra-images mode:

  • internal/mirror/modules/modules.godiscoverChannelVersions short-circuits to nil when OnlyExtraImages is set, so no release-channel versions are resolved.
  • listTagsIfConstrained returns nil when the module has no version constraint (a bare --include-module foo) or an exact-tag constraint.
  • Therefore moduleVersions is empty, and pullExtraImages(ctx, name, versions, ...)findExtraImages(ctx, name, versions) finds nothing, because extra images are discovered per resolved version.

The packages path behaves the same way.

Impact

d8 mirror pull --only-extra-images (with a default/all filter or a bare --include-module foo) exits 0 having pulled no extra images. To get anything, the user must pass a version constraint, e.g. --include-module foo@^1.0.0. This requirement is not obvious.

Expected

When --only-extra-images is set, require an explicit version constraint on the affected includes (fail validation with a clear message), or clearly document the requirement.

As of main (62132d6a).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in internal/mirror/modules/modules.go by tracing discoverChannelVersions, listTagsIfConstrained, and the call from pullExtraImages to findExtraImages. Compare the module and packages paths for --only-extra-images with bare and exact-tag includes. Done means the requirement is either enforced with a clear validation message or documented clearly for affected includes.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.