Skip to content

Cleaner boundary between CLI and SDK usage#45

Open
klemen1999 wants to merge 1 commit into
mainfrom
fix/cli_sdk_boundary
Open

Cleaner boundary between CLI and SDK usage#45
klemen1999 wants to merge 1 commit into
mainfrom
fix/cli_sdk_boundary

Conversation

@klemen1999
Copy link
Copy Markdown
Collaborator

Purpose

This PR introduces more clear split between CLI and SDK usage on the architectural level. Longterm this ensuers cleaner code and easier maintainability

Split service functions in models, variants, and instances into:

  • pure SDK functions that return typed objects / raise exceptions
  • thin CLI wrappers that handle printing and terminal exits
  • Added typed not-found handling via ResourceNotFoundError
  • Added central CLI exception translation through run_cli()
  • Removed CLI-only concerns like silent / field from SDK-facing service functions
  • Updated convert exported-instance resolution to use SDK-safe polling and handle eventual consistency correctly
  • Added focused regression tests for the SDK/CLI boundary and exported-instance resolution

Specification

None / not applicable

Dependencies & Potential Impact

None / not applicable

Deployment Plan

None / not applicable

Testing & Validation

None / not applicable

AI Usage

Assisted-by: Codex

Submitted code was reviewed by a human: YES

The author is taking the responsibility for the contribution: YES

@klemen1999 klemen1999 requested a review from dtronmans May 22, 2026 12:33
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