Skip to content

Skip saving cache when running in merge queue #1798

Open

Description

@GeeWee

This is essentially a duplicate of #1243, which was closed due to inactivity.

Caches saved in the merge queue are essentially useless, as they save on its own branch.

So they cannot be restored from the default branch, nor from any PR branch.
Essentially, as far as I can tell, any cache saved in a merge queue can only be used in the situation where:

  • PR is added into the merge queue. Github creates main/pr1 branch.
  • It fails and is sent back
  • It is resubmitted to the merge queue. I assume github will reuse the main/pr1 branch name, in which case you might be able to get a cache hit.

I would imagine that the most sensible default behaviour would be to not save a cache by default if we're in a merge_group action, or perhaps add an option to do so to the main cache action.

The workaround currently is to use explicit restore and save actions and checking if we're in a merge queue, but it's fairly cumbersome.

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions