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

ci: Fix issue that could skip PR container builds if the fork repo is outdated #602

Merged

Conversation

rm3l
Copy link
Member

@rm3l rm3l commented Dec 20, 2024

Description

Checking out the PR fork repo could sometimes cause the "git diff" command to return an invalid revision range, like in [1].
This might happen if the fork repo is outdated.

To overcome this, this PR checks out the merge commit instead. That's also what GH does by default.

[1] https://github.com/redhat-developer/rhdh-operator/actions/runs/12417737622/job/34715972414?pr=582

Which issue(s) does this PR fix or relate to

https://github.com/redhat-developer/rhdh-operator/actions/runs/12417737622/job/34715972414?pr=582
I wanted to review and test #582 but realized no container was built for it. Based on the changes in that PR, it should have containers built.

PR acceptance criteria

How to test changes / Special notes to the reviewer

We need to merge this first to see it in action and validate the behavior.

Checking out the PR fork repo could sometimes cause the "git diff" command to return an invalid revision range, like in [1].
This might happen if the fork repo is outdated.

[1] https://github.com/redhat-developer/rhdh-operator/actions/runs/12417737622/job/34715972414?pr=582
Copy link

openshift-ci bot commented Dec 20, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from rm3l. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@rm3l rm3l merged commit 4634687 into redhat-developer:main Dec 20, 2024
6 of 7 checks passed
@rm3l rm3l deleted the fix_issue_skipping_pr_container_builds branch December 20, 2024 15:58
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

Successfully merging this pull request may close these issues.

1 participant