question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cache fails for Pull Request re-runs with "No scopes with read permission were found on the request."

See original GitHub issue

In pull requests we often get:

[warning]No scopes with read permission were found on the request.

And the build runs without cache.

Please note that I’m talking about pull request build triggered when pushing a commit (or opening the PR). So this issue is not explained by #129.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:21
  • Comments:21 (7 by maintainers)

github_iconTop GitHub Comments

18reactions
joshmgrosscommented, May 19, 2020

👋 Hey all, thank you for your patience. Pull Request re-runs should now have the correct GitHub Ref and work with this action.

4reactions
joshmgrosscommented, Apr 2, 2020

👋 Hey all, we’re working on this issue but it will require fixes internally to fix the GitHub ref for pull request re-runs.

For some background, every cache has a “scope” (see Docs: Matching a Cache Key which is determined by the GitHub ref of the current event that triggered the workflow run (as well as the event type itself).

The scope is encoded in the JWT token used by the action to authenticate to the internal cache service. The scope is used to determine which caches we can read and write to and is intended to prevent any potential security issues. For example, you wouldn’t want a pull request from a fork to be able to write to the cache on the default branch.

The logic that determines what scopes to give the token also validates that the ref of the pull request is valid (refs/pulls/*). When a pull request ref does not match that format, we don’t give any scopes to the token. This is why you see the error “No scopes with read permission were found on the request”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: getCacheEntry failed: No scopes with read permission ...
Since the error mentions cache I've attempted: Re-running the workflow; Adding a new commit (assuming it might bust the cache) ...
Read more >
Azure DevOps: pipeline caching: pull requests: cache miss at ...
A cache is found at the parent branch scope and the pipeline downloads and uses the archive. After the build, the pipeline cache...
Read more >
Enabling Docker Layer Caching - CircleCI
Docker layer caching (DLC) can reduce Docker image build times on CircleCI. DLC is available on the Free and above usage plans (credits...
Read more >
Creating a pull request with nested groups enabled takes a ...
It takes a long time for Bitbucket Server to resolve reviewers for a Pull Request when said reviewers are at the bottom of...
Read more >
Troubleshooting Geo - GitLab Docs
If the user interface is not working, or you are unable to sign in, ... This machine's Geo node name matches a database...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found