pingcap / tiflash

The analytical engine for TiDB and TiDB Cloud. Try free: https://tidbcloud.com/free-trial
https://docs.pingcap.com/tidb/stable/tiflash-overview
Apache License 2.0
945 stars 409 forks source link

ci: Refactor and optimize the CI pipelines #8725

Open purelind opened 9 months ago

purelind commented 9 months ago

Enhancement

The current pipelines has some issues, which have brought a significant burden to the maintenance and updates of the pipelines.

The plan is to restructure CI Pipelines through intentional redesign, making the structure of the pipelins simpler and its execution more stable.

Which CI piplines will be affected?

New CI pipelines

Which branches' pipelines will be affected?

This optimization only targets the pipeline of the master branch. The remaining release branches will be switched and updated in the coming weeks.

Which behaviors will change

After this adjustment, the pipelines will be reduced from three to two. The functionality steps of tiflash_ghpr_build will be integrated into pull-integration-tests as a whole.

old pipelines

new pipelines

  1. The CI trigger command will change /run-unit-test --> /test pull-unit-test /run-integration-test --> /test pull-integration-test /run-all-tests --> /test all

  2. CI status will change idc-jenkins-ci-tiflash/integration-test --> pull-integration-test idc-jenkins-ci-tiflash/unit-test --> pull-unit-test

  3. Automatic triggering of the pielines For newly created PRs or PRs with new commits pushed, the pipeline will be triggered automatically. No need to comment /test all to trigger manually. Both pull-unit-test and pull-integration-test will be triggered automatically.

  4. Prefer to use /retest to trigger tasks that have failed, /test all will retrigger all tasks (including those that have run successfully and those that have failed).

How to check my pull requst ci status on prow

https://prow.tidb.net/?repo=pingcap%2Ftiflash&type=presubmit

Any others changes I need to pay attention to?

purelind commented 9 months ago

To unify the experience across all branches, the following active release branch pipelines will also be restructured and adjusted in the next few weeks

purelind commented 6 months ago

After several weeks of stability testing, the stability of the new pipeline on the master branch is observed to be consistent with the existing pipeline.

JaySon-Huang commented 6 months ago

Just a ref, the fixed of instability caused by printing the strerrno in new pipeline https://github.com/pingcap/tiflash/pull/8694