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] Update logic for which tests get run #13457

Merged
merged 2 commits into from Jan 18, 2024
Merged

[CI] Update logic for which tests get run #13457

merged 2 commits into from Jan 18, 2024

Conversation

titusfortner
Copy link
Member

@titusfortner titusfortner commented Jan 18, 2024

For instance I have this PR:
https://github.com/SeleniumHQ/selenium/pull/13452/commits

The GitHub Workflow evaluates as:
https://github.com/SeleniumHQ/selenium/actions/runs/7572844428/job/20623620638#step:4:7

Which you can see includes things that were added to trunk since the PR was made:
6127b5f...ac3be18

The commit getting used (github.event.pull_request.base.sha) is the merge commit. This PR gets the parent of that commit and uses that instead. If it isn't a PR it keeps current behavior.

Example of this PR in same context:
https://github.com/SeleniumHQ/selenium/actions/runs/7574277822/job/20628303353#step:7:8
which shows just the commits we want:
6127b5f...1d44724

This has the advantage of not running extra tests based on what has been added to trunk since the PR was created and/or not requiring clicking the "update branch" button. I can't think of a scenario where this isn't what we want to do, but maybe I'm missing something?

@titusfortner titusfortner added the C-build Build related issues (bazel and CI) label Jan 18, 2024
@titusfortner titusfortner changed the title Merge check [CI] Update logic for which tests get run Jan 18, 2024
Copy link
Member

@p0deje p0deje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is even simpler way to do it.

@titusfortner
Copy link
Member Author

updated. simpler.

@titusfortner titusfortner merged commit 907f2df into trunk Jan 18, 2024
10 checks passed
@titusfortner titusfortner deleted the merge_check branch January 18, 2024 19:52
@titusfortner
Copy link
Member Author

Ugh, the new code is doing:
63804e9..82bf8fb
Which is including the code changes from 63804e9 in the PR for some reason, which isn't what we want 😦

@p0deje any ideas? I'll try again later if I find time.

@p0deje
Copy link
Member

p0deje commented Jan 20, 2024

Hmm, which build is that?

@titusfortner
Copy link
Member Author

I think I figured it out. We need ... instead of .. since we want what exists only in the second branch since trunk & the pr diverted from what parent of PR is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-build Build related issues (bazel and CI)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants