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 the changed files detection when running some of the Workflows #648

Conversation

rm3l
Copy link
Member

@rm3l rm3l commented Jan 10, 2025

Description

In some cases, for some reason, no change would be detected.
This was noticed in several PRs where, for example, container images should have been built but were skipped because the diff was being executed against the base commit at the time the PR was created, with errors similar to the following in the logs [1]:

fatal: Invalid revision range 5df8826c3b5e2c1d8c8f782fa616b19efd83330c..5f054315e9139f6098d7a84658c1e066987de045
Changed files for this commit:
==============================

==============================

This should hopefully fix that behavior, by delegating to https://github.com/tj-actions/changed-files.

The way the exclusion and inclusion rules are defined also makes the Workflows much more legible.

[1] https://github.com/redhat-developer/rhdh-operator/actions/runs/12637951503/job/35213226116?pr=609#step:3:20

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

https://github.com/redhat-developer/rhdh-operator/actions/runs/12637951503/job/35213226116?pr=609#step:3:20

PR acceptance criteria

How to test changes / Special notes to the reviewer

Let's see if this works.

In some cases, for some reason, no change would be detected.
This was noticed in several PRs where, for example,
container images should have been built but were skipped because the diff was working against the base commit at the time the PR was created, with errors similar to the following in the logs [1]:
```
fatal: Invalid revision range 5df8826..5f05431
Changed files for this commit:
==============================

==============================
```

This should hopefully fix that behavior,
by delegating to this dedicated Action.

[1] https://github.com/redhat-developer/rhdh-operator/actions/runs/12637951503/job/35213226116?pr=609#step:3:20
Copy link

openshift-ci bot commented Jan 10, 2025

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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-merge-bot openshift-merge-bot bot merged commit b086e66 into redhat-developer:main Jan 10, 2025
7 checks passed
@rm3l rm3l deleted the fix_changed_files_detection_when_running_ci_workflows branch January 10, 2025 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant