Skip to content

Conversation

@kolafish
Copy link

What problem does this PR solve?

close #xxx

What is changed and how it works?

This PR adds TiCI component support to tiup playground with the following improvements:

Key Features

  • Separate TiCIMetaServer and TiCIWorkerNode instances: Each instance runs only one service for better resource management
  • Proper startup sequence: TiDB → TiCDC → TiCI (meta then worker) → TiFlash
  • TiCDC integration: Automatic changefeed creation with configurable S3 sink URI
  • Environment variable support: TICDC_NEWARCH=true for TiCDC startup
  • Unified configuration: Shared binpath and config parameters for both meta and worker instances

Usage

./bin/tiup-playground --pd 1 --kv 1 --db 1 --tiflash 1 \
  --db.binpath ~/Desktop/tidb/bin/tidb-server \
  --tiflash.binpath ~/Desktop/tiflash/cmake-build-debug/dbms/src/Server/tiflash \
  --ticdc 1 --ticdc.binpath ~/Desktop/ticdc/bin/cdc \
  --tici.meta 1 --tici.worker 1 --tici.binpath  ~/Desktop/tici \
  --tag your-cluster-name

Check List

Tests

  • [] Unit test
  • [] Integration test
  • [] Manual test (add detailed scripts or steps below)
  • [] No code

Code changes

  • [] Has exported function/method change
  • [] Has exported variable/fields change
  • [] Has interface methods change
  • [] Has persistent data change

Side effects

  • [] Possible performance regression
  • [] Increased code complexity
  • [] Breaking backward compatibility

Related changes

  • [] Need to cherry-pick to the release branch
  • [] Need to update the documentation

Release notes:

NONE

@ti-chi-bot ti-chi-bot bot requested a review from srstack June 23, 2025 13:47
@pingcap-cla-assistant
Copy link

pingcap-cla-assistant bot commented Jun 23, 2025

CLA assistant check
All committers have signed the CLA.

@ti-chi-bot ti-chi-bot bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jun 23, 2025
kolafish added 6 commits June 24, 2025 13:38
- Add comments for exported constants TiCIRoleMeta and TiCIRoleWorker
- Remove extra empty line in NewTiCIInstanceWithRole function
- Replace interface{} with any for Go 1.18+ compatibility
- Add version: 2 to golangci.yaml for golangci-lint v2 compatibility
- Remove typecheck from enabled linters (not a linter in v2)
- Update Makefile to use golangci-lint v2.1.6 (latest)
- Add explanatory comment to TestCheckConfig method
- This helps understand the purpose of the mock setup for better test readability
@codecov-commenter
Copy link

codecov-commenter commented Jun 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.91%. Comparing base (7b34205) to head (3d5aefc).

Current head 3d5aefc differs from pull request most recent head 1eabe04

Please upload reports for the commit 1eabe04 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2546      +/-   ##
==========================================
- Coverage   53.81%   51.91%   -1.90%     
==========================================
  Files         351      336      -15     
  Lines       37425    36430     -995     
==========================================
- Hits        20137    18911    -1226     
- Misses      14872    15221     +349     
+ Partials     2416     2298     -118     
Flag Coverage Δ
cluster 39.25% <ø> (-5.61%) ⬇️
unittest ?

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kolafish kolafish changed the base branch from master to feature/fts July 16, 2025 03:37
@kolafish
Copy link
Author

/cc @xhebox @bb7133

@ti-chi-bot ti-chi-bot bot requested review from bb7133 and xhebox July 16, 2025 03:51
@@ -0,0 +1,249 @@
// Copyright 2020 PingCAP, Inc.
Copy link
Member

Choose a reason for hiding this comment

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

Please update the date.

Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

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

LGTM

@xhebox PTAL

@ti-chi-bot ti-chi-bot bot added the lgtm label Jul 17, 2025
@ti-chi-bot ti-chi-bot bot removed the lgtm label Jul 21, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jul 21, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign xhebox for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the lgtm label Jul 21, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jul 21, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-07-17 08:16:51.227807427 +0000 UTC m=+2765263.950986404: ☑️ agreed by bb7133.
  • 2025-07-21 02:26:51.879319765 +0000 UTC m=+204848.800463755: ✖️🔁 reset by xhebox.
  • 2025-07-21 02:27:14.070914586 +0000 UTC m=+204870.992058577: ☑️ agreed by xhebox.

@xhebox xhebox merged commit e1af356 into pingcap:feature/fts Jul 21, 2025
2 checks passed
Lloyd-Pottiger pushed a commit to Lloyd-Pottiger/tiup that referenced this pull request Aug 14, 2025
* add tici component in playground

* fix: resolve lint errors in tici.go

