Skip to content

Add known-key completion for neofs-adm fschain set-config - #4177

Merged
roman-khimov merged 3 commits into
masterfrom
copilot/improve-autocomplete-neofs-adm
Sep 15, 2026
Merged

roman-khimov merged 3 commits into
masterfrom
copilot/improve-autocomplete-neofs-adm

Conversation

Copilot AI commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

neofs-adm fschain set-config already accepts a fixed set of well-known keys without --force, but it did not expose them via shell completion. This aligns its autocomplete behavior with set-policy and makes the supported key set discoverable at the CLI.

  • Completion support

    • Add ValidArgsFunction for fschain set-config
    • Return the well-known config keys as key= suggestions
    • Preserve ShellCompDirectiveNoSpace so values can be typed immediately after completion
  • Shared well-known key list

    • Centralize the completion candidates in a single list derived from the existing supported config keys
    • Keep autocomplete aligned with the keys already handled by parseConfigPair
  • Focused coverage

    • Add a unit test for the set-config completion output and directive
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
	return setConfigKnownArgs, cobra.ShellCompDirectiveNoSpace
}

Copilot AI linked an issue Sep 11, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Improve autocomplete for neofs-adm morph set-config Add known-key completion for neofs-adm fschain set-config Sep 11, 2026
Copilot AI requested a review from roman-khimov September 11, 2026 15:56

@roman-khimov roman-khimov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot, add changelog entry

Copilot AI commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

@copilot, add changelog entry

Addressed in 6e5d6f8.

@roman-khimov
roman-khimov marked this pull request as ready for review September 11, 2026 16:04
@codecov

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 31.16%. Comparing base (3a3655b) to head (3751df7).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4177      +/-   ##
==========================================
- Coverage   31.17%   31.16%   -0.01%     
==========================================
  Files         673      673              
  Lines       40778    40779       +1     
==========================================
- Hits        12712    12710       -2     
- Misses      28066    28069       +3     

☔ 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.

Copilot AI and others added 3 commits September 15, 2026 16:57
Co-authored-by: roman-khimov <22092804+roman-khimov@users.noreply.github.com>
Co-authored-by: Roman Khimov <roman@nspcc.ru>
@roman-khimov
roman-khimov force-pushed the copilot/improve-autocomplete-neofs-adm branch from 6e5d6f8 to 3751df7 Compare September 15, 2026 13:57
@roman-khimov
roman-khimov merged commit b3fe5ff into master Sep 15, 2026
21 of 22 checks passed
@roman-khimov
roman-khimov deleted the copilot/improve-autocomplete-neofs-adm branch September 15, 2026 14:31
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.

Improve autocomplete for neofs-adm morph set-config

3 participants