Skip to content

Conversation

@adamcain-db
Copy link
Contributor

  • Add --effective / -e flag to unity-catalog get-permissions CLI which causes it to use UC's getEffectivePermissions endpoint.

@click.option('--external-location', cls=OneOfOption, default=None,
one_of=PERMISSIONS_OBJ_TYPES,
help='Name of the external location of interest')
@click.option('--effective', '-e', is_flag=True, default=False)
Copy link
Contributor

Choose a reason for hiding this comment

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

The short form option doesn't seem like a good idea, since it naturally conflicts with --external-location.

WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I removed the -e flag (and added some help text) for that command.

@codecov-commenter
Copy link

codecov-commenter commented Jul 12, 2022

Codecov Report

Merging #511 (594bcc9) into main (0b6a78e) will decrease coverage by 0.13%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #511      +/-   ##
==========================================
- Coverage   61.08%   60.95%   -0.14%     
==========================================
  Files          55       55              
  Lines        4662     4672      +10     
==========================================
  Hits         2848     2848              
- Misses       1814     1824      +10     
Impacted Files Coverage Δ
databricks_cli/unity_catalog/api.py 0.00% <0.00%> (ø)
databricks_cli/unity_catalog/perms_cli.py 0.00% <0.00%> (ø)
databricks_cli/unity_catalog/uc_service.py 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0b6a78e...594bcc9. Read the comment docs.

Copy link
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

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

Thanks, @adamcain-db. For future PRs, having a couple of tests to confirm the intended behavior would be nice. There are no tests for the entire UC subcommand at the moment.

@pietern pietern merged commit dd79c75 into databricks:main Jul 12, 2022
@adamcain-db
Copy link
Contributor Author

For future PRs, having a couple of tests to confirm the intended behavior would be nice. There are no tests for the entire UC subcommand at the moment.

Thanks @pietern. Yep, adding tests for unity-catalog commands is 'on my list'. :)

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.

5 participants