Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

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

Custom cache downloaded but not found

Julien Dephix
Contributor
October 7, 2022

Hi.

I've set up a pipeline to generate Flutter APKs. It's working fine except for caching of Flutter dependencies.

Here's my bitbucket-pipelines.yml file with simplified steps for posting here.

image: cirrusci/flutter:latest

pipelines:
custom:
generate-apk:
- step:
name: Flutter lint, test and build
script:
- flutter pub get
caches:
- pubcache
definitions:
caches:
pubcache: $HOME/.pub-cache

Build set up outputs:

Cache "pubcache": Downloading
Cache "pubcache": Not found

If I head over to Pipelines and click on the `Cache` button I see this:

 Screenshot from 2022-10-07 12-49-47.png

It's definitely there and under the 1GB limit.

Why is it downloading it but then not finding it? Or is it just now downloading it?

Any ideas?

Thanks!

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 10, 2022

Hi @Julien Dephix,

The defined cache will be saved after the first successful build and it will be used in subsequent builds. Any cache which is older than 1 week will be cleared automatically and repopulated during the next build.

Did you run another build after the first successful build that generated this cache?

Is the following output from a build that ran after the build that generated the cache, or from the build that generated the cache?

Cache "pubcache": Downloading
Cache "pubcache": Not found

Kind regards,
Theodora

Julien Dephix
Contributor
October 12, 2022

Hi @Theodora Boudale 

I get cache now indeed. Thanks.

I just found it misleading to see it in the dependency caches window.

Bye!

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 14, 2022

You are welcome, I'm glad to have helped!

A step will attempt to download a cache if you have defined a cache for that step in your bitbucket-pipelines.yml file.
If it doesn't find anything because it is the first time it is running with a cache definition, you will see the "Not found" message in the Build setup.

The cache will show in the dependency caches window after it is generated and saved.

If you have any other questions, please feel free to reach out.

Kind regards,
Theodora

Like Julien Dephix likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events