Skip to content

Narrow v1 deprecation warnings to workspace creation - #139

Open
kesmit13 wants to merge 1 commit into
mainfrom
narrow-v1-deprecation-warnings
Open

kesmit13 wants to merge 1 commit into
mainfrom
narrow-v1-deprecation-warnings

Conversation

@kesmit13

@kesmit13 kesmit13 commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The v1 deprecation warnings added recently fired on nearly every v1 path, and read as if anyone still using workspace groups should switch to clusters. This narrows them to the places where the caller is making a choice that clusters should replace.

Still warns

  • manage_workspaces(): unchanged.
  • Fusion CREATE WORKSPACE GROUP / CREATE WORKSPACE: the message is now "… is deprecated: new deployments should be clusters. Use CREATE CLUSTER instead."

No longer warns

  • All other Fusion WORKSPACE / WORKSPACE GROUP commands, and the version-less SHOW REGIONS
  • The IN GROUP clause on Fusion Stage commands
  • version='v1' (explicit, or inherited from management.version) on manage_files, manage_regions, get_organization, get_secret and get_stage. _warn_if_deprecated_version and the DEPRECATED_* constants are removed.

The README, docs/src/api.rst, the Fusion Stage help text and the Fusion README are updated to match.

Not changed

  • The .. deprecated:: docstring notes on management/v1/ modules and classes (enforced by TestV1IsDocumentedAsDeprecated). They are documentation, not runtime warnings, so this PR leaves them alone. They could get the same softening in a follow-up.
  • No whatsnew entry; that is written at release.

Test plan

  • pytest -n 0 -m 'not management' singlestoredb/tests/test_management_versioning.py singlestoredb/tests/test_fusion.py: 70 passed
  • pre-commit run: clean
  • Sphinx build of docs/src: no warnings from api.rst
  • Management suites (TestWorkspaceFusion live IN GROUP test now asserts no warning) run in CI / nightly

🤖 Generated with Claude Code


Note

Low Risk
Behavior change is limited to fewer DeprecationWarnings and doc text; v1 APIs and Fusion commands still run, with tests updated for the new warning scope.

Overview
Narrows management API v1 deprecation warnings so they only fire when someone is choosing to create a new deployment, not when operating existing workspace groups.

Still warns: manage_workspaces() (unchanged) and Fusion CREATE WORKSPACE GROUP / CREATE WORKSPACE — message is now "… is deprecated: new deployments should be clusters. Use CREATE CLUSTER instead."

No longer warns: other Fusion WORKSPACE / WORKSPACE GROUP commands (including SHOW REGIONS), Stage IN GROUP, and version='v1' on manage_files, manage_regions, get_organization, get_secret, and get_stage. The global _warn_if_deprecated_version hook and DEPRECATED_MANAGEMENT_VERSION constants are removed.

Docs (README, api.rst, Fusion Stage help) and tests are updated to match the narrower policy.

Reviewed by Cursor Bugbot for commit 2498f6b. Bugbot is set up for automated code reviews on this repo. Configure here.

The v1 deprecation warnings fired on every WORKSPACE command and on
every entry point that resolved to v1, telling owners of existing
workspace groups to switch to clusters when nothing requires it.

Keep warnings only where they steer a choice the caller is making now:
manage_workspaces(), and the Fusion CREATE WORKSPACE GROUP and CREATE
WORKSPACE commands, whose message now says new deployments should be
clusters. Remove the rest: the other Fusion WORKSPACE commands and
version-less SHOW REGIONS, the IN GROUP clause on Stage commands, and
the version='v1' warning on manage_files, manage_regions,
get_organization, get_secret and get_stage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Checked-in generated documentation still publishes the previous warning policy.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
What changed in this PR

Narrows v1 deprecation warnings to workspace creation while keeping existing v1 resource operations silent.

Changes:

  • Removes generic v1 management warnings.
  • Warns only for workspace creation commands.
  • Updates tests and source documentation.
File Description
README.md Clarifies v1 warning scope.
docs/​src/​api.rst Updates API deprecation guidance.
singlestoredb/​_management_version.py Removes deprecated-version constant.
singlestoredb/​management/​_version_import.py Removes generic warning machinery.
singlestoredb/​management/​files.py Makes v1 file management silent.
singlestoredb/​management/​region.py Makes v1 region management silent.
singlestoredb/​fusion/​handler.py Revises creation warning text.
singlestoredb/​fusion/​handlers/​workspace.py Limits warnings to creation commands.
singlestoredb/​fusion/​handlers/​utils.py Removes IN GROUP warnings.
singlestoredb/​fusion/​handlers/​stage.py Updates Stage help text.
singlestoredb/​fusion/​README.md Softens v1 terminology.
singlestoredb/​tests/​test_fusion.py Tests narrowed Fusion warnings.
singlestoredb/​tests/​test_management_versioning.py Tests silent v1 routing.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/src/api.rst

This branch was successfully deployed

1 active deployment
Base — 2498f6bd Deployed Oct 1, 2026 by kesmit13 via test-coverage #539
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.

2 participants