Skip to content

fix(pd): wrong image can be fixed after pdgroup is created#6536

Merged
ti-chi-bot[bot] merged 2 commits intopingcap:feature/v2from
liubog2008:liubo02/fix-pd-status
Nov 7, 2025
Merged

fix(pd): wrong image can be fixed after pdgroup is created#6536
ti-chi-bot[bot] merged 2 commits intopingcap:feature/v2from
liubog2008:liubo02/fix-pd-status

Conversation

@liubog2008
Copy link
Member

  1. if image is wrong, pd cannot bootstrap and no status
  2. if no status, updater cannot update not running pd.
  3. if no enough running pd instance, the pd cluster cannot bootstrap

Signed-off-by: liubo02 <liubo02@pingcap.com>
@ti-chi-bot ti-chi-bot bot requested a review from howardlau1999 November 6, 2025 10:07
@github-actions github-actions bot added the v2 for operator v2 label Nov 6, 2025
@ti-chi-bot ti-chi-bot bot added the size/XXL label Nov 6, 2025
@codecov-commenter
Copy link

codecov-commenter commented Nov 6, 2025

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 40.99%. Comparing base (d3543d0) to head (9bb5faf).

Additional details and impacted files
@@             Coverage Diff             @@
##           feature/v2    #6536   +/-   ##
===========================================
  Coverage       40.99%   40.99%           
===========================================
  Files             366      366           
  Lines           20295    20294    -1     
===========================================
  Hits             8320     8320           
+ Misses          11975    11974    -1     
Flag Coverage Δ
unittest 40.99% <0.00%> (+<0.01%) ⬆️

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

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

Signed-off-by: liubo02 <liubo02@pingcap.com>
@fgksgf fgksgf requested a review from Copilot November 7, 2025 01:29
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the E2E test framework to improve code organization and reusability by introducing a new action package that consolidates common test operations like scaling, rolling restarts, and availability testing. The changes replace repetitive inline test code with reusable helper functions and update function signatures to use scope-based type parameters instead of runtime tuples.

Key changes:

  • Introduced tests/e2e/framework/action package with reusable test action helpers (MustScale, MustRollingRestart, MustScaleAndRollingRestart, availability test functions)
  • Updated waiter functions to use scope-based type parameters and added support for condition checking with ObservedGeneration validation
  • Refactored numerous test files to use the new action helpers, eliminating code duplication
  • Added generated runtime methods SetTemplateLabels and SetTemplateAnnotations for all group types

Reviewed Changes

Copilot reviewed 44 out of 44 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/e2e/framework/action/scale.go New file with scale and update action helpers
tests/e2e/framework/action/test.go New file with availability test helpers
tests/e2e/utils/waiter/pod.go Updated function signatures to use scope-based generics
tests/e2e/utils/waiter/group.go Added WaitForInstanceListCondition and ListCondition functions
tests/e2e/utils/waiter/common.go Updated WaitForObjectCondition to validate ObservedGeneration
tests/e2e/tiproxy/tiproxy.go Refactored to use new action helpers
tests/e2e/tidb/topology.go Refactored to use new action helpers
tests/e2e/tidb/tidb.go Refactored to use new action helpers
tests/e2e/tidb/standby.go Updated to use action helpers
tests/e2e/ticdc/ticdc.go Refactored to use new action helpers
tests/e2e/suite/scale/tikv.go Refactored to use new action helpers
tests/e2e/suite/scale/pd.go New test file for PD scaling scenarios
tests/e2e/suite/cluster/tls.go Minor formatting fix
tests/e2e/suite/availability/*.go Refactored to use new action helpers
tests/e2e/pd/pd.go Simplified tests by removing redundant scale tests
tests/e2e/framework/*.go Moved test helpers to action package, added generic wait functions
tests/e2e/data/*.go Added utility functions for template annotations
pkg/runtime/*.go Added generated setter methods for template labels/annotations
pkg/controllers/pd/*.go Removed unused status check logic
pkg/apiutil/core/v1alpha1/group.go Added template annotation utility functions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fgksgf
Copy link
Member

fgksgf commented Nov 7, 2025

/lgtm

@ti-chi-bot ti-chi-bot bot added the lgtm label Nov 7, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Nov 7, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-11-07 01:40:54.792418087 +0000 UTC m=+407104.235447966: ☑️ agreed by fgksgf.

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Nov 7, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fgksgf

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

The pull request process is described 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 approved label Nov 7, 2025
@ti-chi-bot ti-chi-bot bot merged commit 06a65da into pingcap:feature/v2 Nov 7, 2025
15 checks passed
liubog2008 added a commit to liubog2008/tidb-operator that referenced this pull request Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants