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

feat(ci): support opt-in workflow for pull-requests #12870

Merged
merged 8 commits into from
Oct 16, 2023
Merged

Conversation

kwannoel
Copy link
Contributor

@kwannoel kwannoel commented Oct 16, 2023

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Closes #12733

Allows us to run PR workflow steps selectively.

For instance with this:

(Add ci/skip-ci instead of ci/enable-opt-in-mode, that option has been renamed.)

Screenshot 2023-10-16 at 5 37 08 PM

We have the following steps run:
Screenshot 2023-10-16 at 5 36 38 PM

Even if PR is in draft:
Screenshot 2023-10-16 at 5 27 51 PM

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

@kwannoel
Copy link
Contributor Author

Screenshot 2023-10-16 at 5 18 10 PM

Updated pipeline config as well. Should be able to trigger pr workflow (but only opt-in-mode) when PR is in draft.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe sth like "skip-ci"? That might sound more straightforward than "opt-in-mode". 😄

The idea generally LGTM. (I also sometimes want to skip ci. lol) A little problem is the ci jobs form a DAG, so it might be problematic to turn on/off all steps via labels?

Copy link
Contributor Author

@kwannoel kwannoel Oct 16, 2023

Choose a reason for hiding this comment

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

A little problem is the ci jobs form a DAG, so it might be problematic to turn on/off all steps via labels?

Primary usecase is to enable a few tests.
So I think it's fine to let the user resolve the DAG themselves.
Usually the DAG is at most 1-2 length-wise.

Copy link
Contributor Author

@kwannoel kwannoel Oct 16, 2023

Choose a reason for hiding this comment

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

skip-ci

+1, I will change it to ci/skip-ci

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Btw I think this feature should only be allowed for draft PRs to avoid accidentally disabling some tests.

Copy link
Contributor

@huangjw806 huangjw806 Oct 16, 2023

Choose a reason for hiding this comment

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

Now, drft pr will automatically skip ci. What this PR wants to do is to only run the draft pr of the label. You are right, you need to figure out the dependencies of CI job in advance.

Copy link
Contributor Author

@kwannoel kwannoel Oct 16, 2023

Choose a reason for hiding this comment

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

Btw I think this feature should only be allowed for draft PRs to avoid accidentally disabling some tests.

and

+1, I will change it to ci/skip-ci

Done in ebe56d3

Copy link
Contributor

@huangjw806 huangjw806 left a comment

Choose a reason for hiding this comment

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

LGTM!

@kwannoel kwannoel force-pushed the kwannoel/opt-in branch 2 times, most recently from e877dd7 to 5c4c2be Compare October 16, 2023 09:59
@kwannoel
Copy link
Contributor Author

Screenshot 2023-10-16 at 5 59 53 PM

Still able to trigger.

Now testing enable ci/skip-ci only in draft PRs step.

@kwannoel kwannoel marked this pull request as ready for review October 16, 2023 10:00
@kwannoel
Copy link
Contributor Author

Screenshot 2023-10-16 at 7 12 19 PM

@kwannoel kwannoel enabled auto-merge October 16, 2023 11:14
@kwannoel kwannoel added this pull request to the merge queue Oct 16, 2023
@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

Merging #12870 (d7c4527) into main (ea27579) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main   #12870   +/-   ##
=======================================
  Coverage   69.26%   69.26%           
=======================================
  Files        1489     1489           
  Lines      245772   245772           
=======================================
+ Hits       170236   170238    +2     
+ Misses      75536    75534    -2     
Flag Coverage Δ
rust 69.26% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 14 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Merged via the queue into main with commit d0572f4 Oct 16, 2023
6 of 7 checks passed
@kwannoel kwannoel deleted the kwannoel/opt-in branch October 16, 2023 11:56
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.

Add opt-in mode for PR workflow
3 participants