Skip to content

veristat: use more strict restore key when fetching the baseline #372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 14, 2025

Conversation

theihor
Copy link
Contributor

@theihor theihor commented May 14, 2025

There were CI failures caused by inappropriate cache restore, when bpf-next baseline was used for patch series against bpf-net. This happened because github cleaned up bpf-net baseline from the cache, and bpf-next baseline matched baseline_name prefix.

To avoid such collisions use <base_branch>-<name>* as the effective restore key. This is achieved by providing a fake exact key with trailing hyphen (which is always a miss), and relying on actions/cache matching a prefix from restore-keys list [1]. And the only restore-key we set is <base_branch>-<name>.

[1] https://github.com/actions/cache#creating-a-cache-key

There were CI failures caused by inappropriate cache restore, when
bpf-next baseline was used for patch series against bpf-net. This
happened because github cleaned up bpf-net baseline from the cache,
and bpf-next baseline matched baseline_name prefix.

To avoid such collisions use `<base_branch>-<name>*` as the effective
restore key. This is achieved by providing a fake exact key with
trailing hyphen (which is always a miss), and relying on actions/cache
matching a prefix from restore-keys list [1]. And the only restore-key
we set is `<base_branch>-<name>`.

[1] https://github.com/actions/cache#creating-a-cache-key

Signed-off-by: Ihor Solodrai <[email protected]>
@theihor theihor merged commit 1f3056d into master May 14, 2025
54 checks passed
@theihor theihor deleted the veristat-cache-key branch May 14, 2025 20:53
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