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

.github/workflows: Update the checkouts action to use the v1 version #2463

Conversation

timflannagan
Copy link
Contributor

Update any relevant workflows and downgrade the checkouts action from
the v2 to v1 version. This change is predicated on the problematic
checkouts@v2 behavior that can lead to an increased change of regressing
when landing changes to the default branch (e.g. master/main). This is
because there's an existing bug in the v2 world where PRs can checkout
the wrong HEAD commit, leading to scenarios where you're testing against
an out-of-date commit compared to what's in the master branch.

A concrete use case is when a PR is opened, and that PR checks out the
current HEAD commit from master, and then a change lands in the master
branch, and any subsequent workflow retries for that PR will result in
that previous HEAD commit being checked out. There are workarounds that
exist, like rebasing the existing PR, or like explicitly pointing the
ref to the default branch, but this interaction isn't ideal with workflows
are triggered on pushes to branches on top of reacting to pull request
triggers. The simplest solution is to revert back to the v1 version and
find a better longer term solution.

Signed-off-by: timflannagan timflannagan@gmail.com

Description of the change:

Motivation for the change:

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /doc
  • Commit messages sensible and descriptive

Update any relevant workflows and downgrade the checkouts action from
the v2 to v1 version. This change is predicated on the problematic
checkouts@v2 behavior that can lead to an increased change of regressing
when landing changes to the default branch (e.g. master/main). This is
because there's an existing bug in the v2 world where PRs can checkout
the wrong HEAD commit, leading to scenarios where you're testing against
an out-of-date commit compared to what's in the master branch.

A concrete use case is when a PR is opened, and that PR checks out the
current HEAD commit from master, and then a change lands in the master
branch, and any subsequent workflow retries for that PR will result in
that previous HEAD commit being checked out. There are workarounds that
exist, like rebasing the existing PR, or like explicitly pointing the
ref to the default branch, but this interaction isn't ideal with workflows
are triggered on pushes to branches on top of reacting to pull request
triggers. The simplest solution is to revert back to the v1 version and
find a better longer term solution.

Signed-off-by: timflannagan <timflannagan@gmail.com>
@timflannagan timflannagan force-pushed the ci/use-checkouts-action-v1-version branch from 350c8a2 to 4d6bb35 Compare December 2, 2021 14:53
@perdasilva
Copy link
Collaborator

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 2, 2021
@awgreene
Copy link
Member

/approve

@openshift-ci
Copy link

openshift-ci bot commented Dec 20, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: awgreene, timflannagan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 20, 2021
@openshift-merge-robot openshift-merge-robot merged commit a2142c1 into operator-framework:master Dec 20, 2021
@timflannagan timflannagan deleted the ci/use-checkouts-action-v1-version branch December 20, 2021 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants