Skip to content

Verify metastore exists in current workspace#735

Merged
nfx merged 12 commits intomainfrom
fix/issue_104
Jan 5, 2024
Merged

Verify metastore exists in current workspace#735
nfx merged 12 commits intomainfrom
fix/issue_104

Conversation

@pritishpai
Copy link
Copy Markdown
Contributor

Resolved #104

@pritishpai pritishpai requested review from a team and dmoore247 December 23, 2023 00:19
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 23, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (bba54e5) 80.18% compared to head (317808d) 80.46%.
Report is 1 commits behind head on main.

❗ Current head 317808d differs from pull request most recent head 199e7fa. Consider uploading reports for the commit 199e7fa to get more accurate results

Files Patch % Lines
src/databricks/labs/ucx/runtime.py 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #735      +/-   ##
==========================================
+ Coverage   80.18%   80.46%   +0.27%     
==========================================
  Files          44       44              
  Lines        4628     4658      +30     
  Branches      856      858       +2     
==========================================
+ Hits         3711     3748      +37     
+ Misses        694      687       -7     
  Partials      223      223              

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

Comment thread src/databricks/labs/ucx/cli.py Outdated
@pritishpai pritishpai changed the title Added new cli command to verify metastore in current workspace Verify metastore exists in current workspace Dec 28, 2023
Comment thread src/databricks/labs/ucx/runtime.py Outdated

class MetastoreNotFoundError(Exception):
def __init__(self, message="Metastore not found in the workspace"):
self.message = message
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It's not necessary - exceptions can be turned to strings easily

raise MetastoreNotFoundError()
return True

def check_metastore_existence(self) -> bool:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It's not used

Remove this method, it increases the surface area, that we don't need now

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is used in the verify_metastore method and also unit tested (if that is what you meant by surface area)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

it's not used anywhere else

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removing it with the fix for failing integration tests which was because of not handling the non-UC env permissions error.

Comment thread src/databricks/labs/ucx/hive_metastore/tables.py Outdated
raise MetastoreNotFoundError()
return True

def check_metastore_existence(self) -> bool:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

it's not used anywhere else

Adding a command to verify that a metastore exists in the workspace
Comment thread src/databricks/labs/ucx/workspace_access/verification.py Outdated
@nfx nfx merged commit f6819f2 into main Jan 5, 2024
@nfx nfx deleted the fix/issue_104 branch January 5, 2024 09:42
nfx added a commit that referenced this pull request Jan 12, 2024
* Added assessment step to estimate the size of DBFS root tables ([#741](#741)).
* Added `TableMapping` functionality to table migrate ([#752](#752)).
* Added `databricks labs ucx move` command to move tables and schemas between catalogs ([#756](#756)).
* Added functionality to determine migration method based on DBFS Root ([#759](#759)).
* Added `get_tables_to_migrate` functionality in the mapping module ([#755](#755)).
* Added retry and rate limit to rename workspace group operation and corrected rate limit for reflecting account groups to workspace ([#751](#751)).
* Adopted `databricks-labs-blueprint` library for common utilities to be reused in the other projects ([#758](#758)).
* Converted `RuntimeBackend` query executions exceptions to SDK exceptions ([#769](#769)).
* Fixed issue with missing users and temp groups after workspace-local groups migration and skip table when crawling table size if it does not exist anymore ([#770](#770)).
* Improved error handling by not failing group rename step if a group was removed from account before reflecting it to workspace ([#762](#762)).
* Improved error message inference from failed workflow runs ([#753](#753)).
* Moved `TablesMigrate` to a separate module ([#747](#747)).
* Reorganized assessment dashboard to increase readability ([#738](#738)).
* Updated databricks-sdk requirement from ~=0.16.0 to ~=0.17.0 ([#773](#773)).
* Verify metastore exists in current workspace ([#735](#735)).
@nfx nfx mentioned this pull request Jan 12, 2024
nfx added a commit that referenced this pull request Jan 12, 2024
* Added assessment step to estimate the size of DBFS root tables
([#741](#741)).
* Added `TableMapping` functionality to table migrate
([#752](#752)).
* Added `databricks labs ucx move` command to move tables and schemas
between catalogs
([#756](#756)).
* Added functionality to determine migration method based on DBFS Root
([#759](#759)).
* Added `get_tables_to_migrate` functionality in the mapping module
([#755](#755)).
* Added retry and rate limit to rename workspace group operation and
corrected rate limit for reflecting account groups to workspace
([#751](#751)).
* Adopted `databricks-labs-blueprint` library for common utilities to be
reused in the other projects
([#758](#758)).
* Converted `RuntimeBackend` query executions exceptions to SDK
exceptions ([#769](#769)).
* Fixed issue with missing users and temp groups after workspace-local
groups migration and skip table when crawling table size if it does not
exist anymore ([#770](#770)).
* Improved error handling by not failing group rename step if a group
was removed from account before reflecting it to workspace
([#762](#762)).
* Improved error message inference from failed workflow runs
([#753](#753)).
* Moved `TablesMigrate` to a separate module
([#747](#747)).
* Reorganized assessment dashboard to increase readability
([#738](#738)).
* Updated databricks-sdk requirement from ~=0.16.0 to ~=0.17.0
([#773](#773)).
* Verify metastore exists in current workspace
([#735](#735)).
FastLee pushed a commit that referenced this pull request Jan 19, 2024
* Added assessment step to estimate the size of DBFS root tables
([#741](#741)).
* Added `TableMapping` functionality to table migrate
([#752](#752)).
* Added `databricks labs ucx move` command to move tables and schemas
between catalogs
([#756](#756)).
* Added functionality to determine migration method based on DBFS Root
([#759](#759)).
* Added `get_tables_to_migrate` functionality in the mapping module
([#755](#755)).
* Added retry and rate limit to rename workspace group operation and
corrected rate limit for reflecting account groups to workspace
([#751](#751)).
* Adopted `databricks-labs-blueprint` library for common utilities to be
reused in the other projects
([#758](#758)).
* Converted `RuntimeBackend` query executions exceptions to SDK
exceptions ([#769](#769)).
* Fixed issue with missing users and temp groups after workspace-local
groups migration and skip table when crawling table size if it does not
exist anymore ([#770](#770)).
* Improved error handling by not failing group rename step if a group
was removed from account before reflecting it to workspace
([#762](#762)).
* Improved error message inference from failed workflow runs
([#753](#753)).
* Moved `TablesMigrate` to a separate module
([#747](#747)).
* Reorganized assessment dashboard to increase readability
([#738](#738)).
* Updated databricks-sdk requirement from ~=0.16.0 to ~=0.17.0
([#773](#773)).
* Verify metastore exists in current workspace
([#735](#735)).
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.

Verify that metastore has been configured on account

2 participants