Skip to content

fix(versions): pin the trunk to published releases and fix released pin headers - #710

Open
Aleksei Sviridkin (lexfrei) wants to merge 2 commits into
mainfrom
fix/trunk-version-pins-refresh
Open

Aleksei Sviridkin (lexfrei) wants to merge 2 commits into
mainfrom
fix/trunk-version-pins-refresh

Conversation

@lexfrei

@lexfrei Aleksei Sviridkin (lexfrei) commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Two fixes in the pipeline behind data/versions/*.yaml.

A plain make update-all could pin the trunk to a release that does not exist yet. With no --cozystack-tag, hack/update_versions.sh took the newest upstream git tag, but a tag exists as soon as it is pushed, while its GitHub release can still be a draft with no assets. That is how the trunk once ended up on v1.5.3 with every releases/download URL returning 404. The default now comes from the GitHub releases API: the highest published, non-draft, non-prerelease release. It sorts by version rather than creation time, because a patch of an older minor can be published after a newer minor. An explicit --cozystack-tag still wins. If the API request fails or finds nothing published, the script exits with an error and leaves the pin file untouched. make update-all without a tag now needs jq, so the required-tools lists in CLAUDE.md and CONTRIBUTING.md both name it.

hack/release_next.sh copied next.yaml into the new vX.Y.yaml verbatim, so released files kept the trunk header saying make update-all regenerates them. The snapshot now gets its own header, and v1.6.yaml, the only released file that had the trunk header, is corrected. Only comments change, no pinned value moves.

hack/test_version_pins.sh is an offline self-check. It feeds the resolver release lists with a draft, a prerelease, an older-minor patch created last and nothing published, and runs release_next.sh in a sandbox to check the header and values. Against the live API the script produces exactly the committed next.yaml. hugo --gc --minify passes.

@netlify

netlify Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cozystack ready!

Name Link
🔨 Latest commit 78a34c4
🔍 Latest deploy log https://app.netlify.com/projects/cozystack/deploys/6ab3d392f70cd60008b59c7c
😎 Deploy Preview https://deploy-preview-710--cozystack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 22a6f82f-106e-4e7e-bf44-71899d3f2112


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lexfrei
Aleksei Sviridkin (lexfrei) force-pushed the fix/trunk-version-pins-refresh branch 3 times, most recently from 973f32f to 88c740b Compare September 23, 2026 13:21
update_versions.sh picked the default cozystack_tag from the upstream
git tag list. A tag exists as soon as it is pushed, while its GitHub
release can still be a draft with no assets, so the trunk could be
pinned to a version whose releases/download URLs all return 404.

Resolve the default from the GitHub releases API instead, keeping only
published, non-draft, non-prerelease releases and taking the highest
version rather than the newest one, since a patch of an older minor can
be created after a newer minor. An explicit --cozystack-tag still wins.
An optional GITHUB_TOKEN goes to curl on stdin rather than in argv, so
it never shows up in a process listing. Without a tag the script needs
jq and says so when it is missing, instead of reporting that upstream
has no published release. CLAUDE.md and CONTRIBUTING.md now list jq as
a required tool.

hack/test_version_pins.sh is an offline self-check that feeds the
resolver release-list fixtures and runs the script against a stub curl
to check where the token goes and the missing-jq error.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
release_next.sh copied next.yaml into the new vX.Y.yaml verbatim, so a
released pin file kept the trunk header saying 'make update-all'
regenerates it to track upstream main. That is false for a released
file, which update-all never touches.

Rewrite the leading comment block and the trunk wording in the section
comments when snapshotting, and correct v1.6.yaml, the one released
file that carried the trunk header. The header does not repeat the
pinned version: patch releases bump the values by hand, and a copy in
the comment would go stale. Only comments change; no pinned value
moves.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>

This branch has not been deployed

No deployments
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.

1 participant