Skip to content

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

Merged
theihor merged 1 commit intomasterfrom
veristat-cache-key
May 14, 2025
Merged

veristat: use more strict restore key when fetching the baseline#372
theihor merged 1 commit intomasterfrom
veristat-cache-key

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 <isolodrai@meta.com>
@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