Skip to content

Report activate and deactivate no-ops in text output - #74

Merged
cretz merged 1 commit into
mainfrom
cretz/activate-noop
Sep 10, 2026
Merged

cretz merged 1 commit into
mainfrom
cretz/activate-noop

Conversation

@cretz

@cretz cretz commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

🚀 What

  • Text output now says "was already active/inactive; nothing to do" when activate/deactivate was a no-op, for both deployments and environments
  • Help text documents that (de)activation is idempotent

Pending basetenlabs/baseten-go#37 and need to update go.mod after that merges

💻 How

  • Branch on the new no_op response field in the four activate/deactivate handlers; JSON output unchanged

🔬 Testing

  • Unit tests for the four no-op paths
  • New e2e Activate phase asserting an activate against the already-active deployment returns success: true, no_op: true and prints the no-op line

@cretz
cretz requested review from marius-baseten and a lite review from Copilot September 4, 2026 18:03

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.

🟢 Approval recommended

The no-op behavior is implemented consistently across deployment/environment handlers and is covered by both unit tests and an e2e assertion for the new output.

Pull request overview

Updates the CLI’s human-readable (text) output to explicitly report when model deployment/environment activate/deactivate operations are no-ops (already active/inactive), while keeping the JSON output behavior as a direct passthrough of the API response. This also documents idempotency in command help text and adds both unit and e2e coverage for the new no-op paths.

Changes:

  • Add no_op-aware text-mode messages for model deployment/environment activate/deactivate handlers.
  • Extend command help text to document idempotent (de)activation behavior and the corresponding text output.
  • Add unit tests for no-op responses and an e2e “Activate” phase asserting the success/no_op JSON shape and the text no-op line.
File summaries
File Description
internal/e2e-tests/model_test.go Adds an e2e phase validating idempotent activation behavior (JSON no_op and text message).
internal/cmd/command.model_environment.go Updates environment activate/deactivate text output to report no-op cases.
internal/cmd/command.model_environment_test.go Adds unit tests for environment activate/deactivate no-op responses.
internal/cmd/command.model_deployment.go Updates deployment activate/deactivate text output to report no-op cases.
internal/cmd/command.model_deployment_test.go Adds unit tests for deployment activate/deactivate no-op responses.
cmd/command.model_environment.go Updates help text to document idempotency and no-op text output for environment (de)activation.
cmd/command.model_deployment.go Updates help text to document idempotency and no-op text output for deployment (de)activation.
go.mod Bumps github.com/basetenlabs/baseten-go dependency to a newer pseudo-version.
go.sum Updates checksums for the bumped baseten-go pseudo-version.
Review details
  • Files reviewed: 8/9 changed files
  • Comments generated: 0
  • Review effort level: Lite

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

@cretz
cretz merged commit 02afde5 into main Sep 10, 2026
7 of 8 checks passed
@cretz
cretz deleted the cretz/activate-noop branch September 10, 2026 13:57
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.

3 participants