- Add comments for exported constants TiCIRoleMeta and TiCIRoleWorker
- Remove extra empty line in NewTiCIInstanceWithRole function
- Replace interface{} with any for Go 1.18+ compatibility

* fix: update golangci-lint config for v2 and Makefile

- Add version: 2 to golangci.yaml for golangci-lint v2 compatibility
- Remove typecheck from enabled linters (not a linter in v2)
- Update Makefile to use golangci-lint v2.1.6 (latest)

* fix: add comment to clarify executor mock setup in test

- Add explanatory comment to TestCheckConfig method
- This helps understand the purpose of the mock setup for better test readability

* fix compile error

* revert makefile

* modify the sleep time and adjust the cdc server

* Update components/playground/instance/tici.go

---------

Co-authored-by: xhe <xw897002528@gmail.com>
Lloyd-Pottiger pushed a commit to Lloyd-Pottiger/tiup that referenced this pull request Aug 14, 2025
* add tici component in playground

* fix: resolve lint errors in tici.go

- Add comments for exported constants TiCIRoleMeta and TiCIRoleWorker
- Remove extra empty line in NewTiCIInstanceWithRole function
- Replace interface{} with any for Go 1.18+ compatibility

* fix: update golangci-lint config for v2 and Makefile

- Add version: 2 to golangci.yaml for golangci-lint v2 compatibility
- Remove typecheck from enabled linters (not a linter in v2)
- Update Makefile to use golangci-lint v2.1.6 (latest)

* fix: add comment to clarify executor mock setup in test

- Add explanatory comment to TestCheckConfig method
- This helps understand the purpose of the mock setup for better test readability

* fix compile error

* revert makefile

* modify the sleep time and adjust the cdc server

* Update components/playground/instance/tici.go

---------

Co-authored-by: xhe <xw897002528@gmail.com>
Lloyd-Pottiger pushed a commit to Lloyd-Pottiger/tiup that referenced this pull request Aug 14, 2025
* add tici component in playground

* fix: resolve lint errors in tici.go

- Add comments for exported constants TiCIRoleMeta and TiCIRoleWorker
- Remove extra empty line in NewTiCIInstanceWithRole function
- Replace interface{} with any for Go 1.18+ compatibility

* fix: update golangci-lint config for v2 and Makefile

- Add version: 2 to golangci.yaml for golangci-lint v2 compatibility
- Remove typecheck from enabled linters (not a linter in v2)
- Update Makefile to use golangci-lint v2.1.6 (latest)

* fix: add comment to clarify executor mock setup in test

- Add explanatory comment to TestCheckConfig method
- This helps understand the purpose of the mock setup for better test readability

* fix compile error

* revert makefile

* modify the sleep time and adjust the cdc server

* Update components/playground/instance/tici.go

---------

Co-authored-by: xhe <xw897002528@gmail.com>
Lloyd-Pottiger pushed a commit to Lloyd-Pottiger/tiup that referenced this pull request Aug 14, 2025
* add tici component in playground

* fix: resolve lint errors in tici.go

- Add comments for exported constants TiCIRoleMeta and TiCIRoleWorker
- Remove extra empty line in NewTiCIInstanceWithRole function
- Replace interface{} with any for Go 1.18+ compatibility

* fix: update golangci-lint config for v2 and Makefile

- Add version: 2 to golangci.yaml for golangci-lint v2 compatibility
- Remove typecheck from enabled linters (not a linter in v2)
- Update Makefile to use golangci-lint v2.1.6 (latest)

* fix: add comment to clarify executor mock setup in test

- Add explanatory comment to TestCheckConfig method
- This helps understand the purpose of the mock setup for better test readability

* fix compile error

* revert makefile

* modify the sleep time and adjust the cdc server

* Update components/playground/instance/tici.go

---------

