Cache: Event type unsupported randomly triggered

Created on 19 Nov 2019  路  8Comments  路  Source: actions/cache

Our organization has been using GitHub actions heavily for about a month, we just ran into this a bit ago today during one of our release deployments of our platform.

##[error]Event Validation Error: The event type release is not supported. Only push, pull_request events are supported at this time.
##[warning]No scopes with read permission were found on the request.
##[error]Node run failed with exit code ***

This is from the actions/cache, is it possible you have seen this before or if this was recently changed? We have been using this for weeks without any issue until just about an hour ago, even earlier today it was fine.

Most helpful comment

@wipe2238 Apologies for the breaking change, I'll get this fixed.
For a workaround, you can add an if statement to check the event name and conditionally run the cache
Example:

   - name: My Cache
      if: github.event_name == 'push' || github.event_name == 'pull_request'
      uses: actions/cache@v1
      with:
        path: .github
        key: ${{ runner.os }}-github

All 8 comments

For anyone who finds this from Google, it appears out to be a recent change:
https://github.com/actions/cache/pull/68

I'm not sure why it wouldn't be supported though, it seems to be a very obvious need to improve job times with caching. 馃槥

@dmyers Sorry for the inconvenience. We are working on expanding caching to other event types. That work is tracked by https://github.com/actions/cache/issues/63.

Thank you @dhadka, that was a quick response! I appreciate it. I will follow that issue for updates.

Oh gods, why...

Checking cache-hit in workflow using both push and schedule was enough to make sure workflow works exactly same way for both events. To make it work again i'd have to add continue-on-error, which have a chance to miss something really important... or add some crazy ifs around to simulate old behavior.

Fact that cache directory happens to be empty sometimes is not important enough IMHO; i can easily check that with cache-hit and decide on my own is it critical error or not. And some day be suprised that scheduled runs finish faster. Sigh.

@joshmgross Can we change the behavior to warn+noop instead of fail?

@wipe2238 Apologies for the breaking change, I'll get this fixed.
For a workaround, you can add an if statement to check the event name and conditionally run the cache
Example:

   - name: My Cache
      if: github.event_name == 'push' || github.event_name == 'pull_request'
      uses: actions/cache@v1
      with:
        path: .github
        key: ${{ runner.os }}-github

This error also kicks in when I'm rerunning a failed action. Is there any way to make the cache work on re-run job?

馃憢 Hey @smeijer, please see https://github.com/actions/cache/issues/208#issuecomment-596664572

There's a known issue that re-runs of Pull Requests can't read from the cache

Was this page helpful?
0 / 5 - 0 ratings