Skip to content

Triggering extended tests through PR comment: Run extended tests #15101

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

Merged
merged 17 commits into from
Mar 27, 2025

Conversation

danila-b
Copy link
Contributor

@danila-b danila-b commented Mar 8, 2025

Which issue does this PR close?

Rationale for this change

Allows to run extended tests on some PRs if needed, while skipping them by default on other PRs. The user experience of running the extended test suite should be roughly the same (check is shown in the PR actions tab, comment is marked with 🚀 emoji when the tests are triggered for the PR)

What changes are included in this PR?

Adding a new trigger event for extended tests - workflow_dispatch, and a separate action which is checking all PR comments and issuing this dispatch event for the PR branch when the Run extended tests comment is detected.

Are these changes tested?

Only manual tests on the fork (see here), unfortunately I am not aware of any better tests for Github actions.

image

@github-actions github-actions bot added the development-process Related to development process of DataFusion label Mar 8, 2025
@Omega359
Copy link
Contributor

Omega359 commented Mar 8, 2025

Looks like it ran checks on the forked branch, I think that is what we want

image

@Omega359
Copy link
Contributor

Is this ready for review or is there something outstanding for it to be still in draft?

@danila-b danila-b marked this pull request as ready for review March 21, 2025 09:20
@danila-b
Copy link
Contributor Author

Is this ready for review or is there something outstanding for it to be still in draft?

It should be ready for a review, rebased on the latest main and tested it a bit more. Looks like it works as expected.

@Omega359
Copy link
Contributor

@alamb

@alamb
Copy link
Contributor

alamb commented Mar 24, 2025

Thanks @danila-b and @Omega359 🙏 -- I started testing this on my fork here:

@alamb
Copy link
Contributor

alamb commented Mar 24, 2025

When I tested this on my fork, it seems to have run extended tests for my PR without any prompting:

@danila-b
Copy link
Contributor Author

danila-b commented Mar 24, 2025

When I tested this on my fork, it seems to have run extended tests for my PR without any prompting:

Hey @alamb, I think the extended test .yaml file and other GitHub actions files need to be merged to the main branch to take effect. At least at the moment, looks like the main branch of your fork has an unchanged extended.yaml file still with a trigger on every push.

@alamb
Copy link
Contributor

alamb commented Mar 25, 2025

Thanks @danila-b -- you are totally right. I started a new test and we'll see how that goes

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

I have completed testing in my fork and I agree this works ❤️ - thank you so much @danila-b (see testing PR here alamb#33)

I also think we should add a note to the user docs about this awesome feature: https://datafusion.apache.org/contributor-guide/testing.html#extended-tests

But we can do that as a follow on

THanks again for this great feature and for your patience waiting on review


jobs:

run_extended_tests:
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we please add a human summary here of what this does -- something like

Suggested change
run_extended_tests:
# Starts the extended_tests when someone leaves a `Run extended tests` comment
run_extended_tests:

It might also be nice to make the comparison case insensitive (so run extended tests would also work)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the comment 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As for the case sensitivity, maybe let's add it in a follow-up PR since changing the triggers will require a whole new round of testing to make sure the condition work as expected again

@@ -127,4 +145,44 @@ jobs:
cargo test --features backtrace --profile release-nonlto --test sqllogictests -- --include-sqlite
cargo clean

# If the workflow was triggered by the PR comment we need to manually update check status to display in UI
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps this can also make a reference to the pr_comment_commands.yml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense, will add it to this PR


name: PR commands

on:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think take.yml also has a command triggered by a comment. Maybe we can combine them eventually

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes indeed, I think they can be combined into one action quite easily in the future


name: PR commands

on:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think take.yml also has a command triggered by a comment. Maybe we can combine them eventually

@alamb alamb changed the title Triggering extended tests through PR comment Triggering extended tests through PR comment: Run extended tests Mar 26, 2025
@danila-b
Copy link
Contributor Author

I have completed testing in my fork and I agree this works ❤️ - thank you so much @danila-b (see testing PR here alamb#33)

I also think we should add a note to the user docs about this awesome feature: https://datafusion.apache.org/contributor-guide/testing.html#extended-tests

But we can do that as a follow on

THanks again for this great feature and for your patience waiting on review

Happy to help @alamb,

I have pushed the comments that you suggested to this PR, it might need another approval to get merged since some actions need to be re-run I think.

I don't know what the merge process is but feel free to merge it whenever convenient or get this across the finish line since I will be on vacation for the next couple of weeks 👍

@alamb alamb merged commit 2b4173c into apache:main Mar 27, 2025
27 checks passed
@alamb
Copy link
Contributor

alamb commented Mar 27, 2025

Thanks again @danila-b !

qstommyshu pushed a commit to qstommyshu/datafusion that referenced this pull request Mar 28, 2025
…pache#15101)

* Add custom trigger for extended tests

* Add workflow dispatch

* Try different templating for ref path

* Add checkout

* Use branch name directly

* Add js action to fetch branch name

* Post check on PR

* Fix owner and repo name

* Remove unused vars

* Add permissions for check write

* Add check updates

* Add lighweight test

* Uncomment needs

* Add comments for new actions
nirnayroy pushed a commit to nirnayroy/datafusion that referenced this pull request May 2, 2025
…pache#15101)

* Add custom trigger for extended tests

* Add workflow dispatch

* Try different templating for ref path

* Add checkout

* Use branch name directly

* Add js action to fetch branch name

* Post check on PR

* Fix owner and repo name

* Remove unused vars

* Add permissions for check write

* Add check updates

* Add lighweight test

* Uncomment needs

* Add comments for new actions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development-process Related to development process of DataFusion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a way to trigger the extended test suite from a PR
3 participants