Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Cache keys in self-hosted runners vs cloud

Marcus February 21, 2024

Hi,

we're trying to integrate self-hosted runners in our pipeline. We want to have a pipeline, where some steps are running in the cloud and some others are running on the self-hosted runners.

Now we're getting a problem with the caches. The self-hosted runners are sometimes not recognizing the present caches.

After some investigation, i figured out, that they're using different cache keys, for the same cache,

We have a pipeline with two steps, which are using the same cache and where both steps are working on the same code base.

The cache definition is like the following:

nodemodules:
key:
files:
- package.json
- package-lock.json
path: ./node_modules

Now in the first step (which is running on self-hosted) the log looks like this:

Cache "nodemodules: ./node_modules": Downloading
Cache "nodemodules: ./node_modules": Cache key 4f895c8d9628eef36867e7a299148ebeca2a53daa0a6f15355712ba0943d3b30
Cache "nodemodules: ./node_modules": Not found

And in the second step (which is running in the cloud) it looks like this:

Cache "nodemodules: ./node_modules": Cache key 2cb96d3f4711e32b5e18aa68998f0d648d6992a89c6ac4f968870e7916f985f8
Cache "nodemodules: ./node_modules": Downloading
Cache "nodemodules: ./node_modules": Downloaded 261.8 MiB in 7 seconds
...

Can you explain this? Am I doing something wrong?

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 23, 2024

Hello @Morgus ,

thank you for reaching out to Community!

We would like to ask for a few more details about your environment, so I will be raising a support ticket for you. You should be receiving an email with the link to the support ticket soon, but in case you don't receive it, please let us know so we can share it here (the ticket is only visible to you and Atlassian staff).

Thank you, @Morgus !

Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events