Skip to content

build: add /v6 major version suffix to the module path - #4487

Merged
stevenvegt merged 10 commits into
V6.2from
V6_2/module-major-suffix
Sep 9, 2026
Merged

build: add /v6 major version suffix to the module path#4487
stevenvegt merged 10 commits into
V6.2from
V6_2/module-major-suffix

Conversation

@stevenvegt

@stevenvegt stevenvegt commented Sep 9, 2026

Copy link
Copy Markdown
Member

Implements #4485 for the V6.2 branch: the module path becomes github.com/nuts-foundation/nuts-node/v6, which makes the v6.x tags valid module versions. That is what lets security advisories name our fix versions and lets scanners match images against them. See the issue for the reasoning.

This PR is the rename only:

  • gomajor path -version v6 rewrote go.mod and every import.
  • The existing ldflags -X keys in the build files and the go_package options in the two .proto files carry the new path. gomajor does not touch those.

Nothing else changes. How the version reaches the binary (git stamping in the Docker build, .dockerignore, checkout depth, makefile and workflow adjustments) is a separate concern and follows in its own PR, per review feedback on #4490. The branch history shows those commits and their removal; the squash merge keeps only the rename.

Verified locally: the repo builds, go mod tidy changes nothing beyond the module line, and no Go file imports the un-suffixed path.

Follow-ups: downstream importers must switch to the /v6 import path to receive newer versions; after the first tag on this branch, the repository advisory can name the /v6 package with that tag as the patched version.

Rewritten with "gomajor path -version v6", plus the ldflags -X keys in
the Dockerfile, makefile and binaries workflow, and the go_package
option in the two .proto files, which gomajor does not touch.

Refs #4485

Assisted-by: AI
The ldflags -X keys in the Dockerfile, makefile and binaries workflow
now take the module path from "go list -m" instead of hardcoding it, so
a major version bump only touches go.mod, the imports and the .proto
go_package options. "make bump-major" does all of those.

.dockerignore now excludes only untracked files. Excluding tracked files
made "git status" inside the builder report deletions, which stamped the
version as "+dirty".

Assisted-by: AI
@qltysh

qltysh Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

All good ✅

- persist-credentials: false and a read-only permissions block in the
  images workflow (zizmor artipacked and excessive-permissions, both
  pre-existing but surfaced by the edited checkout step)
- hadolint DL3018 ignore on the git install; alpine drops old package
  versions from its repositories, so pinning breaks builds
- gofmt of an import line that lost its tab in the merge from V6.2

Assisted-by: AI
Review feedback: how the version reaches the binary (git stamping in the
Docker build, .dockerignore, checkout depth, makefile and workflow
changes) is a separate concern and moves to a follow-up PR. This commit
returns the branch to the rename only: gomajor rewrite, the module path
in the existing ldflags keys, and the .proto go_package options.

Assisted-by: AI
@stevenvegt
stevenvegt merged commit fe01eea into V6.2 Sep 9, 2026
6 of 7 checks passed
@stevenvegt
stevenvegt deleted the V6_2/module-major-suffix branch September 9, 2026 10:13
reinkrul pushed a commit that referenced this pull request Sep 9, 2026
The subtest waited until the receiver callback had run twice and then
read the persisted event, expecting two retries. notifyNow increments
and writes the retry count only after the callback returns, so on a
loaded runner the read could land between the second callback and its
write and observe one retry. Same race as fixed for TestNotifier_Notify
in #4274; observed on #4487.

The subtest now waits for the persisted retry count and checks that
the callback ran at least that often.

Assisted-by: AI
(cherry picked from commit 9fddb35)
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.

Add /v5 and /v6 major version suffix to the module path so advisories and scanners can match releases

2 participants