Skip to content

Conversation

@MonkeyCanCode
Copy link
Contributor

Currently the sub-parser and options parsers are both not required this result the following:

# no command provided
➜  polaris git:(main) ./polaris
Traceback (most recent call last):
...
Exception: Please provide credentials via either --client-id & --client-secret or --access-token. Alternatively, you may set the environment variables CLIENT_ID & CLIENT_SECRET.

# no sub-command option provided
➜  polaris git:(main) ./polaris --profile dev catalogs
An unexpected error occurred: None is not supported in the CLI

As these should be required (not seeing an obvious use case where this should be keep as False), I created this PR to set them to be True and here is now the new output (better UX imo):

# no command provided
➜  polaris git:(cli_parser_required) ./polaris
usage: polaris [-h] [--host HOST] [--port PORT] [--base-url BASE_URL] [--client-id CLIENT_ID] [--client-secret CLIENT_SECRET] [--access-token ACCESS_TOKEN]
               [--realm REALM] [--header HEADER] [--profile PROFILE] [--proxy PROXY] [--debug]
               {catalogs,principals,principal-roles,catalog-roles,privileges,namespaces,profiles,policies} ...
polaris: error: the following arguments are required: command

# no sub-command option provided
➜  polaris git:(cli_parser_required) ./polaris --profile dev catalogs
usage: polaris catalogs [-h] {create,delete,get,list,update} ...
polaris catalogs: error: the following arguments are required: catalogs_subcommand

Checklist

  • 🛡️ Don't disclose security issues! (contact [email protected])
  • 🔗 Clearly explained why the changes are needed, or linked related issues: Fixes #
  • 🧪 Added/updated tests with good coverage, or manually tested (and explained how)
  • 💡 Added comments for complex logic
  • 🧾 Updated CHANGELOG.md (if needed)
  • 📚 Updated documentation in site/content/in-dev/unreleased (if needed)

@github-project-automation github-project-automation bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Jan 11, 2026
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