Skip to content

fix(docs): stop autoupdate PRs from rewriting source URLs every run#516

Open
myasnikovdaniil wants to merge 2 commits intomainfrom
fix/stable-source-ref
Open

fix(docs): stop autoupdate PRs from rewriting source URLs every run#516
myasnikovdaniil wants to merge 2 commits intomainfrom
fix/stable-source-ref

Conversation

@myasnikovdaniil
Copy link
Copy Markdown
Contributor

Summary

  • Decouple the displayed source: URL ref in synced docs from the
    fetch branch so patch releases and the daily cron stop flipping it
    on every run.
  • Realign existing v1.0/ source URLs (which stamped release-1.2.1)
    to release-1.0.

Context

Auto-update PRs from this repo's daily cron, and from cozystack/cozystack's release tags.yaml, were touching ~30 files per run for nothing more than swapping the source: line between main, release-1.X, and vX.Y.Z. The fetch ref and the displayed ref were the same value.

hack/update_apps.sh now accepts an optional --source-ref REF (defaults to --branch for backward compat). The Makefile derives a stable SOURCE_REF from DOC_VERSION:

DOC_VERSION SOURCE_REF
v0 main (legacy, preserves current state)
vX.Y (X≥1) release-X.Y

Fetch still uses BRANCH (the exact tag for reproducibility).

Caller compatibility

  • Upstream cozystack/cozystack tags.yaml: make update-all BRANCH=… RELEASE_TAG=… — unchanged.
  • Website daily cron update-managed-apps.yaml: make update-all DOC_VERSION=… — unchanged.
  • Standalone hack/update_apps.sh runs without --source-ref: falls back to --branch (no behavior change).
  • fill_templates.sh doesn't touch source: URLs, so no changes there.

Test plan

  • make -n update-apps--source-ref release-1.2
  • make -n update-apps RELEASE_TAG=v1.0.5--source-ref release-1.0, fetch from v1.0.5
  • make -n update-apps RELEASE_TAG=v1.2.5--source-ref release-1.2, fetch from v1.2.5
  • make -n update-apps RELEASE_TAG=v0.30.5--source-ref main, fetch from v0.30.5
  • HEAD-checked all release-1.0 README URLs used in v1.0 docs return 200
  • Standalone script run without --source-ref falls back to --branch (verified in temp dir)
  • Next post-merge auto-update PR (daily cron at 03:00 UTC, or next cozystack/cozystack release) should be small — touching only files whose upstream README content actually changed.

`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>
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 28, 2026

Deploy Preview for cozystack ready!

Name Link
🔨 Latest commit a2e6517
🔍 Latest deploy log https://app.netlify.com/projects/cozystack/deploys/69f0ab4e0c4c9b0008c52f0f
😎 Deploy Preview https://deploy-preview-516--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
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 28, 2026

Warning

Rate limit exceeded

@myasnikovdaniil has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 18 minutes and 59 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 05e70d45-c1b9-43e7-9811-48be5656ca64

📥 Commits

Reviewing files that changed from the base of the PR and between bc2745e and a2e6517.

📒 Files selected for processing (27)
  • Makefile
  • content/en/docs/v1.0/applications/clickhouse.md
  • content/en/docs/v1.0/applications/foundationdb.md
  • content/en/docs/v1.0/applications/harbor.md
  • content/en/docs/v1.0/applications/kafka.md
  • content/en/docs/v1.0/applications/mariadb.md
  • content/en/docs/v1.0/applications/mongodb.md
  • content/en/docs/v1.0/applications/nats.md
  • content/en/docs/v1.0/applications/openbao.md
  • content/en/docs/v1.0/applications/postgres.md
  • content/en/docs/v1.0/applications/qdrant.md
  • content/en/docs/v1.0/applications/rabbitmq.md
  • content/en/docs/v1.0/applications/redis.md
  • content/en/docs/v1.0/applications/tenant.md
  • content/en/docs/v1.0/kubernetes/_index.md
  • content/en/docs/v1.0/networking/http-cache.md
  • content/en/docs/v1.0/networking/tcp-balancer.md
  • content/en/docs/v1.0/networking/vpc.md
  • content/en/docs/v1.0/networking/vpn.md
  • content/en/docs/v1.0/operations/services/bootbox.md
  • content/en/docs/v1.0/operations/services/etcd.md
  • content/en/docs/v1.0/operations/services/ingress.md
  • content/en/docs/v1.0/operations/services/monitoring/parameters.md
  • content/en/docs/v1.0/operations/services/seaweedfs.md
  • content/en/docs/v1.0/virtualization/vm-disk.md
  • content/en/docs/v1.0/virtualization/vm-instance.md
  • hack/update_apps.sh
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/stable-source-ref

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 and usage tips.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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