Circle CI build failing only on PR builds

I’m getting an “Error loading shared library” 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:

the exact same change pushed to a branch:

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.