Print model push summary before watch/tail/wait - #49
Merged
Conversation
marius-baseten
approved these changes
Aug 6, 2026
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adjusts model push CLI output and flag validation so users see the push summary earlier, and --wait provides a final “settled” verdict while keeping JSON output cleanly separated.
Changes:
- Print the push summary immediately after deployment creation (stderr in JSON mode) so links are available while the deployment is still building.
- Add
--watch+--waitvalidation error and cover it with tests. - Add
--wait-only settled verdict messaging and update existing tests for the new output ordering.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| internal/cmd/command.model_push.go | Moves summary earlier, adds --watch && --wait validation, changes JSON emission timing, and adds --wait settled-verdict messaging. |
| internal/cmd/command.model_push_test.go | Updates assertions to reflect new summary timing/output streams and adds a new validation test for --watch + --wait. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
131
to
+148
| switch { | ||
| case flags.Watch: | ||
| err = watchModelPushDeployment(ctx, api.API(), created, flags) | ||
| case flags.Tail: | ||
| err = tailModelPushDeployment(ctx, api.API(), created, flags.Wait) | ||
| case flags.Wait: | ||
| err = waitModelPushDeployment(ctx, api.API(), created) | ||
| // Only --wait sees the deployment settle, so only it reports how: a bare | ||
| // --tail streams past ACTIVE and ends on interrupt. The summary already | ||
| // announced the push; this says whether the deployment came up. | ||
| if err == nil { | ||
| if created.Deployment.Status == managementapi.DeploymentStatus_ACTIVE { | ||
| printf("\n✅ Model %s is deployed and active\n", created.Model.Name) | ||
| } else { | ||
| printf("\n⚠️ Model %s was pushed but the deployment did not become active (status: %s)\n", | ||
| created.Model.Name, created.Deployment.Status) | ||
| } | ||
| } |
cretz
force-pushed
the
cretz/push-summary-before-watch
branch
from
August 7, 2026 14:28
76639fd to
9f2b252
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 What
model pushprints the summary card (IDs, endpoint, logs URL) immediately after the deployment is created, instead of after--watch/--tail/--waitfinish.--watch --waitis now a usage error;--waitwas silently ignored before.--waitprints a settled verdict at the end: active, or a warning with the failure status.💻 How
--waitcase.🔬 Testing
--watch --waitvalidation coverage and assertions for the new verdict lines;--tail-only asserts no verdict.