Skip to content

fix(go_modules_check): tolerate deckhouse monorepo in go list -m all#71

Merged
Nikolay1224 merged 2 commits into
mainfrom
fix/go-modules-check-deckhouse-monorepo
Apr 27, 2026
Merged

fix(go_modules_check): tolerate deckhouse monorepo in go list -m all#71
Nikolay1224 merged 2 commits into
mainfrom
fix/go-modules-check-deckhouse-monorepo

Conversation

@duckhawk
Copy link
Copy Markdown
Member

Problem

go_modules_check runs go list -m all | grep deckhouse. For modules that require github.com/deckhouse/deckhouse, Go 1.25+ can report transitive module lines such as github.com/deckhouse/deckhouse/dhctl@v0.0.0-00010101000000-000000000000 that make go list -m all exit non-zero, so the composite step fails before any pseudo-tag logic.

actions/setup-go also warned when there is no root go.sum for cache.

Change

  • Set GOFLAGS=-e so the module graph loads despite those synthetic entries.
  • Skip placeholder pseudo v0.0.0-00010101000000-000000000000 and any github.com/deckhouse/deckhouse/* path (the script’s api/* clone heuristic does not apply to in-repo submodule paths).
  • Skip pseudo validation for the root github.com/deckhouse/deckhouse require when the version is not v0.0.0-<14-digit time>-<12-hex> (the only shape this action can validate today).
  • Enable Go module cache via cache-dependency-path: **/go.sum.

Backport

Same commit is on fix/go-modules-check-deckhouse-monorepo-v12 for a PR into v12 (see separate PR).

- Export GOFLAGS=-e so go list -m all does not fail on synthetic
  transitive pseudo-versions under github.com/deckhouse/deckhouse.
- Skip placeholder v0.0.0-00010101000000-000000000000 and paths
  github.com/deckhouse/deckhouse/* (api/* pseudo check does not apply).
- Skip root github.com/deckhouse/deckhouse pins that are not
  v0.0.0-<14-digit time>-<12-hex> (script only validates that shape).
- Point setup-go module cache at **/go.sum (no root go.sum required).

Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
@duckhawk duckhawk requested a review from Nikolay1224 as a code owner April 27, 2026 12:50
Module repos often have no root go.sum; caching is optional and not
required for the go list / pseudo-tag checks.

Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
@Nikolay1224 Nikolay1224 merged commit 8e039f8 into main Apr 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants