Skip to content

Fix/completion database storage resources - #245

Merged
aru-amedeo merged 4 commits into
mainfrom
fix/completion-database-storage-resources
Jun 20, 2026
Merged

Fix/completion database storage resources#245
aru-amedeo merged 4 commits into
mainfrom
fix/completion-database-storage-resources

Conversation

@aru-amedeo

Copy link
Copy Markdown
Member

completion database and storage resources as done with network

amedeopalopoli and others added 4 commits June 19, 2026 15:16
…ub-resources

Database family:
- completeDBaaSDatabaseID: was returning nil for args[0] (dbaas-id slot);
  now delegates to completeDBaaSID. Registered on database create and list,
  which had no ValidArgsFunction.
- completeDBaaSUserID: same fix. Registered on user create and list.
- completeGrantID: was returning nil for args[0] and args[1]; now delegates
  to completeDBaaSID ? completeDBaaSDatabaseID in order. Registered on all
  four grant commands (create, list, get, delete), none of which had
  ValidArgsFunction.

Storage family:
- storage backup create (storageBackupCmd): the positional [volume-id] arg
  had no completion; registered completeBlockStorageID.
- storage restore create (storageRestoreCmd): [backup-id] [volume-id] args
  had no completion; added completeStorageRestoreCreateArgs which completes
  backup IDs at args[0] and block storage (volume) IDs at args[1].

Security family: no changes needed ? key and kmip resolve their KMS parent
via --kms-id flag (already read in completeKeyID/completeKmipID), and all
create/list commands in that family take no positional args.

Tests: added coverage for all new delegation paths and too-many-args guards
in completion_test.go.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…resources

Network resources (from #240):
- subnet.md, securitygroup.md, vpcpeering.md: expand bare stubs into
  full examples showing parent-slot completion at args[0] and child-slot
  completion at args[1].
- securityrule.md, vpcpeeringroute.md: extend existing completion sections
  to show all three positional slots (were showing only the final slot).

Database resources (from #241):
- dbaas.database.md: add Shell Auto-completion section (dbaas-id ? database-name).
- dbaas.user.md: add Shell Auto-completion section (dbaas-id ? username).
- dbaas.grant.md: add Shell Auto-completion section (dbaas-id ? database-name ? grant-id).

Storage resources (from #241):
- backup.md: mark volume-id argument as supporting auto-completion.
- restore.md: document create-command hierarchical completion (backup-id
  then volume-id), in addition to the existing get/list/delete section.

getting-started.md:
- Expand Storage section to cover backup create and restore create completion.
- Add Database section showing sub-resource hierarchical completion examples.
- Update closing note to mention create and list commands now also complete.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Mirror the English doc changes in the Italian translations under
docs/website/i18n/it/docusaurus-plugin-content-docs/current/:

Network resources:
- subnet.md, securitygroup.md, vpcpeering.md: expand bare stubs into
  full examples showing parent-slot completion.
- securityrule.md, vpcpeeringroute.md: extend to show all three
  positional slots (were showing only the final slot).

Database resources:
- dbaas.database.md: add "Auto-completamento Shell" section.
- dbaas.user.md: add "Auto-completamento Shell" section.
- dbaas.grant.md: add "Auto-completamento Shell" section (3-level chain).

Storage resources:
- backup.md: mark volume-id argument as supporting auto-completion.
- restore.md: add create-command auto-completion block (backup-id then
  volume-id).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Covers all changes since v0.5.1:
- feat: context auto-selection (#234)
- feat: clear-contexts prompt on profile switch (#236)
- fix: shell completion parent-ID slots for network sub-resources (#239/#240)
- fix: shell completion parent-ID slots for database/storage sub-resources (#241)
- fix: zone value in docs examples (#238)
- docs: English and Italian completion section updates

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.20%. Comparing base (209d563) to head (9cecd3c).
⚠️ Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #245      +/-   ##
==========================================
+ Coverage   78.14%   78.20%   +0.05%     
==========================================
  Files          53       53              
  Lines       12569    12593      +24     
==========================================
+ Hits         9822     9848      +26     
+ Misses       1576     1575       -1     
+ Partials     1171     1170       -1     
Flag Coverage Δ
unittests 78.20% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aru-amedeo
aru-amedeo marked this pull request as ready for review June 20, 2026 15:28
@aru-amedeo
aru-amedeo merged commit 3eb732a into main Jun 20, 2026
12 checks passed
aru-amedeo pushed a commit that referenced this pull request Jun 20, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@aru-amedeo
aru-amedeo deleted the fix/completion-database-storage-resources branch June 20, 2026 18:07
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.

2 participants