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

add manual trigger for extended tests in pull requests #14331

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

buraksenn
Copy link
Contributor

@buraksenn buraksenn commented Jan 27, 2025

Which issue does this PR close?

Closes #14319

Rationale for this change

Details in #14319 but main idea is to run extended tests on some PR before merging to verify their integrity before they are merged to main.

What changes are included in this PR?

With this change run extended tests will trigger extended tests on PR.

Are these changes tested?

Pushed these changes to my fork and opened a test PR.

One failed example because of build issues in main:
image

Successful extended test:

Running:
image

Action ( https://github.com/buraksenn/datafusion/actions/runs/13020123049):
image

Finished:
image

Notification:
image

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

I took a look at the updates, I think they should work.

@alamb
Copy link
Contributor

alamb commented Jan 28, 2025

Thanks @buraksenn

When testing such PRs I normally put them on the main branch in my own fork and then try it out there

@buraksenn
Copy link
Contributor Author

Thanks @buraksenn

When testing such PRs I normally put them on the main branch in my own fork and then try it out there

Thanks @alamb. As you've said I've started testing it in my fork will update here with test result

@buraksenn buraksenn changed the title try to add manual trigger for extended tests in PRs add manual to trigger extended tests in pull requests Jan 28, 2025
@buraksenn buraksenn marked this pull request as ready for review January 28, 2025 22:51
@buraksenn buraksenn changed the title add manual to trigger extended tests in pull requests add manual trigger for extended tests in pull requests Jan 28, 2025
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we can create a check in the PR to show that the running the tests is in progress,

we can use https://octokit.github.io/rest.js/v21/#checks

to create a check if the comment is available,

and when the pipeline runs, we can update the check using the update the check

octokit.rest.checks.update({
        owner,
repo,
check_run_id,
output.summary,
output.annotations[].path,
output.annotations[].start_line,
output.annotations[].end_line,
output.annotations[].annotation_level,
output.annotations[].message,
output.images[].alt,
output.images[].image_url,
actions[].label,
actions[].description,
actions[].identifier
      })

see in the docs that I have linked the "Update a check run" under the checks api

wdyt @alamb ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Using other actions in an apache repo is problematic as I previously found out. However, it's not hard to have an action post a comment and then edit it to show progress.

Copy link
Contributor

Choose a reason for hiding this comment

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

I tried it in my fork, see this PR:

It seems to have worked great

Screenshot 2025-01-29 at 12 26 18 PM

Here is the workflow run:
https://github.com/alamb/datafusion/actions/runs/13036912907

I am going to wait to see what happens on success and then I will purposely introduce a failure in extended tests and see what happens

@alamb
Copy link
Contributor

alamb commented Jan 29, 2025

I wonder if we can create a check in the PR to show that the running the tests is in progress,

@edmondop I may be misunderstanding you, but I think once the extended job is triggered then it will show up in the normal CI job list as "in progress"

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.

This workflow looks great @buraksenn -- thank you and @Omega359 and @edmondop

I just want to test the negative case before approving it

The only other thing I think would be useful is to document how this work, but we can do that as a follow on.

Perhaps we can extend the text introduced in

with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
Copy link
Contributor

Choose a reason for hiding this comment

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

I tried it in my fork, see this PR:

It seems to have worked great

Screenshot 2025-01-29 at 12 26 18 PM

Here is the workflow run:
https://github.com/alamb/datafusion/actions/runs/13036912907

I am going to wait to see what happens on success and then I will purposely introduce a failure in extended tests and see what happens

@alamb
Copy link
Contributor

alamb commented Jan 30, 2025

I looked more at what happened with this PR:

I am going to wait to see what happens on success and then I will purposely introduce a failure in extended tests and see what happens

Strangely, the workflow seems to have run the extended tests using main not on my branch

Here is the workflow: https://github.com/alamb/datafusion/actions/runs/13058528763

Follow to a test
Screenshot 2025-01-30 at 2 51 36 PM

Seems to have checked out main rather than the branch
https://github.com/alamb/datafusion/actions/runs/13058528763/job/36435553604
Screenshot 2025-01-30 at 2 52 08 PM

I may be misreading the job info

Possibly related is that the extended tests are not reported on the main PR:
Screenshot 2025-01-30 at 2 54 17 PM

@buraksenn
Copy link
Contributor Author

It seems, I've missed that sorry, let me try to fix and then write test steps clearly @alamb

@buraksenn buraksenn force-pushed the try-manual-triger-for-extended-tests branch from 50502dd to bb918d4 Compare January 30, 2025 20:27
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
4 participants