MonkeyCanCode opened a new pull request, #3413:
URL: https://github.com/apache/polaris/pull/3413

   <!--
   ๐Ÿ“ Describe what changes you're proposing, especially breaking or user-facing 
changes. 
   ๐Ÿ“– See https://github.com/apache/polaris/blob/main/CONTRIBUTING.md for more.
   -->
   
   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
   - [x] ๐Ÿ›ก๏ธ Don't disclose security issues! (contact [email protected])
   - [x] ๐Ÿ”— Clearly explained why the changes are needed, or linked related 
issues: Fixes #
   - [x] ๐Ÿงช Added/updated tests with good coverage, or manually tested (and 
explained how)
   - [x] ๐Ÿ’ก Added comments for complex logic
   - [x] ๐Ÿงพ Updated `CHANGELOG.md` (if needed)
   - [x] ๐Ÿ“š Updated documentation in `site/content/in-dev/unreleased` (if needed)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to