feat: add deployments show subcommand - #125
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
…deployments_view
…deployments_view
This comment has been minimized.
This comment has been minimized.
…deployments_view
This comment has been minimized.
This comment has been minimized.
…deployments_view
This comment has been minimized.
This comment has been minimized.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new poly deployments show <hash> CLI subcommand to inspect a single deployment’s full metadata and compute the sandbox deployments included since the prior deployment in the selected environment (sandbox/pre-release/live).
Changes:
- Added
deployments showargparse subcommand with positionalhashand--envselector. - Implemented
AgentStudioCLI.deployments_show()plus shared_resolve_included_deployments()slicing logic for included/rollback determination. - Added Rich console rendering via
print_deployment_show()and comprehensive CLI tests for JSON/rich output and cross-environment inclusion resolution.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/poly/cli.py |
Adds the deployments show subcommand, routing in _run_command, and the deployments_show() / _resolve_included_deployments() implementations. |
src/poly/output/console.py |
Adds Rich output helper print_deployment_show() to render a deployment plus its included deployments. |
src/poly/tests/cli_test.py |
Adds DeploymentsShowTest coverage for error cases, JSON structure, env routing, hash-prefix matching, and rich output invocation. |
Comment on lines
+518
to
+526
| version_hash = deployment.get("version_hash") | ||
| deployment_type = meta.get("deployment_type") | ||
| deployment_message = meta.get("deployment_message") or "-" | ||
| created_at = deployment.get("created_at", "") | ||
| created_by = deployment.get("created_by", "") | ||
| deployment_id = deployment.get("id") | ||
| client_env = deployment.get("client_env") | ||
| artifact_version = deployment.get("artifact_version") | ||
| lambda_deployment_version = deployment.get("function_deployment_version") |
oeisenberg
approved these changes
May 8, 2026
oeisenberg
left a comment
Contributor
There was a problem hiding this comment.
might want to review the Copilot comments
Contributor
Coverage Report
Changed file coverage
|
8 tasks
AaronForinton
added a commit
that referenced
this pull request
May 14, 2026
## Summary This work relates to PR #125 ## Motivation <!-- Why is this change needed? Link to an issue if applicable. --> Closes #<!-- issue number --> ## Changes <!-- Bullet list of the key changes. Focus on *what* changed, not *how*. --> - ## Test strategy <!-- How did you verify this works? Check all that apply. --> - [ ] Added/updated unit tests - [ ] Manual CLI testing (`poly <command>`) - [ ] Tested against a live Agent Studio project - [x] N/A (docs, config, or trivial change) ## Checklist - [ ] `ruff check .` and `ruff format --check .` pass - [ ] `pytest` passes - [x] No breaking changes to the `poly` CLI interface (or migration path documented) - [ ] Commit messages follow [conventional commits](https://www.conventionalcommits.org/) ## Screenshots / Logs <!-- Optional: paste terminal output, screenshots, or before/after diffs if helpful. --> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.
Summary
Adds
poly deployments show <hash>subcommand to display detailed metadata for a specific deployment and the sandbox deployments included since the previous version in the given environment.Motivation
When reviewing deployment history, users need to drill into a specific version to see its full metadata (deployment ID, artifact version, lambda version, message, etc.) and understand which sandbox deployments were bundled into a promotion to pre-release or live.
Changes
showsubparser underdeploymentswithhashpositional arg and--envflag (sandbox/pre-release/live)deployments_show()and_resolve_included_deployments()methods toAgentStudioCLIprint_deployment_show()rich console output functionTest strategy
poly <command>)Checklist
ruff check .andruff format --check .passpytestpassespolyCLI interface (or migration path documented)Screenshots / Logs
Default sandbox:


Live push: