feat(libraries): implement Jenkins run matrix caching#4583
Conversation
ti-chi-bot
commented
May 12, 2026
- feat(libraries): add matrixCache library for parallel stage caching
- ci(libraries): remove gitee.groovy library function
|
Skipping CI for Draft Pull Request. |
There was a problem hiding this comment.
Code Review
This pull request introduces a matrix caching mechanism in Jenkins to skip redundant stage executions by generating unique keys based on build context. Feedback focuses on improving the stability and reliability of this cache. Specifically, the logic for identifying matrix axis variables needs a stricter blacklist to avoid unstable keys, and the synchronization mechanism must be upgraded to handle concurrent builds across the Jenkins controller. Additionally, it is recommended to specify UTF-8 encoding for hash generation and implement atomic file writes to prevent data corruption.
| def rawKey = "${org}/${repo}/${baseSha}/${pullShas}/${stageName}/${matrixContext}/${extras}" | ||
|
|
||
| // Use MD5 to compress the key length, preventing overly long filenames or JSON keys. | ||
| return MessageDigest.getInstance("MD5").digest(rawKey.getBytes()).encodeHex().toString() |
There was a problem hiding this comment.
Stop auto-injecting matrix env into cache keys so callers can control key sensitivity through optional parameters, and add presubmit/debug coverage to validate the behavior.
centralize REFS and simplify cache stages
|
@ti-chi-bot: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/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 |