[WIP] ci: refactor 2.6 cache strategy#1718
Conversation
Warm branch-scoped caches on 2.6 and align hosted CCache and Conan key behavior with the main-branch cache policy. Signed-off-by: jamesgao-jpg <james.gao@zilliz.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jamesgao-jpg The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@jamesgao-jpg 🔍 Important: PR Classification Needed! For efficient project management and a seamless review process, it's essential to classify your PR correctly. Here's how:
For any PR outside the kind/improvement category, ensure you link to the associated issue using the format: “issue: #”. Thanks for your efforts and contribution to the community!. |
Signed-off-by: jamesgao-jpg <james.gao@zilliz.com>
|
The CCache directory lookup can fail without failing the composite action in both echo "dir=$(ccache --get-config cache_dir)" >> "${GITHUB_OUTPUT}"Because the simple command is Please split the lookup from the output write so the query failure propagates: cache_dir="$(ccache --get-config cache_dir)"
echo "dir=${cache_dir}" >> "${GITHUB_OUTPUT}" |
Question
How can Knowhere
2.6warm reusable release-branch caches while matching the cache behavior and code style introduced formain?The
2.6Unit Test and Analyzer workflows currently warm on pushes tomain, so direct pushes to2.6produce neither branch runs norrefs/heads/2.6caches. Existing cache keys are also split by job and assume a fixed CCache directory.Solution
2.6.2.6cache namespace cold instead of retaining a migration-only OS/job fallback; successful2.6runs seed caches reusable by later PRs.Knowhere PR #1717 introduces the equivalent policy on
mainand is the direct behavior/style baseline for this PR. Cardinal PR https://github.com/zilliztech/cardinal/pull/889 applies the independently implemented and verifier-compared2.6counterpart; Cardinal PR https://github.com/zilliztech/cardinal/pull/887 provides the related Cardinalmasterchange.Known tradeoff
The shared Conan cache is immutable after the first producer saves it. On a cold branch cache, a non-UT job may save before UT/Analyzer and omit Catch2. Builds remain correct and common dependencies remain reusable, but Catch2 may be downloaded again until the Conan key changes. This matches the accepted policy in PR #1717; selecting one dependency-superset Conan producer is a possible follow-up.
Verification
2.6and Knowheremaingit diff --check