fix(docs): Replace hardcoded main-branch references with DOCS_VAR_CLP_GIT_REF.#1885
Conversation
WalkthroughRepository documentation updates replace hardcoded main-branch references with a branch-specific variable Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@docs/src/user-docs/guides-k8s-deployment.md`:
- Around line 586-589: Replace the absolute GitHub URL assigned to the link
reference [clp-helm-chart] with a relative repository path so the docs reference
the in-repo Helm chart at the same commit; locate the link definition for
[clp-helm-chart] and change its target from
"https://github.com/y-scope/clp/tree/DOCS_VAR_CLP_GIT_REF/tools/deployment/package-helm"
to a relative path like "tools/deployment/package-helm/" (or the
doc-build-supported relative syntax) so the docs point to the in-repo chart
instead of a hardcoded GitHub URL.
| [aks]: https://azure.microsoft.com/en-us/products/kubernetes-service | ||
| [api-server]: guides-using-the-api-server.md | ||
| [Cilium]: https://cilium.io/ | ||
| [clp-helm-chart]: https://github.com/y-scope/clp/tree/main/tools/deployment/package-helm | ||
| [clp-helm-chart-values]: https://github.com/y-scope/clp/blob/main/tools/deployment/package-helm/values.yaml | ||
| [clp-helm-chart]: https://github.com/y-scope/clp/tree/DOCS_VAR_CLP_GIT_REF/tools/deployment/package-helm |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Prefer a relative repo path for the Helm chart link.
The chart is in-repo; using a relative path keeps docs and referenced files on the same commit and avoids hardcoded GitHub URLs. Based on learnings, consider replacing the GitHub link with a relative path to tools/deployment/package-helm/ if the docs build supports it.
Based on learnings, ...
🤖 Prompt for AI Agents
In `@docs/src/user-docs/guides-k8s-deployment.md` around lines 586 - 589, Replace
the absolute GitHub URL assigned to the link reference [clp-helm-chart] with a
relative repository path so the docs reference the in-repo Helm chart at the
same commit; locate the link definition for [clp-helm-chart] and change its
target from
"https://github.com/y-scope/clp/tree/DOCS_VAR_CLP_GIT_REF/tools/deployment/package-helm"
to a relative path like "tools/deployment/package-helm/" (or the
doc-build-supported relative syntax) so the docs point to the in-repo chart
instead of a hardcoded GitHub URL.
There was a problem hiding this comment.
We're linking to a directory, so it doesn't seem to work with sphinx.
There was a problem hiding this comment.
@kirkrodrigues, thank you for the clarification! You're absolutely right—Sphinx doesn't support relative paths for directory links in the same way it does for files. Using the GitHub URL with DOCS_VAR_CLP_GIT_REF is the appropriate solution here, as it still keeps the link version-agnostic (which was the goal of this PR) while working within Sphinx's limitations.
The approach you've taken accomplishes the same goal as using relative paths: ensuring the documentation links point to resources at the correct version/commit.
ヾ(•ω•`)o
✏️ Learnings added
Learnt from: kirkrodrigues
Repo: y-scope/clp PR: 1885
File: docs/src/user-docs/guides-k8s-deployment.md:586-589
Timestamp: 2026-01-19T12:06:17.530Z
Learning: In the y-scope/clp project documentation built with Sphinx, relative paths work for linking to files within the repository, but directory links require GitHub URLs. When linking to directories (e.g., the Helm chart at tools/deployment/package-helm/), use GitHub URLs with DOCS_VAR_CLP_GIT_REF to keep them version-agnostic.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
🧠 Learnings used
Learnt from: junhaoliao
Repo: y-scope/clp PR: 1818
File: tools/deployment/package-helm/templates/configmap.yaml:12-12
Timestamp: 2025-12-19T05:03:42.629Z
Learning: In the y-scope/clp Helm chart, the `api_server.host` configuration field in the ConfigMap (tools/deployment/package-helm/templates/configmap.yaml) is unused because no other k8s internal services need to reach the API server—it's only accessed from outside the cluster via NodePort.
Learnt from: Bill-hbrhbr
Repo: y-scope/clp PR: 1261
File: docs/src/dev-guide/components-core/manylinux-2-28-deps-install.md:24-24
Timestamp: 2025-08-25T06:32:48.313Z
Learning: In the CLP project documentation, when linking to scripts or other files within the repository, use relative paths (e.g., components/core/tools/scripts/...) rather than commit-pinned GitHub URLs to ensure docs and referenced files always belong to the same commit and stay synchronized.
Learnt from: junhaoliao
Repo: y-scope/clp PR: 1466
File: .github/workflows/clp-rust-checks.yaml:14-15
Timestamp: 2025-10-22T21:14:12.225Z
Learning: Repository y-scope/clp: In GitHub Actions workflows (e.g., .github/workflows/clp-rust-checks.yaml), YAML anchors/aliases are acceptable and preferred to avoid duplication; if actionlint flags an alias node (e.g., on push.paths) as an error, treat it as a tool limitation and do not require inlining unless the team asks to silence the warning.
Learnt from: junhaoliao
Repo: y-scope/clp PR: 0
File: :0-0
Timestamp: 2025-10-22T21:02:31.113Z
Learning: Repository y-scope/clp: Maintain deterministic CI/builds for Rust; add a check to verify Cargo.lock is in sync with Cargo.toml without updating dependencies (non-mutating verification in clp-rust-checks workflow).
Learnt from: junhaoliao
Repo: y-scope/clp PR: 1405
File: components/clp-package-utils/pyproject.toml:5-15
Timestamp: 2025-10-13T03:24:35.074Z
Learning: In the y-scope/clp repository, the Python 3.9 to 3.10 version requirement change was intentionally deferred to a separate PR (after PR `#1405`) to reduce review effort, as decided in an offline discussion between junhaoliao and kirkrodrigues.
junhaoliao
left a comment
There was a problem hiding this comment.
shall we update this one too?
otherwise, the PR is good to go
|
the current title doesn't fully reflect the change in the doc link (though i agree technically it's still dealing with the git branch reference). would this title be more clear and accurate? |
DOCS_VAR_CLP_GIT_REF.main-branch references with DOCS_VAR_CLP_GIT_REF.
How about the new title? |
Description
In the new Kubernetes guide (added in #1827):
main, which can go out of sync with a specific release.This PR addresses both issues by using
DOCS_VAR_CLP_GIT_REF:git clonecommand we ask users to use now includes--branch DOCS_VAR_CLP_GIT_REFso that the specific reference is cloned.DOCS_VAR_CLP_GIT_REFinstead ofmain.Checklist
breaking change.
Validation performed
task docs:servemain).Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.