Repository navigation
chore(tekton): move the version CLI pin to the commit that fixes it - #5565
Conversation
The version-CLI step runs `scripts/flow/build/versioning-strategy.ts` from a commit-pinned URL, so the fix that makes a released version require a tag trigger only takes effect once the pin points at it. Move the pin from the pre-fix commit to the merge commit that carries the change. Verified: the pinned URL returns 200 and serves the fixed script, and the Tekton task tests pass (37 tests, 0 failures).
|
/approve |
There was a problem hiding this comment.
I have already done a preliminary review for you, and I hope to help you do a better job.
Summary:
This PR updates the pinned commit hash in the Tekton pipeline task pingcap-get-set-release-version.yaml for the version CLI script URL from 10bcc6134c6... to 32e6febe3b9... to include a critical fix from a merged PR (#5564). The change is minimal and focused, correctly addressing the need to have the fixed script version used in the pipeline, verified by tests and HTTP status. Overall, this is a precise and necessary improvement with no obvious issues.
Code Improvements
-
Pinning Strategy Robustness
- File:
tekton/v1/tasks/pingcap-get-set-release-version.yaml(line ~85) - Issue: Pinning to a specific commit hash ensures stability but requires manual updates for every fix. This can lead to drift or outdated pins if not carefully maintained.
- Suggestion: Consider whether pinning to a tag or a branch ref (e.g., a stable release tag or a
mainbranch at a specific point) is feasible to reduce manual pin updates. If commit pinning is mandatory, ensure there is a documented process or automation to keep this updated when fixes are merged.
- File:
-
URL Readability and Maintainability
- File: same as above
- Issue: The URL includes a long commit hash inline, which is hard to visually parse and prone to copy-paste errors.
- Suggestion: Extract the commit hash into a variable or comment above the URL explaining which commit it references and why. This will help future maintainers understand the pinning rationale quickly.
Best Practices
-
Documentation
-
File:
tekton/v1/tasks/pingcap-get-set-release-version.yaml -
Issue: The commit hash update lacks inline comments explaining the reason for this pin change, relying solely on the PR description.
-
Suggestion: Add a short comment near the URL to indicate why this commit was chosen, e.g.:
# Pinned to commit 32e6febe3b96 to include fix for tag-trigger requirement from #5564 - https://cdn.jsdelivr.net/gh/PingCAP-QE/ci@32e6febe3b962c91be5b95d9a4a8bc6a28e1d14c/scripts/flow/build/versioning-strategy.ts
-
-
Testing Coverage Confirmation
- The PR mentions running
deno test -A tekton/tests/with all tests passing. - Suggestion: If possible, include or reference these test results in the PR description or commit message to improve traceability.
- The PR mentions running
No critical issues or broken functionality detected. This is a safe and well-validated update.
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wuhuizuo The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The version-CLI step runs
scripts/flow/build/versioning-strategy.tsfrom acommit-pinned URL (added in #5561), so the fix in #5564 — a released version now
requires a tag trigger — only reaches Tekton once the pin moves to it.
Move the pin from
10bcc6134c65…to32e6febe3b96…, the merge commit of #5564.Verified: the pinned URL returns
200and serves the fixed script (it containsthe
triggeredByTagcheck), anddeno test -A tekton/tests/passes (37 tests,0 failures).