Circle CI build failing only on PR builds

I’m getting an “Error loading shared library libffi.so.6” only on builds triggered by PRs. I do not see this error when I pushed the exact same change to a branch and circle CI run a build on a branch.

build from PR:
https://app.circleci.com/pipelines/github/Sceptre/sceptre/313/workflows/f28a86b9-65cb-4c60-b8eb-4488ed1d5c6d/jobs/5131

the exact same change pushed to a branch:
https://app.circleci.com/pipelines/github/Sceptre/sceptre/314/workflows/0aab2c60-4c8a-43a3-b606-ebae13436de2/jobs/5133

Anybody know why this is happening? I thought it might be a cache issue since each branch has a separate cache. I have {{ .Environment.CACHE_VERSION }} in save_cache key and have tried to clear the cache by changing the CACHE_VERSION value in circle ENV VAR but that didn’t fix build failure. I don’t know where or how to clear the cache for the environment that runs PR builds. Was wondering if anybody else would know?

Hi @zaro0508,

I had a look at your builds, it looks like your PR’s do not have access to your sceptre-core context. Therefore the PR does not have access to environment variables saved as context and the value set for the CACHE_VERSION environment variable.

You can read more about how contexts works here

You can save your CACHE_VERSION environment variable as an environment variable for the project.

Let me know if you have any additional questions.