Skip to content

Seeweb backend: pydantic v2 alignment and review fixes - #1

Open
peterschmidt85 wants to merge 1 commit into
Seeweb:masterfrom
dstackai:seeweb-pydantic-v2
Open

Seeweb backend: pydantic v2 alignment and review fixes#1
peterschmidt85 wants to merge 1 commit into
Seeweb:masterfrom
dstackai:seeweb-pydantic-v2

Conversation

@peterschmidt85

Copy link
Copy Markdown

Review fixes for dstackai#4070, targeting this fork's master so the main PR picks them up on merge.

Changes

  • Migrate the configurator and backend-data models to pydantic v2 idioms (validate_extra_ignore, model_validate, model_dump_json) — dstack dropped the v1 shims, so __response__/parse_obj/.dict()/.json() now fail at runtime.
  • Add the unallocated_resources parameter to get_offers_by_requirements (the ComputeWithFilteredOffersCached signature gained it; without it every offer listing raises TypeError).
  • Update tests to gpuhunt's CatalogItem (RawCatalogItem was removed; provider is now required).
  • Compose the first-boot script from the base helpers (get_setup_cloud_instance_commands + get_shim_pre_start_commands + get_shim_env) instead of slicing get_shim_commands()[:-1], and write /etc/dstack-shim.env from the env dict rather than env | grep.
  • Align server/action statuses with the ecsapi SDK enums — notably adds the canonical Fail server status, which the previous set missed (a failed server would poll to the provisioning timeout instead of failing fast).
  • Docs: control-panel section is Compute (not Calculation); drop the provisioning-internals paragraph; revert the /CI_TESTING.md .gitignore entry.

Verification

  • pytest src/tests/_internal/core/backends/seeweb src/tests/_internal/server/routers/test_backends.py — 67 passed, 36 skipped; ruff clean.
  • Live e2e on real Seeweb servers (L40S and RTX PRO 6000, both terminated after): systemd-managed shim comes up after the first-boot reboot, shim healthcheck reachable in ~5–13 min, CUDA 13 containers verified via NVIDIA forward compatibility (cuInit in-container on both GPUs), and NoCapacityError fallthrough exercised against sold-out plans.

🤖 Generated with Claude Code

- Migrate configurator and backend-data models to pydantic v2 idioms
- Add unallocated_resources to get_offers_by_requirements (current base signature)
- Update tests to gpuhunt CatalogItem
- Compose the first-boot script from base helpers instead of slicing
  get_shim_commands(); write the shim env file from get_shim_env()
- Align server/action statuses with Seeweb's ecsapi enums (add missing "Fail")
- Docs: correct control-panel section name, drop implementation-detail paragraph
- Revert the /CI_TESTING.md .gitignore entry

Co-Authored-By: Claude Fable 5 <noreply@anthropic.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