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: opt-in steps with build.env rather than pr labels #13464

Merged
merged 2 commits into from
Nov 20, 2023

Conversation

xiangjinwu
Copy link
Contributor

@xiangjinwu xiangjinwu commented Nov 16, 2023

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

What's changed and what's your intention?

Similar to #12870, but without the need to create a PR (e.g. #13457).

Example usage:
https://buildkite.com/risingwavelabs/pull-request#new
CI_STEPS=build,build-other,docslt,e2e-test

Notes about regular expression:
Buildkite conditionals (doc src) uses golang regexp package:

Metacharacters: *+?()|
The operator precedence, from weakest to strongest binding, is first alternation, then concatenation, and finally the repetition operators.

  • (^|,) and (,|$$) are used to prevent suffix and prefix match respectively. For example misc-check shall not match /check/ and build-other shall not match /build/. Parentheses are required to evaluate alternation before concatenation.
  • tests? is used to accept both singular test and plural tests. Parentheses are not required because repetition already evaluates before concatenation. Similarly we allow benchmarks? and backwards?, but no other typos are tolerated.
  • /(^|,)(cpu-flamegraph|heap-flamegraph)(,|$$)/ is used to match either cpu-flamegraph or heap-flamegraph. This is the only example where user do not need to manually specify the dependency step flamegraph-env-build. Note the use of one more pair of parentheses to evaluate alternation before concatenation.

Tests runs:

  • Without CI_STEPS, pipeline pull-request shall include the same set of steps before this PR. (link)
  • Without CI_STEPS, pipeline main-cron shall include the same set of steps before this PR. (link)
  • With CI_STEPS=, pipeline pull-request runs the selected steps.
    • build,build-other,docslt,e2e-test (link)
    • cpu-flamegraph (link)
    • regress-test,build,unit-tests,misc-check (link)
  • With CI_STEPS=, pipeline main-cron runs the selected steps.
    • build,s3-source-test (link)

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • 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.

Copy link
Contributor

@kwannoel kwannoel 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 this is useful to use as part of a bisect tool for main-cron. That is long overdue. It will not be able to bisect before this PR. But any commits after can be bisected with the help of this.

I will create a bisect pipeline which can be triggered adhoc.
Then using the functionality introduced from this PR, we can run specified tests via buildkite between specified commits.

It should not be automatically triggered, in case many tests fail due to some known reason.

@kwannoel kwannoel requested a review from fuyufjh November 16, 2023 08:11
@kwannoel
Copy link
Contributor

+1 for trailing / leading comma to simplify regex.

Copy link
Contributor

@lmatz lmatz left a comment

Choose a reason for hiding this comment

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

LGTM

@xiangjinwu xiangjinwu marked this pull request as ready for review November 17, 2023 11:39
@xiangjinwu
Copy link
Contributor Author

content updated to cover most steps in pull-request and main-cron

Copy link

codecov bot commented Nov 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4833477) 68.47% compared to head (cd09932) 68.41%.
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13464      +/-   ##
==========================================
- Coverage   68.47%   68.41%   -0.07%     
==========================================
  Files        1505     1505              
  Lines      259155   259155              
==========================================
- Hits       177458   177289     -169     
- Misses      81697    81866     +169     
Flag Coverage Δ
rust 68.41% <ø> (-0.07%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xiangjinwu xiangjinwu requested a review from kwannoel November 20, 2023 04:08
Copy link
Contributor

@kwannoel kwannoel left a comment

Choose a reason for hiding this comment

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

Rest LGTM, thanks for this!

@xiangjinwu xiangjinwu added this pull request to the merge queue Nov 20, 2023
Merged via the queue into main with commit 6d88344 Nov 20, 2023
27 of 28 checks passed
@xiangjinwu xiangjinwu deleted the ci-step-without-pr branch November 20, 2023 06:47
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.

3 participants