Repository navigation
--no-public-ip output: warnings once, 'none (private only)' in the ready box; unquote bool flag help (#1443, #1441) - #1452
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…IP, unquote bool flag help (#1443, #1441) PreflightNoPublicIP writes each line once per client, so Launch's repeat check after the CLI's (and each job array member's) adds nothing. The launch summary shows 'none (private only)' for an instance with no public IP, and a --no-public-ip launch skips the public-IP lookup. Backticks in three bool flags' usage made pflag show 'spawn connect' as a value name; a gate walks every command's bool flags through pflag.UnquoteUsage. Fixes #1443 Fixes #1441
scttfrdmn
force-pushed
the
fix/1443-1441-nopub-output
branch
from
October 31, 2026 00:01
0a1ca0b to
0a963e3
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.
Fixes #1443
Fixes #1441
#1443:
--no-public-iplaunch outputPreflightNoPublicIPnow writes each line throughClient.reportPreflightOnce. A line this client has already written is skipped. So whenLaunchrepeats the check after the CLI's (a cache hit), it prints nothing new, and job array members, each checked inLaunch, don't repeat the warnings either. The safety check itself still runs and still refuses the launch exactly as before; only the duplicate output is gone.io.Discardand then to stderr would see nothing the second time. No caller does that today (only tests useio.Discard).progress.renderSuccessshowsprogress.NoPublicIP("none (private only)") whenPublicIPis empty. The dry run'snoPublicIPPlanis now that same constant. A--no-public-iplaunch also skips the "Getting public IP" step (launchedPublicIP), so it no longer looks up an address that doesn't exist.#1441: bool flag help with a bogus value name
UnquoteUsagetreats the first back-quoted span in a usage string as the flag's value name. There was no generic gate for this, so this PR addsTestBoolFlagUsageHasNoValueName. It walks every command underrootCmd, runs each bool flag inLocalFlags()throughpflag.UnquoteUsage, and fails on any value name. If the walk finds no bool flags at all, it fails, because that means the walk is broken.--no-public-ip,--allow-missing-endpointsand--wait-for-ssh. The backticks are gone from all three.make gen-docsregenerateddocs-gen/launch.md.Gates (each watched failing against a revert that compiles)
TestPreflightNoPublicIPRepeatPrintsNothingNew(pkg/aws): a wire fake whose interface endpoints sit only in the other AZ, so the check warns four times. The test checks the same subnet twice. The first check must print exactly 4 cross-AZ warnings, and the second must print nothing.reportPreflightOncealways writes): FAIL, and all 4 warnings print again on the second check.TestSuccessSummaryNamesAMissingPublicIP(pkg/progress): the empty-IP row must readnone (private only), and a real IP must be shown unchanged.row " Public IP " shows "", the exact symptom from the issue.TestLaunchedPublicIPSkipsTheLookupForNoPublicIP(cmd): counts calls to the lookup function: 0 under--no-public-ip, 1 otherwise.1 lookups.TestBoolFlagUsageHasNoValueName: on unmodified main it fails for the three flags above. It passes with the fix.Checks
make check,make lint(0 issues),semgrep scan --config=auto --error ., andmake gen-docs+make check-docs(clean).make api-snapshotshowed no change:progress.NoPublicIPis new and exported, but pkg/progress is not in the snapshot set.This touches
pkg/aws/client.goonly to add oneClientfield, next toprivateNets.