Question

Why does clearing App Platform's build cache not work as expected?

Hi everyone, hope you’re having a wonderful Monday.

I’ve been getting increasingly frustrated over a problem I’ve been having with App Platform since the start - whenever I clear the build cache in hope of fetching updated versions of my other repos.

To clarify, I have a Python application(A) running in the App Platform, which is reliant on another repository hosted on GitHub(B). We download it and put it into the environment at build time, using build commands. We fetch versions based on tagging.

Whenever I release a new version of B, I need to re-build A. I do this with “clear build cache”, expecting the latest version of B to be fetched. In nearly all cases, A is built with the old version.

How can I make sure that the entire build cache is cleared?


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
July 4, 2023

Hey there 👋,

Hope that you are having a great start of the week too!

It sounds like the problem might be related to the fact that there have been no code changes to repo A. As a workaround, what you could do is introduce a dependency file where you change the tag version of your repo B. For example, if you were to add a file called repo_b_version to your repo A, then you could use the information in there for your build command and change the contents of that file so that it would trigger a new build each time that file is updated with the new version.

You could get the version from the dependency file in your build command using the cat command for example, e.g. version=$(cat repo_b_version).

If this workaround does not fit your needs, please reach out to our amazing support team who might be able to further assist you with the problem! :)

https://www.digitalocean.com/support/

Hope that helps!

- Bobby.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel