Skip to content

fix(dbprovider): port PolarDB-X resource operation repairs - #14

Draft
mlhiter wants to merge 1 commit into
mainfrom
asuncion/pr-7358-sync
Draft

mlhiter wants to merge 1 commit into
mainfrom
asuncion/pr-7358-sync

Conversation

@mlhiter

@mlhiter mlhiter commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Port labring/sealos#7358 at 09e154a9c477b4002af3bab84e4c2e8d4ecbca9e into release-v5.1/database, retaining original author attribution and adapting paths to the standalone repository.

Repair PolarDB-X DN replica selection, CPU/memory units, component-specific scaling, restart component lists, expansion through existing data volume templates, logical storage display, normalized resource history, and API responses based on observed Cluster resources. Includes the component-selection fix previously ported from #7327 in #3; this PR can replace that older port. Refs #2.

Validation

  • All 31 utility tests passed on Node 20.4.0, including 11 imported PolarDB-X regression tests.
  • Targeted source ESLint, Prettier, git diff --check, and staged Gitleaks passed.
  • Frozen-lockfile installation and workspace dependency builds passed (installation used Node 23.11.0).
  • Type checking is blocked by the unchanged src/components/ErrorLog/LogCounts.tsx import of emptyChart.svg (TS2307).
  • Production application build and live-cluster scaling/restart acceptance were not run. No database or cluster resources were modified.

Sequence Diagram

sequenceDiagram
    participant User
    participant API as Database API
    participant Mapper as PolarDB-X resource mapper
    participant K8s as KubeBlocks API
    User->>API: Request resource change or restart
    API->>K8s: Read current Cluster components and volumes
    K8s-->>API: Current resource specification
    API->>Mapper: Normalize units and compare desired resources
    alt Resources changed
        Mapper-->>API: OpsRequest for changed components and existing volumes
        API->>K8s: Submit OpsRequest
    else No resource changes
        Mapper-->>API: Keep current resources
    end
    API->>K8s: Read observed Cluster resources
    K8s-->>API: Current resource values
    API-->>User: Return normalized observed values
Loading

Port labring/sealos#7358 at 09e154a9c477b4002af3bab84e4c2e8d4ecbca9e into release-v5.1/database, adapting paths to the standalone workspace.

Co-authored-by: 谢金虎 <1050780355@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant