Skip to content

cubeapi: fix paused state parsing in sandbox list#270

Open
YangYuS8 wants to merge 1 commit into
TencentCloud:masterfrom
YangYuS8:fix/cubeapi-paused-list-state
Open

cubeapi: fix paused state parsing in sandbox list#270
YangYuS8 wants to merge 1 commit into
TencentCloud:masterfrom
YangYuS8:fix/cubeapi-paused-list-state

Conversation

@YangYuS8
Copy link
Copy Markdown
Contributor

Summary

  • Fix CubeAPI list status parsing for CubeMaster/Cubelet container state values.
  • Return paused for list entries whose CubeMaster status is CONTAINER_PAUSED (5).
  • Add a focused regression test for numeric and string paused list status values.

Fixes #218

Tests

  • cargo fmt --check
  • cargo +stable test
  • cargo +stable clippy --all-targets --all-features
  • Local HTTP verification with CubeAPI against a mock CubeMaster:
    • GET /sandboxes returns state: paused
    • GET /sandboxes/{id} still returns state: paused
    • GET /v2/sandboxes?state=paused returns the paused sandbox

Note: repo rust-toolchain 1.85.1 cannot run the current lockfile locally because time@0.3.47 requires rustc 1.88+.

Signed-off-by: YangYuS8 <YangYuS8@163.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.

[Bug Report] GET /sandboxes list API reports state as 'running' for paused sandboxes

1 participant