-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
MINOR Don't run tests for Draft PRs #17299
Conversation
Example with "WIP" in title: mumrah#25 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mumrah thanks for this nice PR.
.github/workflows/build.yml
Outdated
if: | | ||
github.event_name == 'pull_request' && ( | ||
github.event.pull_request.draft || | ||
contains(github.event.pull_request.title, 'WIP') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion, using the "title" to indicate that a PR doesn't need CI is less straightforward than simply marking it as a "draft." Perhaps a WIP could be interpreted as "this PR requires CI but doesn't need a review at the moment." That is a common use case in Kafka community.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, that's a good point. I went with the title since that's something non-committers can update (unlike labels). I'm fine leaving this out for now and just using the Draft status.
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Update Check | ||
- if: inputs.conclusion == '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pardon me, what is the purpose of this step?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The checks API has status and conclusion. The conclusion is only given if the status is "completed".
If we want to set a check to pending (as we've discussed in other PRs), we would send status=pending with no conclusion.
Because of the two forms of API call needed (one with conclusion, one without), we needed two steps with different arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mumrah, thanks for sharing. Although this step is not currently in use, it is intended to serve the needs of KAFKA-17607, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you meant https://issues.apache.org/jira/browse/KAFKA-17572 (clearing a status when re-running a job)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, you are right 😀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Reviewers: Chia-Ping Tsai <[email protected]>
This reverts parts of #17299 related to the checks API Reviewers: Chia-Ping Tsai <[email protected]>
Reviewers: Chia-Ping Tsai <[email protected]>
This reverts parts of apache#17299 related to the checks API Reviewers: Chia-Ping Tsai <[email protected]>
This patch updates our CI workflow to skip the JUnit tests if the PR is marked as a Draft. Also, change to using the more modern "checks" API instead of "statuses" for the feedback from CI Complete.