Skip to content

[API] Restore public CLI handler compatibility imports - #1049

Open
podkidyshev wants to merge 3 commits into
ipod/api-handlers-movefrom
ipod/api-handlers-compat
Open

podkidyshev wants to merge 3 commits into
ipod/api-handlers-movefrom
ipod/api-handlers-compat

Conversation

@podkidyshev

@podkidyshev podkidyshev commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Restore public cloudai.cli.handlers imports as deprecated forwarding wrappers after the handler-module rename in [API] Move shared handlers out of the CLI package #1046.
  • Preserve each function's arguments, return value, and exceptions. Calls emit a DeprecationWarning at the caller.

Test Plan

  • Automated CI.
  • Manual local Python check: a legacy public handler listed registered agents and emitted one caller-facing deprecation warning.

Additional Notes

This PR changes only the compatibility module. Follow-ups: #1063 (CLI config/listing), #1064 (CLI execution), #1060 (Path API), #1061 (TOML text), and #1062 (background execution).

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (1)
CONTRIBUTING.md — configured

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: NVIDIA/cloudai/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 99d6d514-6f39-43b3-8e1d-1844891bdbc6

📥 Commits

Reviewing files that changed from the base of the PR and between 40311e3 and 0a24d07.

📒 Files selected for processing (1)
  • src/cloudai/cli/handlers.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The CLI handlers module adds deprecated wrappers for 19 handler functions. Each wrapper emits a DeprecationWarning and forwards the call to the matching function in cloudai.handlers.

Changes

CLI handler compatibility

Layer / File(s) Summary
Deprecated handler forwarding
src/cloudai/cli/handlers.py
A typed decorator preserves function metadata, emits a DeprecationWarning, and forwards arguments and return values. The module applies it to 19 public handler aliases.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 0a24d

The compatibility module restores legacy handler imports with deprecation warnings while preserving handler behavior. No actionable merge-blocking risk is established; merge after normal checks pass.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the restoration of public CLI handler compatibility imports, which is the main change.
Description check ✅ Passed The description directly explains the deprecated forwarding wrappers, compatibility goal, preserved behavior, and test plan.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@podkidyshev podkidyshev self-assigned this Sep 22, 2026
@podkidyshev podkidyshev changed the title [API] Restore deprecated CLI handler compatibility imports [API] Add programmable experiment execution and results Sep 22, 2026
@podkidyshev
podkidyshev force-pushed the ipod/api-handlers-compat branch from 64bc471 to ac72903 Compare September 28, 2026 12:53
@podkidyshev podkidyshev changed the title [API] Add programmable experiment execution and results [API] Separate CLI adapters and preserve public handler imports Sep 28, 2026
@podkidyshev
podkidyshev force-pushed the ipod/api-handlers-compat branch from ac72903 to 00eb42e Compare September 28, 2026 16:14
@podkidyshev podkidyshev changed the title [API] Separate CLI adapters and preserve public handler imports [API] Restore public CLI handler compatibility imports Sep 28, 2026
@podkidyshev
podkidyshev force-pushed the ipod/api-handlers-compat branch from 00eb42e to fd55bb0 Compare September 28, 2026 18:25
@podkidyshev
podkidyshev marked this pull request as ready for review October 1, 2026 21:20
Signed-off-by: Ivan Podkidyshev <ipodkidyshev@nvidia.com>
Signed-off-by: Ivan Podkidyshev <ipodkidyshev@nvidia.com>
Signed-off-by: Ivan Podkidyshev <ipodkidyshev@nvidia.com>
@podkidyshev
podkidyshev force-pushed the ipod/api-handlers-compat branch from 7b08159 to 0a24d07 Compare October 1, 2026 21:23
@podkidyshev
podkidyshev added this pull request to stack #1077 October 1, 2026 21:26

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant