Skip to content

fix(cli): surface container port in compute deploy/update output#116

Closed
tonychang04 wants to merge 1 commit into
mainfrom
fix/compute-port-output
Closed

fix(cli): surface container port in compute deploy/update output#116
tonychang04 wants to merge 1 commit into
mainfrom
fix/compute-port-output

Conversation

@tonychang04
Copy link
Copy Markdown
Contributor

@tonychang04 tonychang04 commented May 11, 2026

Summary

  • Print Port: <n> alongside Endpoint: on compute deploy and compute update success output (both image mode and source mode)
  • Helps users spot image-vs-port mismatches — e.g. nginx:alpine (listens on 80) deployed with the default --port 8080 results in an unreachable endpoint with no signal in the CLI output

Before

✓ Service "my-api" deployed [running]
  Endpoint: https://my-api-....fly.dev

After

✓ Service "my-api" deployed [running]
  Endpoint: https://my-api-....fly.dev
  Port: 8080 (container must listen on this port)

Test plan

  • npx @insforge/cli compute deploy --name test --image nginx:alpine shows Port: 8080 (and endpoint is unreachable — confirms the line surfaces the misconfiguration)
  • npx @insforge/cli compute deploy --name test --image nginx:alpine --port 80 shows Port: 80 (and endpoint serves the nginx welcome page)
  • npx @insforge/cli compute update <id> --port 80 shows the updated port

🤖 Generated with Claude Code


Summary by cubic

Show the container port alongside the endpoint in @insforge/cli compute deploy and update success output. This helps catch image-vs-port mismatches (e.g., nginx on 80 vs --port 8080).

  • Bug Fixes
    • compute deploy: prints “Port: (container must listen on this port)” in both image and source modes.
    • compute update: includes “Endpoint:” and “Port:” in the success output.

Written for commit 299e2b6. Summary will update on new commits.

Summary by CodeRabbit

  • New Features
    • compute deploy now shows the configured container port in text output for both image and source deployments.
    • compute update now shows the service endpoint URL and the configured container port in text output after successful updates.
    • Port lines include a note that the container must listen on the specified port.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3c5b0e1e-288e-4808-8012-4e26fd3c48d9

📥 Commits

Reviewing files that changed from the base of the PR and between 4cdd892 and 299e2b6.

📒 Files selected for processing (2)
  • src/commands/compute/deploy.ts
  • src/commands/compute/update.ts
✅ Files skipped from review due to trivial changes (1)
  • src/commands/compute/deploy.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/commands/compute/update.ts

Walkthrough

The compute service CLI now prints the configured container port in deploy (image and source modes) non-JSON output, and the update command additionally prints the endpoint URL and port in non-JSON success output.

Changes

Compute Service Output Enhancement

Layer / File(s) Summary
Deploy Port Output
src/commands/compute/deploy.ts
In image mode (lines 142–145) and source mode (lines 270–273), a Port: line is printed with the selected container port and a note that the container must listen on that port.
Update Endpoint and Port Output
src/commands/compute/update.ts
After a successful service update (lines 131–135), the command conditionally prints Endpoint and Port fields, with port output including the listening requirement note.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 A port now printed for all to see,
Deploy and update, wild and free!
The container listens, the endpoints show,
CLI wisdom in a friendly glow.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: surfacing the container port in compute deploy/update command output for better visibility of configuration issues.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/compute-port-output

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Tip: cubic could auto-approve low-risk PRs like this, if it thinks it's safe to merge. Learn more

Print "Port: <n>" alongside the endpoint on success so users can spot
image-vs-port mismatches (e.g. nginx:alpine listening on 80 deployed
with the default --port 8080) without having to inspect the service.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tonychang04 tonychang04 force-pushed the fix/compute-port-output branch from 4cdd892 to 299e2b6 Compare May 12, 2026 17:22
@tonychang04
Copy link
Copy Markdown
Contributor Author

Consolidated into #109 (the compute port output fix is now part of the unified PR for combined review/merge).

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