-
Notifications
You must be signed in to change notification settings - Fork 23
Clean up existing deployment printing #1704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up existing deployment printing #1704
Conversation
WalkthroughCentralized deployment-location presentation by adding printExistingDeployments(), called from confirmDeploymentToNewLocation; removed the prior NonInteractive-specific warning path. Also fixed AccountInfo.String() region concatenation to append the region value directly. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.5.0)level=warning msg="[linters_context] running gomodguard failed: unable to read module file go.mod: current working directory must have a go.mod file: if you are not using go modules it is suggested to disable this linter" Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/cmd/cli/command/compose.go (1)
232-244: printExistingDeployments: centralized, sorted, de‑duplicated output looks goodThe helper cleanly centralizes existing-deployment display, and sorting +
slices.Compactensures stable, non-duplicated lines without extra blank output. The use ofcliClient.AccountInfohere also leverages the fixedString()representation so there’s no stray%or hard-coded “region” wording anymore.If you want a tiny optimization, you could preallocate the slice:
deploymentStrings := make([]string, 0, len(existingDeployments))but that’s strictly optional.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/cmd/cli/command/compose.go(1 hunks)src/pkg/cli/client/account_info.go(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/cmd/cli/command/compose.go (4)
src/protos/io/defang/v1/fabric.pb.go (7)
Deployment(3035-3050)Deployment(3063-3063)Deployment(3078-3080)Provider(28-28)Provider(66-68)Provider(70-72)Provider(79-81)src/pkg/term/colorizer.go (1)
Info(302-304)src/pkg/cli/client/provider_id.go (1)
ProviderID(10-10)src/pkg/cli/client/account_info.go (1)
AccountInfo(5-10)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyze (go)
🔇 Additional comments (2)
src/pkg/cli/client/account_info.go (1)
12-17: AccountInfo.String(): formatting fix looks correctBuilding the region suffix with simple concatenation now avoids leaking the literal
%sand drops the extra “region” word, so strings like"<provider> account <id> in <region>"render as intended. No further changes needed here.src/cmd/cli/command/compose.go (1)
246-258: [rewritten review comment]
[classification tag]
Description
In #1687, I moved the existing deployments list from behind a
?keypress into the spotlight.In the first deployment I did without the agent, I saw this:
New output looks like this:
This PR does the following:
%before the regionLinked Issues
Checklist
Summary by CodeRabbit
Bug Fixes
Chores
✏️ Tip: You can customize this high-level summary in your review settings.