Repository navigation
[cli] Explain valid instance names on launch failure - #5533
dialga-cmd wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the change clarifying invalid instance-name errors with naming rules and a documentation link.
No open issues 🎉
What changed in this PR
Improves the CLI launch error for invalid instance names, addressing #4906 by explaining how users can correct a rejected name.
Changes:
- Adds allowed-character and start/end requirements to the error message.
- Links to the instance-name format reference while preserving the existing error prefix.
| File | Description |
|---|---|
src/client/cli/cmd/launch.cpp |
Expands the invalid-name launch error with naming rules and a documentation link. |
Review effort: Balanced
|
Hey @tobe2098 Thankyou for your time |
|
The remaining red checks are not code or test failures. All of them abort during dependency installation. Can someone rerun the failed jobs once the Snap Store is reachable? If this keeps happening, it may be worth adding retries or a mirror for the snap install steps. |
tobe2098
left a comment
There was a problem hiding this comment.
LGTM @dialga-cmd , once the tests pass we can merge
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/1.17 #5533 +/- ##
================================================
- Coverage 79.57% 70.93% -8.63%
================================================
Files 359 348 -11
Lines 19612 19159 -453
================================================
- Hits 15604 13589 -2015
- Misses 4008 5570 +1562 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
When the requested instance name is invalid, say what the rules are and link to the instance name format reference instead of only echoing the rejected name. Fixes canonical#4906
|
Hi @tobe2098, I added a unit test covering the new invalid-instance-name error path (should fix the 0% patch coverage) and rebased onto the latest release/1.17 with no conflicts. The commit is signed and verified. Could you please re-approve and approve the pending workflow runs on the new head (fd1ca5c)? Thanks! |
|
@tobe2098: update on the remaining red check. All checks pass except codecov/project. The patch check is now green: I added Client.launchCmdWithInvalidNameExplainsRules, which covers the new error path; all 40 Client.launchCmd* tests pass locally and in CI. codecov/project is failing on a mismatched baseline: it compares head fd1ca5c (70.93%, 348 files, 19,159 lines) against base b18f6d1 (79.57%, 359 files, 19,612 lines). The branch is actually up to date with release/1.17 (ahead 1, behind 0), and the two Git trees differ in only 2 files with identical source-file counts (654). The extra 11 files / 453 lines exist only in Codecov's base report, which looks carried forward from another branch — main has 49 more source files. A recent PR on release/1.17 (#5559) had a 70.93% baseline and passed. Could you refresh the coverage report attached to b18f6d1 (or correct Codecov's carryforward/base config) and re-run the Codecov checks here? With a correct ~70.93% baseline, there is no coverage drop. The rebase also dismissed the earlier approval, so a fresh review would be appreciated. I'd rather not loosen .codecov.yml in this PR since that would weaken coverage enforcement repo-wide. Thanks, and so sorry for the repeated failed tests and for bothering you again and again over one small PR. |
|
Update on I checked the Codecov API reports and both CI coverage job logs. The failure is not caused by this PR's 2-file change. The base report for This PR's coverage job ran the correct 50 tests for this branch, producing 3.7% Dart coverage. Codecov therefore sees a -8.63% drop against the inflated base. Evidence:
Could someone refresh the Codecov base report for |
Description
Related Issue(s)
Closes #4906
Testing
Unit tests: the existing CLI test checks the
Invalid instance name suppliedsubstring, which is retained.Manual testing steps:
Screenshots (if applicable)
N/A
Checklist
Additional Notes
Built and tested locally in an Ubuntu 24.04 container:
Client.launchCmd*unit tests pass (40 tests), including the newlaunchCmdWithInvalidNameExplainsRulestest.