Skip to content

ci(warm-deps): key cache on pristine lock hash so fork restores hit (#831)#850

Open
vikrantpuppala wants to merge 1 commit into
mainfrom
fix/831-warmer-lockhash-mismatch
Open

ci(warm-deps): key cache on pristine lock hash so fork restores hit (#831)#850
vikrantpuppala wants to merge 1 commit into
mainfrom
fix/831-warmer-lockhash-mismatch

Conversation

@vikrantpuppala

Copy link
Copy Markdown
Contributor

Summary

Second follow-up to #845 (after #848). The fork verification PR (#849) surfaced that every Unit Tests leg missed the prewarmed cache and fell back to the JFrog path (which forks can't authenticate to), failing the jobs.

Root cause: a lockfile-hash mismatch between warmer and consumer.

  • setup-poetry runs poetry lock, which rewrites poetry.lock in place.
  • The warmer computed its cache key with hashFiles('**/poetry.lock') after setup-poetry → hash 143cf261….
  • restore-deps (PR jobs) hashes the pristine committed poetry.lock (it runs before setup-poetry) → hash 46e4852b….

The two never matched, so every fork restore missed:

Cache not found for input keys: forkvenv-Linux-3.9-min-base-46e4852b…-, …

(warmer had saved forkvenv-Linux-3.9-min-base-143cf261…).

Fix: capture the pristine lock hash in a step before setup-poetry and use that for the cache key, matching what restore-deps computes.

Test plan

Refs #831

This pull request and its description were written by Isaac.

…831)

The warmer computed its cache key with hashFiles('**/poetry.lock') AFTER
setup-poetry ran `poetry lock`, which rewrites poetry.lock in place. The PR
jobs' restore-deps hashes the PRISTINE committed poetry.lock (it runs before
setup-poetry). The two hashes therefore never matched — a fork PR looked up
e.g. forkvenv-...-46e4852b... while the warmer had saved forkvenv-...-143cf261...
so every fork restore missed and fell back to the JFrog path (which forks
can't auth to), failing all jobs.

Capture the pristine lock hash in a step BEFORE setup-poetry and use that for
the cache key, matching what restore-deps computes. Found via the fork
verification PR #849 (all Unit Tests legs missed the cache).

Refs #831

Co-authored-by: Isaac
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant