Skip to content

fix(dbprovider): repair PolarDB-X resource operations - #7358

Open
wallyxjh wants to merge 1 commit into
labring:release-v5.1from
wallyxjh:codex/fix-polardbx-frontend
Open

wallyxjh wants to merge 1 commit into
labring:release-v5.1from
wallyxjh:codex/fix-polardbx-frontend

Conversation

@wallyxjh

Copy link
Copy Markdown
Contributor

What this PR fixes

  • use dn-0 as the PolarDB-X scaling component so replica shrink requests take effect
  • keep API and edit-form CPU/memory units consistent and stop multiplying already-normalized mCPU/Mi values
  • submit vertical and horizontal scaling only for components whose desired values actually changed
  • generate a valid restart request with the PolarDB-X component list
  • calculate volume expansion from the actual data volume templates; an existing 3Gi cluster now expands to 4Gi through gms/data instead of requesting a nonexistent dn-0/data template
  • keep displayed PolarDB-X storage aligned with the edit form's logical storage value
  • record PolarDB-X CPU/memory history in total form units and normalize equivalent Kubernetes quantities such as 1Gi and 1024Mi
  • return resource values read back from the Cluster instead of overlaying the requested values

This includes and extends the component-selection direction from #7327 and follows the GMS/DN volume-template boundary documented in labring/kubeblocks#63.

Verification

  • tsx --test for the PolarDB-X and related utility tests: 16 passed
  • DBProvider production next build: passed
  • Prettier check: passed
  • git diff --check: passed

Read-only validation on root@192.168.128.241 confirmed Kubernetes access and the KubeBlocks deployment is 1/1 Ready. The cluster currently has two MongoDB clusters, no PolarDB-X Cluster, and no OpsRequest, so destructive/runtime PolarDB-X scaling and restart operations were not run there. The generated OpsRequest shapes and compatibility cases are covered by the added tests.

@wallyxjh
wallyxjh requested a review from a team as a code owner October 10, 2026 10:30

This branch has not been deployed

No deployments
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.

1 participant