-
Notifications
You must be signed in to change notification settings - Fork 85
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 UsedTableProgressEncoder
#3266
Conversation
7c19acf
to
0fba883
Compare
❌ 9/112 passed, 103 failed, 1 skipped, 1h20m8s total ❌ test_create_catalog_schema_when_users_group_in_warehouse_acl: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (999ms)
❌ test_all_grant_types: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (1.093s)
❌ test_grant_findings: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (1.348s)
❌ test_external_locations: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (1.393s)
❌ test_grant_ownership: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (619ms)
❌ test_save_external_location_mapping_missing_location: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (513ms)
❌ test_create_catalog_schema_with_principal_acl_aws: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (3.262s)
❌ test_creating_lakeview_dashboard_permissions: TypeError: LakeviewAPI.create() got an unexpected keyword argument 'serialized_dashboard' (180ms)
❌ test_migration_job_ext_hms[regular]: databricks.sdk.errors.platform.ResourceDoesNotExist: Cluster TEST_EXT_HMS_CLUSTER_ID does not exist (2.26s)
❌ test_migrate_external_tables_with_principal_acl_aws_warehouse: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (1.398s)
❌ test_migrate_table_in_mount: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (260ms)
❌ test_migrate_external_tables_with_spn_CLOUD_ENV: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (1.526s)
❌ test_migration_index_deleted_source: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (286ms)
❌ test_table_migration_ownership: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (272ms)
❌ test_fallback_admin_user: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (8.737s)
❌ test_move_views: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (839ms)
❌ test_move_tables: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (7.981s)
❌ test_alias_tables: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (5.857s)
❌ test_move_tables_table_properties_mismatch_preserves_original: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (737ms)
❌ test_describe_all_tables_in_databases: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (247ms)
❌ test_describe_all_udfs_in_databases: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (265ms)
❌ test_udf_ownership: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (263ms)
❌ test_table_migration_job_refreshes_migration_status[regular-migrate-tables]: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (2.137s)
❌ test_table_migration_job_refreshes_migration_status[hiveserde-migrate-external-hiveserde-tables-in-place-experimental]: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (1.654s)
❌ test_table_migration_job_refreshes_migration_status[hiveserde-migrate-external-tables-ctas]: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (1.639s)
❌ test_table_migration_for_managed_table[managed-migrate-tables]: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (1.674s)
❌ test_hiveserde_table_in_place_migration_job[hiveserde]: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (1.64s)
❌ test_hiveserde_table_ctas_migration_job[hiveserde]: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (2.056s)
❌ test_table_migration_job_publishes_remaining_tables[regular]: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (2.471s)
❌ test_progress_tracking_installer_creates_table[workflow_runs]: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (589ms)
❌ test_progress_tracking_installer_creates_table[historical]: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (535ms)
❌ test_workflow_run_recorder_records_workflow_run: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (1.754s)
❌ test_migrate_managed_tables: TimeoutError: Timed out after 0:02:00 (2m3.981s)
❌ test_migrate_tables_with_cache_should_not_create_table: TimeoutError: Timed out after 0:02:00 (2m3.339s)
❌ test_migrate_external_table_hiveserde_ctas: TimeoutError: Timed out after 0:02:00 (2m5.425s)
❌ test_create_ucx_catalog_creates_catalog: TimeoutError: Timed out after 0:02:00 (2m7.332s)
❌ test_move_tables_no_to_schema: TimeoutError: Timed out after 0:02:00 (2m4.035s)
❌ test_create_all_catalogs_schemas: TimeoutError: Timed out after 0:03:00 (3m9.503s)
❌ test_create_catalog_schema_with_legacy_hive_metastore_privileges: TimeoutError: Timed out after 0:03:00 (3m8.673s)
❌ test_migrate_managed_tables_with_acl: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (314ms)
❌ test_create_catalog_schema_with_principal_acl_CLOUD_ENV: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (4.963s)
❌ test_query_dfsa_ownership: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (284ms)
❌ test_path_dfsa_ownership: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (344ms)
❌ test_migrate_external_tables_with_principal_acl_CLOUD_ENV: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (2.836s)
❌ test_migrate_external_tables_with_principal_acl_aws: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (1.255s)
❌ test_job_task_linter_library_not_installed_cluster: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (3.227s)
❌ test_job_task_linter_library_installed_cluster: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (2.774s)
❌ test_job_linter_some_notebook_graph_with_problems: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (2.972s)
❌ test_workflow_linter_lints_job_with_import_pypi_library: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (3.535s)
❌ test_lint_local_code: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (28.922s)
❌ test_migrate_dbfs_non_delta_tables: TimeoutError: Timed out after 0:02:00 (2m3.232s)
❌ test_graph_computes_magic_run_route_recursively_in_parent_folder[order0]: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (2.069s)
❌ test_migrate_external_table: TimeoutError: Timed out after 0:02:00 (2m5.762s)
❌ test_graph_computes_magic_run_route_recursively_in_parent_folder[order1]: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (1.478s)
❌ test_relative_grand_parent_path_is_supported: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (4.53s)
❌ test_graph_computes_magic_run_route_recursively_in_parent_folder[order3]: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (1.552s)
❌ test_migrate_managed_table_to_external_table_without_conversion: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (1.81s)
❌ test_revert_migrated_table: TimeoutError: Timed out after 0:02:00 (2m4.876s)
❌ test_graph_computes_magic_run_route_recursively_in_parent_folder[order2]: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (1.224s)
❌ test_graph_computes_magic_run_route_recursively_in_parent_folder[order4]: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (1.832s)
❌ test_graph_computes_magic_run_route_recursively_in_parent_folder[order5]: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (2.169s)
❌ test_workflow_linter_lints_job_with_workspace_requirements_dependency: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (3.387s)
❌ test_workflow_linter_lints_job_with_dbfs_requirements_dependency: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (3.506s)
❌ test_workflow_linter_lints_job_with_workspace_egg_dependency: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (4.236s)
❌ test_workflow_linter_lints_job_with_wheel_dependency: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (545ms)
❌ test_workflow_linter_lints_job_with_dbfs_egg_dependency: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (3.262s)
❌ test_job_spark_python_task_linter_unhappy_path: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (2.627s)
❌ test_job_spark_python_task_linter_happy_path: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (2.423s)
❌ test_partitioned_tables: TimeoutError: Timed out after 0:02:00 (2m4.862s)
❌ test_table_ownership: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (280ms)
❌ test_job_spark_python_task_workspace_linter_happy_path: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (2.201s)
❌ test_job_spark_python_task_dbfs_linter_happy_path: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (3.023s)
❌ test_job_dlt_task_linter_happy_path: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (2.405s)
❌ test_job_spark_python_task_linter_notebook_handling: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (2.937s)
❌ test_job_dlt_task_linter_unhappy_path: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (2.533s)
❌ test_job_dependency_problem_egg_dbr14plus: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (2.784s)
❌ test_build_notebook_dependency_graphs_installs_wheel_with_pip_cell_in_notebook[pip_install_demo_wheel]: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (1.854s)
❌ test_build_notebook_dependency_graphs_installs_wheel_with_pip_cell_in_notebook[pip_install_demo_wheel_and_pytest]: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (1.672s)
❌ test_build_notebook_dependency_graphs_installs_wheel_with_pip_cell_in_notebook[pip_install_demo_wheel_with_target_directory]: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (1.318s)
❌ test_build_notebook_dependency_graphs_installs_wheel_with_pip_cell_in_notebook[pip_install_demo_wheel_many_flags]: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (1.417s)
❌ test_build_notebook_dependency_graphs_fails_installing_when_spaces[pip_install_demo_wheel_with_spaces_in_target_directory]: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (1.25s)
❌ test_build_notebook_dependency_graphs_when_installing_notebooks_twice[pip_install_demo_wheel]: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (1.609s)
❌ test_build_notebook_dependency_graphs_installs_pytest_from_index_url: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (4.474s)
❌ test_build_notebook_dependency_graphs_when_installing_notebooks_twice[pip_install_pytest_with_index_url]: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (3.517s)
❌ test_build_notebook_dependency_graphs_when_installing_pytest_twice: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (2.631s)
❌ test_fix_dashboard: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (695ms)
❌ test_query_linter_lints_queries_and_stores_dfsas_and_tables: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (4.298s)
❌ test_build_notebook_dependency_graphs_installs_pypi_packages: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (32.417s)
❌ test_migrate_view: TimeoutError: Timed out after 0:03:00 (3m7.617s)
❌ test_linter_from_context: TimeoutError: Timed out after 0:02:00 (2m14.313s)
❌ test_job_linter_no_problems: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (2.458s)
❌ test_all_grants_in_databases: TimeoutError: Timed out after 0:03:00 (5m38.601s)
❌ test_all_grants_for_udfs_in_databases: TimeoutError: Timed out after 0:03:00 (5m40.523s)
❌ test_migrate_managed_table_to_external_table_with_clone: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (2.238s)
❌ test_build_notebook_dependency_graphs_when_installing_notebooks_twice[pip_install_multiple_packages]: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (1m3.016s)
❌ test_migrate_external_table_failed_sync: TimeoutError: Timed out after 0:01:00 (1m0.495s)
❌ test_migrate_view_alias_test: TimeoutError: Timed out after 0:03:00 (3m7.443s)
❌ test_migrate_external_table_hiveserde_in_place: TimeoutError: Timed out after 0:02:00 (2m5.51s)
❌ test_mapping_skips_tables_databases: TimeoutError: Timed out after 0:05:00 (5m4.601s)
❌ test_all_grants_for_other_objects: TimeoutError: Timed out after 0:03:00 (5m19.419s)
❌ test_mapping_reverts_table: TimeoutError: Timed out after 0:02:00 (2m5.85s)
❌ test_running_real_migration_progress_job: TimeoutError: Timed out after 0:12:00 (12m6.626s)
❌ test_malformed_pip_cell_is_supported: databricks.sdk.errors.platform.NotFound: The warehouse DATABRICKS_WAREHOUSE_ID was not found. (6.882s)
Running from acceptance #7368 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- don't do indirect dependencies.
- it makes no sense to have a parametrised testcase with just a single line in a test table.
@@ -201,7 +201,7 @@ def __init__(self, administrator_locator: AdministratorLocator, ws: WorkspaceCli | |||
super().__init__(administrator_locator) | |||
self._ws = ws | |||
|
|||
def owner_of_path(self, path: str) -> str: | |||
def owner_of_path(self, path: str) -> str: # TODO: Why is this `owner_of_path` and not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and not what?.. it'll become an issue after being merged and there's no clear description of the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
owner_of
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't reviewed the implementation, but have a rather more fundamental question: should this encoder (for UsedTable
) actually exist?
To me this looks like what we had with TableMigrationStatus
in that these records need to be attached to the progress of the logical thing that contains the reference to the used table.
Guessing a bit, but we can have these for:
- Queries (→ Dashboards)
- Paths (→ Jobs)
- Notebooks (→ Jobs)
#3266 (review) @asnare, that is a good question, when do we attach it to a different object and when not? Note that the @nfx : What do you think? |
fac963f
to
61bf68c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
attach UsedTable
names to jobs/pipelines/queries/views only if those tables are in HMS. UsedTable
is an internal entity for linting.
fcd5286
to
743847d
Compare
Will tackle the changes in another PR |
Changes
Add
UsedTableProgressEncoder
to add the used table to the history log for using it in the migration progressLinked issues
Progresses #3045
Breaks up #3112
Functionality
table-migration-experimental
Tests