Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always getting cache miss during TurboRepo <> CircleCI integration #1343

Closed
mkotsollaris opened this issue Jun 6, 2022 · 3 comments
Closed
Assignees

Comments

@mkotsollaris
Copy link

What version of Turborepo are you using?

1.2.16

What package manager are you using / does the bug impact?

Yarn v1

What operating system are you using?

Mac

Describe the Bug

After following the detailed guide of CircleCi + TurboRepo integration, I am getting cache miss all the time, even though I am pretty sure I have configured CircleCI secrets accordingly. Here's my repo+ CircleCi logs.

Expected Behavior

Should receive cache hit for identical job execution.

To Reproduce

  • Rerun job in circleCI
  • observe cache miss for identical job, instead of cache hit
@tknickman
Copy link
Member

This appears to be an issue with how CircleCI environment variables work.

Because we're setting the environment variables on the project, you actually don't need to specify them in the workflow. Adding these in the workflow is overriding the variables set on the project because they have a higher precedence, so the environment variables literally end up being the strings $TURBO_TEAM and $TURBO_TOKEN, and your remote cache requests are failing to authenticate.

To fix this, just remove these lines, but make sure the correct variables are set in your project settings as described here.

Apologies for the error on the docs here - we will get this updated!

@tknickman
Copy link
Member

Looks like you're getting cache hits now @mkotsollaris 🚀

@tknickman tknickman self-assigned this Jun 7, 2022
@mkotsollaris
Copy link
Author

thank you for the quick fix @tknickman!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants