fix(docs): stop autoupdate PRs from rewriting source URLs every run#516
fix(docs): stop autoupdate PRs from rewriting source URLs every run#516myasnikovdaniil wants to merge 2 commits intomainfrom
Conversation
`hack/update_apps.sh` writes a `source:` URL into every generated file. It previously used the same git ref for both fetching READMEs and rendering that URL — which meant every patch release rewrote `source:` from `release-X.Y` → `vX.Y.Z`, and the daily cron rewrote it again to `main`. Result: every auto-update PR touched ~30 files solely to flip the ref. Add an optional `--source-ref REF` flag to `update_apps.sh` (defaults to `--branch` for backward compat) and derive a stable `SOURCE_REF` in the Makefile from `DOC_VERSION`: v0 → main (legacy bucket, preserves current state) vX.Y → release-X.Y (long-lived upstream branch for that minor) Fetch still uses the exact tag (BRANCH) for reproducibility; only the displayed URL is stabilized. No change to caller signatures (`make update-all RELEASE_TAG=…` for the upstream tags workflow, `make update-all DOC_VERSION=…` for the daily cron) — both keep working. Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
The v1.0 generated docs all stamped `release-1.2.1` as the source ref (left behind from a stale generation pass). Realign them with the versioned scheme introduced in the previous commit, so v1.0 docs link to upstream READMEs on the `release-1.0` branch. Surgical sed-replace of the source URL line only — no content changes. Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
✅ Deploy Preview for cozystack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (27)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a SOURCE_REF variable to decouple the Git reference used for fetching content from the one displayed in the "source" URL of generated documentation. This change ensures that documentation URLs remain stable across patch releases. The Makefile and hack/update_apps.sh script have been updated to support this new parameter, and various documentation files were updated to use the correct release reference. I have no feedback to provide.
Summary
source:URL ref in synced docs from thefetch branch so patch releases and the daily cron stop flipping it
on every run.
v1.0/source URLs (which stampedrelease-1.2.1)to
release-1.0.Context
Auto-update PRs from this repo's daily cron, and from
cozystack/cozystack's releasetags.yaml, were touching ~30 files per run for nothing more than swapping thesource:line betweenmain,release-1.X, andvX.Y.Z. The fetch ref and the displayed ref were the same value.hack/update_apps.shnow accepts an optional--source-ref REF(defaults to--branchfor backward compat). The Makefile derives a stableSOURCE_REFfromDOC_VERSION:DOC_VERSIONSOURCE_REFv0main(legacy, preserves current state)vX.Y(X≥1)release-X.YFetch still uses
BRANCH(the exact tag for reproducibility).Caller compatibility
cozystack/cozystacktags.yaml:make update-all BRANCH=… RELEASE_TAG=…— unchanged.update-managed-apps.yaml:make update-all DOC_VERSION=…— unchanged.hack/update_apps.shruns without--source-ref: falls back to--branch(no behavior change).fill_templates.shdoesn't touchsource:URLs, so no changes there.Test plan
make -n update-apps→--source-ref release-1.2make -n update-apps RELEASE_TAG=v1.0.5→--source-ref release-1.0, fetch fromv1.0.5make -n update-apps RELEASE_TAG=v1.2.5→--source-ref release-1.2, fetch fromv1.2.5make -n update-apps RELEASE_TAG=v0.30.5→--source-ref main, fetch fromv0.30.5release-1.0README URLs used in v1.0 docs return 200--source-reffalls back to--branch(verified in temp dir)cozystack/cozystackrelease) should be small — touching only files whose upstream README content actually changed.