Co-authored-by: xhe <xw897002528@gmail.com>
@Lloyd-Pottiger Lloyd-Pottiger mentioned this pull request Aug 14, 2025
13 tasks
xhebox added a commit that referenced this pull request Aug 14, 2025
* pkg/set: convert check to require (#2557)

* meta: replace pingcap/check with testing (#2559)

* embed: replace pingcap/check with testing (#2555)

* base52: replace pingcap/check with testing (#2556)

* localdata: replace pingcap/check with testing (#2561)

* utils: replace pingcap/check with testing (#2562)

* telemetry: remove (#2564)

* Telemetry removal

* Remove left over teleCommand

* repo: exclude prerelease version from version list if possible (#2550)

Signed-off-by: xhe <xw897002528@gmail.com>

* repo: abstract v1repoapi as interface (#2542)

* env: clean up old code

Signed-off-by: xhe <xw897002528@gmail.com>

* repo: leverage all apis into v1_repository

Signed-off-by: xhe <xw897002528@gmail.com>

* repo: abstract it as an interface

Signed-off-by: xhe <xw897002528@gmail.com>

* clean the remained part

Signed-off-by: xhe <xw897002528@gmail.com>

* rename to LocalComponentInstalled

Signed-off-by: xhe <xw897002528@gmail.com>

* update

Signed-off-by: xhe <xw897002528@gmail.com>

* try fix

Signed-off-by: xhe <xw897002528@gmail.com>

* g

Signed-off-by: xhe <xw897002528@gmail.com>

* try fix

Signed-off-by: xhe <xw897002528@gmail.com>

* g

Signed-off-by: xhe <xw897002528@gmail.com>

* g

Signed-off-by: xhe <xw897002528@gmail.com>

* g

Signed-off-by: xhe <xw897002528@gmail.com>

---------

Signed-off-by: xhe <xw897002528@gmail.com>

* cluster: also check exporter ports (#2563)

Signed-off-by: xhe <xw897002528@gmail.com>

* cluster: improve SELinux compatibility (#2501)

* cluster: improve SELinux compatibility

* fixup

* cluster: update --ssh desc (#2380)

* Update --ssh desc

* Update components/cluster/command/root.go

---------

Co-authored-by: xhe <xw897002528@gmail.com>

* cluster: add stop/start timeout for systemd service (#2568)

Signed-off-by: xhe <xw897002528@gmail.com>

* *: move insight to tiup (#2553)

* Move insight to tiup

* Fix linting issues

* Fix unused/gocritic/staticcheck issues

* *: check_to_require for cluster (#2566)

* check_to_require: cluster

* Restore TestCountDirMultiPath

---------

Co-authored-by: xhe <xw897002528@gmail.com>

* *: update dmpb (#2569)

* Update dmpb

* Remove dm grpc gw

* *: replace otiai10/copy with os.CopyFS (#2571)

* ci: add staging mirror option to release workflow (#2576)

* ci: fix STAGING version competition (#2579)

* playground: fix config typo (#2578)

Signed-off-by: Ryan Leung <rleungx@gmail.com>

* ci: add ci for feature branch (#2577)

Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>

* ci: fix staging version string (#2582)

* ci: fix STAGING version competition

* ci: replace slashes with dots in branch name for STAGING_VER

* Apply suggestion from @wuhuizuo

* playground: add tici component in playground (#2546)

* add tici component in playground

* fix: resolve lint errors in tici.go

- Add comments for exported constants TiCIRoleMeta and TiCIRoleWorker
- Remove extra empty line in NewTiCIInstanceWithRole function
- Replace interface{} with any for Go 1.18+ compatibility

* fix: update golangci-lint config for v2 and Makefile

- Add version: 2 to golangci.yaml for golangci-lint v2 compatibility
- Remove typecheck from enabled linters (not a linter in v2)
- Update Makefile to use golangci-lint v2.1.6 (latest)

* fix: add comment to clarify executor mock setup in test

- Add explanatory comment to TestCheckConfig method
- This helps understand the purpose of the mock setup for better test readability

* fix compile error

* revert makefile

* modify the sleep time and adjust the cdc server

* Update components/playground/instance/tici.go

---------

Co-authored-by: xhe <xw897002528@gmail.com>

* tici: Update the default config filename & default port of tici (#2567)

* Update the default config filename

Signed-off-by: JaySon-Huang <tshent@qq.com>

* Update default port

Signed-off-by: JaySon-Huang <tshent@qq.com>

---------

Signed-off-by: JaySon-Huang <tshent@qq.com>

* tici: refine binpath (#2572)

Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>

* tici: read bucket and prefix from config file to create changefeed (#2573)

* tici: refine config path

Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>

* fix

Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>

* fix

Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>

* fix

Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>

---------

Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>

* playground: make the tici changefeed endpoint configurable (#2581)

* playground: make the tici changefeed endpoint configurable

* address comments

* *: support start a TiDB playground cluster with TiCI without any self-defined binarys or configurations (#2583)

Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>

* fix

Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>

* fix

Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>

---------

Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
Co-authored-by: Daniël van Eeden <git@myname.nl>
Co-authored-by: xhe <xw897002528@gmail.com>
Co-authored-by: glkappe <qihang.li@pingcap.com>
Co-authored-by: wuhuizuo <wuhuizuo@126.com>
Co-authored-by: Ryan Leung <rleungx@gmail.com>
Co-authored-by: Yu Jin <yujin.yujin@gmail.com>
Co-authored-by: JaySon <tshent@qq.com>
Co-authored-by: Yiding Cui <winoros@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants