Skip to content

ci: key TPC dataset caches on pinned generators - #6112

Open
ErikBPF wants to merge 1 commit into
apache:mainfrom
ErikBPF:ci/tpc-cache-key
Open

ErikBPF wants to merge 1 commit into
apache:mainfrom
ErikBPF:ci/tpc-cache-key

Conversation

@ErikBPF

@ErikBPF ErikBPF commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Closes #6102.

The TPC-H and TPC-DS dataset caches were keyed on
hashFiles('.github/workflows/pr_build_linux.yml'), so any workflow edit
regenerated both datasets and left entries that a later run can never restore.
The generators were also unpinned: GenTPCHData cloned tpch-dbgen HEAD and
the tpcds-kit checkout had no ref:.

This pins both generators and keys the datasets on their inputs:

  • TPC-H key is the hash of GenTPCHData.scala; the generator checks out a fixed
    tpch-dbgen commit before applying the stdout patch.
  • TPC-DS key embeds the pinned tpcds-kit commit, which the checkout names
    explicitly.
  • Both caches are split into actions/cache/restore plus a save step guarded to
    main, matching the cache-write policy used for other large caches.

check_tpc_dataset_caches() in dev/ci/check-ci-config.py asserts the key
shape, the pinned ref:, and that the TPC caches are no longer bare
actions/cache@vN.

Testing: the new guard fails on the previous revision with five findings and
passes after the change (CI config checks passed); dev/ci/check-suites.py
also passes.

The TPC-H and TPC-DS dataset caches were keyed on the hash of
pr_build_linux.yml, so every workflow edit regenerated both datasets and
left useless entries that evict main's. The generators were also
unpinned: GenTPCHData cloned tpch-dbgen HEAD and the tpcds-kit checkout
had no ref, so a generator change could not rotate a dataset key.

Pin both generators and key the datasets on their inputs instead:

- TPC-H key is the hash of GenTPCHData.scala; the generator now checks
  out a fixed tpch-dbgen commit before applying the stdout patch.
- TPC-DS key embeds the pinned tpcds-kit commit, which the checkout
  now names explicitly.

Save both from main only, matching the cache-write policy for other
large caches. check_tpc_dataset_caches() in dev/ci/check-ci-config.py
asserts all of the above so the old shape cannot come back.
@github-actions github-actions Bot added build Build environment enhancement New feature or request labels Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Build environment enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: key the TPC dataset caches on pinned generators

1 participant