Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add inventory_database name check #275

Merged
merged 6 commits into from
Oct 3, 2023
Merged

Add inventory_database name check #275

merged 6 commits into from
Oct 3, 2023

Conversation

dmoore247
Copy link
Contributor

Check that database name is a word, loop until correct.

@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Merging #275 (d90c785) into main (035320c) will decrease coverage by 0.26%.
Report is 3 commits behind head on main.
The diff coverage is 45.45%.

@@            Coverage Diff             @@
##             main     #275      +/-   ##
==========================================
- Coverage   83.47%   83.21%   -0.26%     
==========================================
  Files          30       30              
  Lines        2269     2318      +49     
  Branches      395      411      +16     
==========================================
+ Hits         1894     1929      +35     
- Misses        290      300      +10     
- Partials       85       89       +4     
Files Coverage Δ
src/databricks/labs/ucx/install.py 79.65% <45.45%> (-1.17%) ⬇️

... and 3 files with indirect coverage changes

@@ -163,7 +163,12 @@ def _configure(self):
raise err

logger.info("Please answer a couple of questions to configure Unity Catalog migration")
inventory_database = self._question("Inventory Database", default="ucx")
while True:
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you refactor this into a method and do max 10 attempts to ask for a valid database?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

:)

@dmoore247
Copy link
Contributor Author

Working on feedback, waiting for assessment job before re-testing installer.

@nfx
Copy link
Contributor

nfx commented Sep 22, 2023

@dmoore247 you know you can kill installer by CTRL+C (or CMD+D, don't remember), right?..

@nfx
Copy link
Contributor

nfx commented Sep 25, 2023

@dmoore247 any update?

Copy link
Contributor

@larsgeorge-db larsgeorge-db left a comment

Choose a reason for hiding this comment

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

Not to say this is not useful, but this should also then be done for most of the other inputs, no? And even then, you can always edit the config file in the workspace afterwards.

@dmoore247
Copy link
Contributor Author

I think I can get to it next week.

@nfx nfx added this to the 1 week milestone Oct 3, 2023
@nfx
Copy link
Contributor

nfx commented Oct 3, 2023

Following up - is this issue still relevant?

Copy link
Contributor

@nfx nfx left a comment

Choose a reason for hiding this comment

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

remove install in the root, otherwise lgtm

install Outdated Show resolved Hide resolved
Copy link
Contributor Author

@dmoore247 dmoore247 left a comment

Choose a reason for hiding this comment

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

removed install file

@nfx nfx added this pull request to the merge queue Oct 3, 2023
Merged via the queue into databrickslabs:main with commit 419dcd0 Oct 3, 2023
3 of 5 checks passed
nfx added a commit that referenced this pull request Oct 3, 2023
* Added `inventory_database` name check during installation ([#275](#275)).
* Added a column to `$inventory.tables` to specify if a table might have been synchronised to Unity Catalog already or not ([#306](#306)).
* Added a migration state to skip already migrated tables ([#325](#325)).
* Fixed appending to tables by adding filtering of `None` rows ([#356](#356)).
* Fixed handling of missing but linked cluster policies. ([#361](#361)).
* Ignore errors for Redash widgets and queries redeployment during installation ([#367](#367)).
* Remove exception and added proper logging for groups in the list that… ([#357](#357)).
* Skip group migration when no groups are available after preparation step. ([#363](#363)).
* Update databricks-sdk requirement from ~=0.9.0 to ~=0.10.0 ([#362](#362)).
@nfx nfx mentioned this pull request Oct 3, 2023
nfx added a commit that referenced this pull request Oct 3, 2023
* Added `inventory_database` name check during installation
([#275](#275)).
* Added a column to `$inventory.tables` to specify if a table might have
been synchronised to Unity Catalog already or not
([#306](#306)).
* Added a migration state to skip already migrated tables
([#325](#325)).
* Fixed appending to tables by adding filtering of `None` rows
([#356](#356)).
* Fixed handling of missing but linked cluster policies.
([#361](#361)).
* Ignore errors for Redash widgets and queries redeployment during
installation ([#367](#367)).
* Remove exception and added proper logging for groups in the list that…
([#357](#357)).
* Skip group migration when no groups are available after preparation
step. ([#363](#363)).
* Update databricks-sdk requirement from ~=0.9.0 to ~=0.10.0
([#362](#362)).
@dmoore247 dmoore247 deleted the fix-inventory-database-name branch October 3, 2023 21:06
zpappa pushed a commit that referenced this pull request Oct 4, 2023
Check that database name is a word, loop until correct.
zpappa pushed a commit that referenced this pull request Oct 4, 2023
* Added `inventory_database` name check during installation
([#275](#275)).
* Added a column to `$inventory.tables` to specify if a table might have
been synchronised to Unity Catalog already or not
([#306](#306)).
* Added a migration state to skip already migrated tables
([#325](#325)).
* Fixed appending to tables by adding filtering of `None` rows
([#356](#356)).
* Fixed handling of missing but linked cluster policies.
([#361](#361)).
* Ignore errors for Redash widgets and queries redeployment during
installation ([#367](#367)).
* Remove exception and added proper logging for groups in the list that…
([#357](#357)).
* Skip group migration when no groups are available after preparation
step. ([#363](#363)).
* Update databricks-sdk requirement from ~=0.9.0 to ~=0.10.0
([#362](#362)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants