Repository navigation
Conversation
People who use the k6 binary over a network never receive it, so SOURCE.md could not ask them to read build-info.json or run `go version -m` inside the image. Each release now publishes those records instead. - builder.Dockerfile: the reference build, moved out of SOURCE.md into a real file. Besides the binary it writes build-info-<arch>.json (tag, commit, toolkitDir, k6Version, arch, sha256) and go-version-m-<arch>.txt; only those records leave the build (the binary itself is not published). - release.yml: builds both architectures with it and creates the GitHub release for a tag (generated notes, a SOURCE.md link) with the records and their SHA256SUMS. tag-main.yml calls it after tagging, since a tag pushed with GITHUB_TOKEN starts no other workflow; it can also be run by hand to publish an existing tag. - tag-release.sh hands the tag to the next job as a step output. - SOURCE.md identifies a binary by its release tag and points at the release assets for the version, the transitive modules and the rebuild recipe, which now takes toolkitDir from build-info (Go records the checkout directory in the binary). - check-source-md.sh also fails when builder.Dockerfile's Go image or xk6 version drift from SOURCE.md or ci.yml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
People who use the k6 binary over a network never receive it, so SOURCE.md could not tell them to read
build-info.jsonor rungo version -minside the image. Each release now publishes those records, and SOURCE.md points at them.What a release carries (per architecture, built by the reference recipe at that tag)
build-info-<arch>.jsontag,commit,toolkitDir,k6Version,arch, the binary'ssha256go-version-m-<arch>.txtgo version -mof the binary: toolchain, build settings, every linked module with itsh1:checksumSHA256SUMSThe binary itself is not published.
Changes
builder.Dockerfile(new): the reference build, moved out of SOURCE.md into a real file so the release runs exactly the documented recipe. Itsrelease-assetstarget exports only the records..github/workflows/release.yml(new): builds both architectures and creates the release for a tag (generated notes plus a SOURCE.md link), then uploads the records. Inputs reach the shell only throughenvand are checked against^v\d+\.\d+\.\d+$first.tag-main.ymlcalls it after tagging: a tag pushed withGITHUB_TOKENstarts no other workflow, so a tag-push trigger would never fire. It can also be run by hand to publish an existing tag.tag-release.shhands the tag to the next job as a step output (new tests).SOURCE.md: the version section, the toolkit row, the transitive-modules section and the rebuild steps now refer to the release assets, not the image.check-source-md.shalso fails whenbuilder.Dockerfile's Go image or xk6 version drift from SOURCE.md orci.yml(checked that a changed digest, xk6 version or Go patch each fail).Why
toolkitDiris recorded: Go writes the checkout directory into the binary. Building toolkitv0.1.1(linux/amd64, Go 1.26.11, xk6 v1.4.12) twice in the same directory gave the same sha256; a third build in a different directory gave a different one, and the onlygo version -mdifference was the=>line. So a rebuild matches only when it uses the same directory, and consumers that want their binary to match the release must build in/src/xk6-load-toolkit(thebuilder.Dockerfiledefault).Not run here:
release.ymlandbuilder.Dockerfilehave not run yet (no Docker on the authoring machine). The first real run is the merge of this PR. After it, run the Release workflow by hand forv0.1.0(andv0.1.1if the merge tag does not cover it).Overlap: #12 also edits
SOURCE.mdandscripts/check-source-md.sh; whichever lands second needs a small rebase.Tests run:
scripts/tag-release_test.sh,scripts/check-source-md.sh(plus the drift cases above).🤖 Generated with Claude Code