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

Implement migration sequencing (phase 3) #3018

Open
wants to merge 38 commits into
base: migration-sequencing-phase-2
Choose a base branch
from

Conversation

ericvergnaud
Copy link
Contributor

Changes

Implement migration sequencing for used tables

Linked issues

Progresses #1415

Functionality

None

Tests

  • added unit tests

@ericvergnaud ericvergnaud requested a review from a team as a code owner October 18, 2024 16:26
Copy link

github-actions bot commented Oct 18, 2024

❌ 117/119 passed, 5 flaky, 2 failed, 8 skipped, 2h55m5s total

❌ test_migrate_managed_table_to_external_table_without_conversion: databricks.sdk.errors.platform.BadRequest: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: shaded.databricks.CLOUD_ENVbfs.org.apache.hadoop.fs.CLOUD_ENVbfs.contracts.exceptions.KeyProviderException Failure to initialize configuration for storage account labsCLOUD_ENVTEST_MOUNT_NAME.dfs.core.windows.net: Invalid configuration value detected for fs.CLOUD_ENV.account.key) (3.303s)
databricks.sdk.errors.platform.BadRequest: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: shaded.databricks.CLOUD_ENVbfs.org.apache.hadoop.fs.CLOUD_ENVbfs.contracts.exceptions.KeyProviderException Failure to initialize configuration for storage account labsCLOUD_ENVTEST_MOUNT_NAME.dfs.core.windows.net: Invalid configuration value detected for fs.CLOUD_ENV.account.key)
[gw7] linux -- Python 3.10.15 /home/runner/work/ucx/ucx/.venv/bin/python
[gw7] linux -- Python 3.10.15 /home/runner/work/ucx/ucx/.venv/bin/python
❌ test_migrate_managed_table_to_external_table_with_clone: databricks.sdk.errors.platform.BadRequest: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: shaded.databricks.CLOUD_ENVbfs.org.apache.hadoop.fs.CLOUD_ENVbfs.contracts.exceptions.KeyProviderException Failure to initialize configuration for storage account labsCLOUD_ENVTEST_MOUNT_NAME.dfs.core.windows.net: Invalid configuration value detected for fs.CLOUD_ENV.account.key) (3.5s)
databricks.sdk.errors.platform.BadRequest: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: shaded.databricks.CLOUD_ENVbfs.org.apache.hadoop.fs.CLOUD_ENVbfs.contracts.exceptions.KeyProviderException Failure to initialize configuration for storage account labsCLOUD_ENVTEST_MOUNT_NAME.dfs.core.windows.net: Invalid configuration value detected for fs.CLOUD_ENV.account.key)
[gw7] linux -- Python 3.10.15 /home/runner/work/ucx/ucx/.venv/bin/python
[gw7] linux -- Python 3.10.15 /home/runner/work/ucx/ucx/.venv/bin/python

Flaky tests:

  • 🤪 test_table_migration_job_refreshes_migration_status[regular-migrate-tables] (4m38.256s)
  • 🤪 test_table_migration_job_refreshes_migration_status[hiveserde-migrate-external-hiveserde-tables-in-place-experimental] (3m55.283s)
  • 🤪 test_hiveserde_table_in_place_migration_job[hiveserde] (4m51.868s)
  • 🤪 test_migration_job_ext_hms[regular] (8m18.857s)
  • 🤪 test_table_migration_job_refreshes_migration_status[hiveserde-migrate-external-tables-ctas] (5m8.359s)

Running from acceptance #7065

…-phase-2

# Conflicts:
#	src/databricks/labs/ucx/assessment/sequencing.py
#	tests/unit/assessment/test_sequencing.py
…-phase-3

# Conflicts:
#	tests/unit/assessment/test_sequencing.py
# Conflicts:
#	src/databricks/labs/ucx/assessment/clusters.py
#	src/databricks/labs/ucx/assessment/jobs.py
…-phase-2

# Conflicts:
#	src/databricks/labs/ucx/framework/owners.py
…-phase-3

# Conflicts:
#	src/databricks/labs/ucx/assessment/sequencing.py
object_type="TABLE",
object_id=used_table.fullname,
object_name=used_table.fullname,
object_owner="", # TODO
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in PR #3076

self,
ws: WorkspaceClient,
path_lookup: PathLookup,
admin_locator: AdministratorLocator,
Copy link
Collaborator

Choose a reason for hiding this comment

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

inject TableOwnership via constructor, not the AdministratorLocator.

@@ -15,6 +15,7 @@
from databricks.labs.lsql.backends import SqlBackend
from databricks.sdk.errors import NotFound

from databricks.labs.ucx.source_code.base import UsedTable
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we invert directionality and rewrite it as UsedTable.to_table()? src/databricks/labs/ucx/hive_metastore/tables.py shouldn't depend on the source_code package to avoid cycles.

@JCZuurmond JCZuurmond force-pushed the migration-sequencing-phase-2 branch from 3c34640 to eb79746 Compare November 26, 2024 13:13
@JCZuurmond JCZuurmond requested a review from a team as a code owner November 26, 2024 13:13
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.

3 participants