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

Use TACL cluster in test_all_grant_types and wait for ANONYMOUS FILE grant #3800

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

JCZuurmond
Copy link
Member

@JCZuurmond JCZuurmond commented Feb 28, 2025

Changes

Use TACL cluster in test_all_grant_types and wait for ANONYMOUS FILE grant to improve stability of test.

Linked issues

Resolves #3798
Related to #3765

Tests

  • modified integration tests: test_all_grant_types & test_grant_findings

@JCZuurmond JCZuurmond added migrate/access-control Access Control to things bug/test-infra issues related to testing infrastructure internal this pull request won't appear in release notes labels Feb 28, 2025
@JCZuurmond JCZuurmond self-assigned this Feb 28, 2025
@JCZuurmond JCZuurmond requested a review from a team as a code owner February 28, 2025 12:05
Copy link

github-actions bot commented Feb 28, 2025

❌ 107/112 passed, 5 failed, 8 skipped, 8h31m22s total

❌ test_all_grant_types: TimeoutError: Timed out after 0:03:00 (20m12.287s)
TimeoutError: Timed out after 0:03:00
04:17 INFO [databricks.labs.ucx.install] Creating ucx schemas...
[gw3] linux -- Python 3.10.16 /home/runner/work/ucx/ucx/.venv/bin/python
04:17 INFO [databricks.labs.ucx.install] Creating ucx schemas...
04:18 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_siy2t.tables] fetching tables inventory
04:18 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_siy2t.tables] crawling new set of snapshot data for tables
04:18 DEBUG [databricks.labs.ucx.hive_metastore.tables] [hive_metastore.dummy_sfvvc] listing tables and views
04:18 DEBUG [databricks.labs.ucx.hive_metastore.tables] [hive_metastore.dummy_sfvvc.dummy_tmjzj] fetching table metadata
04:18 DEBUG [databricks.labs.ucx.hive_metastore.tables] [hive_metastore.dummy_sfvvc.dummy_txvzp] fetching table metadata
04:18 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_siy2t.tables] found 2 new records for tables
04:18 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_siy2t.udfs] fetching udfs inventory
04:18 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_siy2t.udfs] crawling new set of snapshot data for udfs
04:18 DEBUG [databricks.labs.ucx.hive_metastore.udfs] [hive_metastore.dummy_sfvvc] listing udfs
04:18 DEBUG [databricks.labs.ucx.hive_metastore.udfs] [hive_metastore.dummy_sfvvc.dummy_fo8nw] fetching udf metadata
04:18 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_siy2t.udfs] found 1 new records for udfs
04:37 ERROR [databricks.labs.ucx.hive_metastore.grants] Couldn't fetch grants for object ANY FILE : TEMPORARILY_UNAVAILABLE: The service at /api/2.0/sql-acl/get-permissions is taking too long to process your request. Please try again later or try a faster operation. [TraceId: 00-a5b550d211d12967220dbfdc29d1b8a9-708f133709e8fc5d-00]
04:17 INFO [databricks.labs.ucx.install] Creating ucx schemas...
04:18 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_siy2t.tables] fetching tables inventory
04:18 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_siy2t.tables] crawling new set of snapshot data for tables
04:18 DEBUG [databricks.labs.ucx.hive_metastore.tables] [hive_metastore.dummy_sfvvc] listing tables and views
04:18 DEBUG [databricks.labs.ucx.hive_metastore.tables] [hive_metastore.dummy_sfvvc.dummy_tmjzj] fetching table metadata
04:18 DEBUG [databricks.labs.ucx.hive_metastore.tables] [hive_metastore.dummy_sfvvc.dummy_txvzp] fetching table metadata
04:18 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_siy2t.tables] found 2 new records for tables
04:18 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_siy2t.udfs] fetching udfs inventory
04:18 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_siy2t.udfs] crawling new set of snapshot data for udfs
04:18 DEBUG [databricks.labs.ucx.hive_metastore.udfs] [hive_metastore.dummy_sfvvc] listing udfs
04:18 DEBUG [databricks.labs.ucx.hive_metastore.udfs] [hive_metastore.dummy_sfvvc.dummy_fo8nw] fetching udf metadata
04:18 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_siy2t.udfs] found 1 new records for udfs
04:37 ERROR [databricks.labs.ucx.hive_metastore.grants] Couldn't fetch grants for object ANY FILE : TEMPORARILY_UNAVAILABLE: The service at /api/2.0/sql-acl/get-permissions is taking too long to process your request. Please try again later or try a faster operation. [TraceId: 00-a5b550d211d12967220dbfdc29d1b8a9-708f133709e8fc5d-00]
[gw3] linux -- Python 3.10.16 /home/runner/work/ucx/ucx/.venv/bin/python
❌ test_all_grants_for_other_objects: AssertionError: assert {'MODIFY', 'SELECT'} == set() (11m31.159s)
... (skipped 207 bytes)
10.16 /home/runner/work/ucx/ucx/.venv/bin/python
04:40 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s9ipv.grants] fetching grants inventory
04:40 DEBUG [databricks.labs.ucx.framework.crawlers] Inventory table not found
Traceback (most recent call last):
  File "/home/runner/work/ucx/ucx/src/databricks/labs/ucx/framework/crawlers.py", line 152, in _snapshot
    cached_results = list(fetcher())
  File "/home/runner/work/ucx/ucx/src/databricks/labs/ucx/hive_metastore/grants.py", line 244, in _try_fetch
    for row in self._fetch(f"SELECT * FROM {escape_sql_identifier(self.full_name)}"):
  File "/home/runner/work/ucx/ucx/.venv/lib/python3.10/site-packages/databricks/labs/lsql/core.py", line 344, in fetch_all
    execute_response = self.execute(
  File "/home/runner/work/ucx/ucx/.venv/lib/python3.10/site-packages/databricks/labs/lsql/core.py", line 268, in execute
    self._raise_if_needed(status)
  File "/home/runner/work/ucx/ucx/.venv/lib/python3.10/site-packages/databricks/labs/lsql/core.py", line 478, in _raise_if_needed
    raise NotFound(error_message)
databricks.sdk.errors.platform.NotFound: [TABLE_OR_VIEW_NOT_FOUND] The table or view `hive_metastore`.`dummy_s9ipv`.`grants` cannot be found. Verify the spelling and correctness of the schema and catalog.
If you did not qualify the name with a schema, verify the current_schema() output, or qualify the name with the correct schema and catalog.
To tolerate the error on drop use DROP VIEW IF EXISTS or DROP TABLE IF EXISTS. SQLSTATE: 42P01; line 1 pos 14
04:40 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s9ipv.grants] crawling new set of snapshot data for grants
04:40 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s9ipv.tables] fetching tables inventory
04:40 DEBUG [databricks.labs.ucx.framework.crawlers] Inventory table not found
Traceback (most recent call last):
  File "/home/runner/work/ucx/ucx/src/databricks/labs/ucx/framework/crawlers.py", line 152, in _snapshot
    cached_results = list(fetcher())
  File "/home/runner/work/ucx/ucx/src/databricks/labs/ucx/hive_metastore/tables.py", line 458, in _try_fetch
    for row in self._fetch(f"SELECT * FROM {escape_sql_identifier(self.full_name)}"):
  File "/home/runner/work/ucx/ucx/.venv/lib/python3.10/site-packages/databricks/labs/lsql/core.py", line 344, in fetch_all
    execute_response = self.execute(
  File "/home/runner/work/ucx/ucx/.venv/lib/python3.10/site-packages/databricks/labs/lsql/core.py", line 268, in execute
    self._raise_if_needed(status)
  File "/home/runner/work/ucx/ucx/.venv/lib/python3.10/site-packages/databricks/labs/lsql/core.py", line 478, in _raise_if_needed
    raise NotFound(error_message)
databricks.sdk.errors.platform.NotFound: [TABLE_OR_VIEW_NOT_FOUND] The table or view `hive_metastore`.`dummy_s9ipv`.`tables` cannot be found. Verify the spelling and correctness of the schema and catalog.
If you did not qualify the name with a schema, verify the current_schema() output, or qualify the name with the correct schema and catalog.
To tolerate the error on drop use DROP VIEW IF EXISTS or DROP TABLE IF EXISTS. SQLSTATE: 42P01; line 1 pos 14
04:40 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s9ipv.tables] crawling new set of snapshot data for tables
04:40 DEBUG [databricks.labs.ucx.hive_metastore.tables] [hive_metastore.dummy_s1nny] listing tables and views
04:40 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s9ipv.tables] found 0 new records for tables
04:40 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s9ipv.udfs] fetching udfs inventory
04:40 DEBUG [databricks.labs.ucx.framework.crawlers] Inventory table not found
Traceback (most recent call last):
  File "/home/runner/work/ucx/ucx/src/databricks/labs/ucx/framework/crawlers.py", line 152, in _snapshot
    cached_results = list(fetcher())
  File "/home/runner/work/ucx/ucx/src/databricks/labs/ucx/hive_metastore/udfs.py", line 63, in _try_fetch
    for row in self._fetch(f"SELECT * FROM {escape_sql_identifier(self.full_name)}"):
  File "/home/runner/work/ucx/ucx/.venv/lib/python3.10/site-packages/databricks/labs/lsql/core.py", line 344, in fetch_all
    execute_response = self.execute(
  File "/home/runner/work/ucx/ucx/.venv/lib/python3.10/site-packages/databricks/labs/lsql/core.py", line 268, in execute
    self._raise_if_needed(status)
  File "/home/runner/work/ucx/ucx/.venv/lib/python3.10/site-packages/databricks/labs/lsql/core.py", line 478, in _raise_if_needed
    raise NotFound(error_message)
databricks.sdk.errors.platform.NotFound: [TABLE_OR_VIEW_NOT_FOUND] The table or view `hive_metastore`.`dummy_s9ipv`.`udfs` cannot be found. Verify the spelling and correctness of the schema and catalog.
If you did not qualify the name with a schema, verify the current_schema() output, or qualify the name with the correct schema and catalog.
To tolerate the error on drop use DROP VIEW IF EXISTS or DROP TABLE IF EXISTS. SQLSTATE: 42P01; line 1 pos 14
04:40 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s9ipv.udfs] crawling new set of snapshot data for udfs
04:40 DEBUG [databricks.labs.ucx.hive_metastore.udfs] [hive_metastore.dummy_s1nny] listing udfs
04:40 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s9ipv.udfs] found 0 new records for udfs
04:51 ERROR [databricks.labs.ucx.hive_metastore.grants] Couldn't fetch grants for object ANY FILE : TEMPORARILY_UNAVAILABLE: The service at /api/2.0/sql-acl/get-permissions is taking too long to process your request. Please try again later or try a faster operation. [TraceId: 00-6b179fd883568a3312c4f4ea49e5cff4-c9e7eeb134d99ee6-00]
04:51 ERROR [databricks.labs.ucx.hive_metastore.grants] Couldn't fetch grants for object ANONYMOUS FUNCTION : TEMPORARILY_UNAVAILABLE: The service at /api/2.0/sql-acl/get-permissions is taking too long to process your request. Please try again later or try a faster operation. [TraceId: 00-effc66dd3303f6874cbf3cc609616786-f1e801ce29c19bb9-00]
04:51 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s9ipv.grants] found 1 new records for grants
04:40 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s9ipv.grants] fetching grants inventory
04:40 DEBUG [databricks.labs.ucx.framework.crawlers] Inventory table not found
Traceback (most recent call last):
  File "/home/runner/work/ucx/ucx/src/databricks/labs/ucx/framework/crawlers.py", line 152, in _snapshot
    cached_results = list(fetcher())
  File "/home/runner/work/ucx/ucx/src/databricks/labs/ucx/hive_metastore/grants.py", line 244, in _try_fetch
    for row in self._fetch(f"SELECT * FROM {escape_sql_identifier(self.full_name)}"):
  File "/home/runner/work/ucx/ucx/.venv/lib/python3.10/site-packages/databricks/labs/lsql/core.py", line 344, in fetch_all
    execute_response = self.execute(
  File "/home/runner/work/ucx/ucx/.venv/lib/python3.10/site-packages/databricks/labs/lsql/core.py", line 268, in execute
    self._raise_if_needed(status)
  File "/home/runner/work/ucx/ucx/.venv/lib/python3.10/site-packages/databricks/labs/lsql/core.py", line 478, in _raise_if_needed
    raise NotFound(error_message)
databricks.sdk.errors.platform.NotFound: [TABLE_OR_VIEW_NOT_FOUND] The table or view `hive_metastore`.`dummy_s9ipv`.`grants` cannot be found. Verify the spelling and correctness of the schema and catalog.
If you did not qualify the name with a schema, verify the current_schema() output, or qualify the name with the correct schema and catalog.
To tolerate the error on drop use DROP VIEW IF EXISTS or DROP TABLE IF EXISTS. SQLSTATE: 42P01; line 1 pos 14
04:40 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s9ipv.grants] crawling new set of snapshot data for grants
04:40 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s9ipv.tables] fetching tables inventory
04:40 DEBUG [databricks.labs.ucx.framework.crawlers] Inventory table not found
Traceback (most recent call last):
  File "/home/runner/work/ucx/ucx/src/databricks/labs/ucx/framework/crawlers.py", line 152, in _snapshot
    cached_results = list(fetcher())
  File "/home/runner/work/ucx/ucx/src/databricks/labs/ucx/hive_metastore/tables.py", line 458, in _try_fetch
    for row in self._fetch(f"SELECT * FROM {escape_sql_identifier(self.full_name)}"):
  File "/home/runner/work/ucx/ucx/.venv/lib/python3.10/site-packages/databricks/labs/lsql/core.py", line 344, in fetch_all
    execute_response = self.execute(
  File "/home/runner/work/ucx/ucx/.venv/lib/python3.10/site-packages/databricks/labs/lsql/core.py", line 268, in execute
    self._raise_if_needed(status)
  File "/home/runner/work/ucx/ucx/.venv/lib/python3.10/site-packages/databricks/labs/lsql/core.py", line 478, in _raise_if_needed
    raise NotFound(error_message)
databricks.sdk.errors.platform.NotFound: [TABLE_OR_VIEW_NOT_FOUND] The table or view `hive_metastore`.`dummy_s9ipv`.`tables` cannot be found. Verify the spelling and correctness of the schema and catalog.
If you did not qualify the name with a schema, verify the current_schema() output, or qualify the name with the correct schema and catalog.
To tolerate the error on drop use DROP VIEW IF EXISTS or DROP TABLE IF EXISTS. SQLSTATE: 42P01; line 1 pos 14
04:40 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s9ipv.tables] crawling new set of snapshot data for tables
04:40 DEBUG [databricks.labs.ucx.hive_metastore.tables] [hive_metastore.dummy_s1nny] listing tables and views
04:40 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s9ipv.tables] found 0 new records for tables
04:40 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s9ipv.udfs] fetching udfs inventory
04:40 DEBUG [databricks.labs.ucx.framework.crawlers] Inventory table not found
Traceback (most recent call last):
  File "/home/runner/work/ucx/ucx/src/databricks/labs/ucx/framework/crawlers.py", line 152, in _snapshot
    cached_results = list(fetcher())
  File "/home/runner/work/ucx/ucx/src/databricks/labs/ucx/hive_metastore/udfs.py", line 63, in _try_fetch
    for row in self._fetch(f"SELECT * FROM {escape_sql_identifier(self.full_name)}"):
  File "/home/runner/work/ucx/ucx/.venv/lib/python3.10/site-packages/databricks/labs/lsql/core.py", line 344, in fetch_all
    execute_response = self.execute(
  File "/home/runner/work/ucx/ucx/.venv/lib/python3.10/site-packages/databricks/labs/lsql/core.py", line 268, in execute
    self._raise_if_needed(status)
  File "/home/runner/work/ucx/ucx/.venv/lib/python3.10/site-packages/databricks/labs/lsql/core.py", line 478, in _raise_if_needed
    raise NotFound(error_message)
databricks.sdk.errors.platform.NotFound: [TABLE_OR_VIEW_NOT_FOUND] The table or view `hive_metastore`.`dummy_s9ipv`.`udfs` cannot be found. Verify the spelling and correctness of the schema and catalog.
If you did not qualify the name with a schema, verify the current_schema() output, or qualify the name with the correct schema and catalog.
To tolerate the error on drop use DROP VIEW IF EXISTS or DROP TABLE IF EXISTS. SQLSTATE: 42P01; line 1 pos 14
04:40 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s9ipv.udfs] crawling new set of snapshot data for udfs
04:40 DEBUG [databricks.labs.ucx.hive_metastore.udfs] [hive_metastore.dummy_s1nny] listing udfs
04:40 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s9ipv.udfs] found 0 new records for udfs
04:51 ERROR [databricks.labs.ucx.hive_metastore.grants] Couldn't fetch grants for object ANY FILE : TEMPORARILY_UNAVAILABLE: The service at /api/2.0/sql-acl/get-permissions is taking too long to process your request. Please try again later or try a faster operation. [TraceId: 00-6b179fd883568a3312c4f4ea49e5cff4-c9e7eeb134d99ee6-00]
04:51 ERROR [databricks.labs.ucx.hive_metastore.grants] Couldn't fetch grants for object ANONYMOUS FUNCTION : TEMPORARILY_UNAVAILABLE: The service at /api/2.0/sql-acl/get-permissions is taking too long to process your request. Please try again later or try a faster operation. [TraceId: 00-effc66dd3303f6874cbf3cc609616786-f1e801ce29c19bb9-00]
04:51 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s9ipv.grants] found 1 new records for grants
[gw4] linux -- Python 3.10.16 /home/runner/work/ucx/ucx/.venv/bin/python
❌ test_grant_findings: AttributeError: 'list' object has no attribute 'object_type' (24m26.62s)
AttributeError: 'list' object has no attribute 'object_type'
04:38 INFO [databricks.labs.ucx.install] Creating ucx schemas...
[gw3] linux -- Python 3.10.16 /home/runner/work/ucx/ucx/.venv/bin/python
04:38 INFO [databricks.labs.ucx.install] Creating ucx schemas...
04:38 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s4tm3.tables] fetching tables inventory
04:38 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s4tm3.tables] crawling new set of snapshot data for tables
04:38 DEBUG [databricks.labs.ucx.hive_metastore.tables] [hive_metastore.dummy_s8obk] listing tables and views
04:38 DEBUG [databricks.labs.ucx.hive_metastore.tables] [hive_metastore.dummy_s8obk.dummy_tjkyy] fetching table metadata
04:38 DEBUG [databricks.labs.ucx.hive_metastore.tables] [hive_metastore.dummy_s8obk.dummy_tqzvd] fetching table metadata
04:38 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s4tm3.tables] found 2 new records for tables
04:38 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s4tm3.udfs] fetching udfs inventory
04:38 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s4tm3.udfs] crawling new set of snapshot data for udfs
04:38 DEBUG [databricks.labs.ucx.hive_metastore.udfs] [hive_metastore.dummy_s8obk] listing udfs
04:38 DEBUG [databricks.labs.ucx.hive_metastore.udfs] [hive_metastore.dummy_s8obk.dummy_ft4mu] fetching udf metadata
04:38 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s4tm3.udfs] found 1 new records for udfs
04:38 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s4tm3.grants] fetching grants inventory
04:38 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s4tm3.grants] crawling new set of snapshot data for grants
04:38 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s4tm3.tables] fetching tables inventory
04:38 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s4tm3.udfs] fetching udfs inventory
04:50 ERROR [databricks.labs.ucx.hive_metastore.grants] Couldn't fetch grants for object ANY FILE : TEMPORARILY_UNAVAILABLE: The service at /api/2.0/sql-acl/get-permissions is taking too long to process your request. Please try again later or try a faster operation. [TraceId: 00-99671df08ccfd4e0c1fb4d385fb6da52-b20c0f748da1263f-00]
04:58 ERROR [databricks.labs.ucx.hive_metastore.grants] Couldn't fetch grants for object ANONYMOUS FUNCTION : timed out after 0:20:00: current status: CommandStatus.RUNNING
04:58 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s4tm3.grants] found 6 new records for grants
04:38 INFO [databricks.labs.ucx.install] Creating ucx schemas...
04:38 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s4tm3.tables] fetching tables inventory
04:38 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s4tm3.tables] crawling new set of snapshot data for tables
04:38 DEBUG [databricks.labs.ucx.hive_metastore.tables] [hive_metastore.dummy_s8obk] listing tables and views
04:38 DEBUG [databricks.labs.ucx.hive_metastore.tables] [hive_metastore.dummy_s8obk.dummy_tjkyy] fetching table metadata
04:38 DEBUG [databricks.labs.ucx.hive_metastore.tables] [hive_metastore.dummy_s8obk.dummy_tqzvd] fetching table metadata
04:38 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s4tm3.tables] found 2 new records for tables
04:38 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s4tm3.udfs] fetching udfs inventory
04:38 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s4tm3.udfs] crawling new set of snapshot data for udfs
04:38 DEBUG [databricks.labs.ucx.hive_metastore.udfs] [hive_metastore.dummy_s8obk] listing udfs
04:38 DEBUG [databricks.labs.ucx.hive_metastore.udfs] [hive_metastore.dummy_s8obk.dummy_ft4mu] fetching udf metadata
04:38 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s4tm3.udfs] found 1 new records for udfs
04:38 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s4tm3.grants] fetching grants inventory
04:38 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s4tm3.grants] crawling new set of snapshot data for grants
04:38 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s4tm3.tables] fetching tables inventory
04:38 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s4tm3.udfs] fetching udfs inventory
04:50 ERROR [databricks.labs.ucx.hive_metastore.grants] Couldn't fetch grants for object ANY FILE : TEMPORARILY_UNAVAILABLE: The service at /api/2.0/sql-acl/get-permissions is taking too long to process your request. Please try again later or try a faster operation. [TraceId: 00-99671df08ccfd4e0c1fb4d385fb6da52-b20c0f748da1263f-00]
04:58 ERROR [databricks.labs.ucx.hive_metastore.grants] Couldn't fetch grants for object ANONYMOUS FUNCTION : timed out after 0:20:00: current status: CommandStatus.RUNNING
04:58 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.dummy_s4tm3.grants] found 6 new records for grants
[gw3] linux -- Python 3.10.16 /home/runner/work/ucx/ucx/.venv/bin/python
❌ test_table_migration_job_refreshes_migration_status[regular-migrate-tables]: databricks.sdk.errors.platform.BadRequest: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:javax.jdo.JDODataStoreException: Exception thrown flushing changes to datastore (11m18.892s)
... (skipped 33951 bytes)
Unity Catalog migration
04:52 INFO [databricks.labs.ucx.installer.hms_lineage] HMS Lineage feature creates one system table named system.hms_to_uc_migration.table_access and helps in your migration process from HMS to UC by allowing you to programmatically query HMS lineage data.
04:52 INFO [databricks.labs.ucx.install] Fetching installations...
04:52 WARNING [databricks.labs.ucx.install] Existing installation at /Users/0a330eb5-dd51-4d97-b6e4-c474356b1d5d/.TE9Q is corrupted. Skipping...
04:52 INFO [databricks.labs.ucx.installer.policy] Creating UCX cluster policy.
04:52 DEBUG [tests.integration.conftest] Waiting for clusters to start...
04:52 DEBUG [tests.integration.conftest] Waiting for clusters to start...
04:52 INFO [databricks.labs.ucx.install] Installing UCX v0.57.1+1420250306045219
04:52 INFO [databricks.labs.ucx.install] Creating ucx schemas...
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-tables
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-groups
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-data-reconciliation
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=failing
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migration-progress-experimental
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=validate-groups-permissions
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=remove-workspace-local-backup-groups
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-external-tables-ctas
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-tables-in-mounts-experimental
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=assessment
04:52 INFO [databricks.labs.ucx.install] Creating dashboards...
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-groups-legacy
04:52 DEBUG [databricks.labs.ucx.install] Reading step folder /home/runner/work/ucx/ucx/src/databricks/labs/ucx/queries/progress...
04:52 DEBUG [databricks.labs.ucx.install] Reading step folder /home/runner/work/ucx/ucx/src/databricks/labs/ucx/queries/views...
04:52 DEBUG [databricks.labs.ucx.install] Reading step folder /home/runner/work/ucx/ucx/src/databricks/labs/ucx/queries/migration...
04:52 DEBUG [databricks.labs.ucx.install] Reading step folder /home/runner/work/ucx/ucx/src/databricks/labs/ucx/queries/assessment...
04:52 INFO [databricks.labs.ucx.install] Creating dashboard in /home/runner/work/ucx/ucx/src/databricks/labs/ucx/queries/progress/main...
04:52 INFO [databricks.labs.ucx.install] Creating dashboard in /home/runner/work/ucx/ucx/src/databricks/labs/ucx/queries/migration/main...
04:52 INFO [databricks.labs.ucx.install] Creating dashboard in /home/runner/work/ucx/ucx/src/databricks/labs/ucx/queries/migration/groups...
04:52 INFO [databricks.labs.ucx.install] Creating dashboard in /home/runner/work/ucx/ucx/src/databricks/labs/ucx/queries/assessment/CLOUD_ENV...
04:52 INFO [databricks.labs.ucx.install] Creating dashboard in /home/runner/work/ucx/ucx/src/databricks/labs/ucx/queries/assessment/main...
04:52 INFO [databricks.labs.ucx.install] Creating dashboard in /home/runner/work/ucx/ucx/src/databricks/labs/ucx/queries/assessment/interactive...
04:52 INFO [databricks.labs.ucx.install] Creating dashboard in /home/runner/work/ucx/ucx/src/databricks/labs/ucx/queries/assessment/estimates...
04:52 INFO [databricks.labs.ucx.installer.mixins] Fetching warehouse_id from a config
04:52 INFO [databricks.labs.ucx.installer.mixins] Fetching warehouse_id from a config
04:52 INFO [databricks.labs.ucx.installer.mixins] Fetching warehouse_id from a config
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-external-hiveserde-tables-in-place-experimental
04:52 INFO [databricks.labs.ucx.installer.mixins] Fetching warehouse_id from a config
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=scan-tables-in-mounts-experimental
04:52 INFO [databricks.labs.ucx.installer.mixins] Fetching warehouse_id from a config
04:52 INFO [databricks.labs.ucx.installer.mixins] Fetching warehouse_id from a config
04:52 INFO [databricks.labs.ucx.installer.mixins] Fetching warehouse_id from a config
04:52 INFO [databricks.labs.ucx.install] Installation completed successfully! Please refer to the https://DATABRICKS_HOST/#workspace/Users/0a330eb5-dd51-4d97-b6e4-c474356b1d5d/.TE9Q/README for the next steps.
04:52 INFO [databricks.labs.ucx.progress.install] Installation completed successfully!
04:52 DEBUG [databricks.labs.ucx.installer.workflows] starting assessment job: https://DATABRICKS_HOST#job/226871138412842
04:52 INFO [databricks.labs.ucx.installer.workflows] Started assessment job: https://DATABRICKS_HOST#job/226871138412842/runs/560857488225883
04:52 DEBUG [databricks.labs.ucx.installer.workflows] Validating assessment workflow: https://DATABRICKS_HOST#job/226871138412842
04:52 INFO [databricks.labs.ucx.installer.workflows] Identified a run in progress waiting for run completion
04:54 DEBUG [databricks.labs.ucx.installer.workflows] starting migrate-tables job: https://DATABRICKS_HOST#job/823461816349106
04:54 INFO [databricks.labs.ucx.installer.workflows] Started migrate-tables job: https://DATABRICKS_HOST#job/823461816349106/runs/970527566029027
04:54 DEBUG [databricks.labs.ucx.installer.workflows] Validating migrate-tables workflow: https://DATABRICKS_HOST#job/823461816349106
04:54 INFO [databricks.labs.ucx.installer.workflows] Identified a run in progress waiting for run completion
[gw4] linux -- Python 3.10.16 /home/runner/work/ucx/ucx/.venv/bin/python
04:52 DEBUG [databricks.labs.ucx.install] Cannot find previous installation: Path (/Users/0a330eb5-dd51-4d97-b6e4-c474356b1d5d/.TE9Q/config.yml) doesn't exist.
04:52 INFO [databricks.labs.ucx.install] Please answer a couple of questions to configure Unity Catalog migration
04:52 INFO [databricks.labs.ucx.installer.hms_lineage] HMS Lineage feature creates one system table named system.hms_to_uc_migration.table_access and helps in your migration process from HMS to UC by allowing you to programmatically query HMS lineage data.
04:52 INFO [databricks.labs.ucx.install] Fetching installations...
04:52 WARNING [databricks.labs.ucx.install] Existing installation at /Users/0a330eb5-dd51-4d97-b6e4-c474356b1d5d/.TE9Q is corrupted. Skipping...
04:52 INFO [databricks.labs.ucx.installer.policy] Creating UCX cluster policy.
04:52 DEBUG [tests.integration.conftest] Waiting for clusters to start...
04:52 DEBUG [tests.integration.conftest] Waiting for clusters to start...
04:52 INFO [databricks.labs.ucx.install] Installing UCX v0.57.1+1420250306045219
04:52 INFO [databricks.labs.ucx.install] Creating ucx schemas...
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-tables
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-groups
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-data-reconciliation
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=failing
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migration-progress-experimental
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=validate-groups-permissions
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=remove-workspace-local-backup-groups
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-external-tables-ctas
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-tables-in-mounts-experimental
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=assessment
04:52 INFO [databricks.labs.ucx.install] Creating dashboards...
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-groups-legacy
04:52 DEBUG [databricks.labs.ucx.install] Reading step folder /home/runner/work/ucx/ucx/src/databricks/labs/ucx/queries/progress...
04:52 DEBUG [databricks.labs.ucx.install] Reading step folder /home/runner/work/ucx/ucx/src/databricks/labs/ucx/queries/views...
04:52 DEBUG [databricks.labs.ucx.install] Reading step folder /home/runner/work/ucx/ucx/src/databricks/labs/ucx/queries/migration...
04:52 DEBUG [databricks.labs.ucx.install] Reading step folder /home/runner/work/ucx/ucx/src/databricks/labs/ucx/queries/assessment...
04:52 INFO [databricks.labs.ucx.install] Creating dashboard in /home/runner/work/ucx/ucx/src/databricks/labs/ucx/queries/progress/main...
04:52 INFO [databricks.labs.ucx.install] Creating dashboard in /home/runner/work/ucx/ucx/src/databricks/labs/ucx/queries/migration/main...
04:52 INFO [databricks.labs.ucx.install] Creating dashboard in /home/runner/work/ucx/ucx/src/databricks/labs/ucx/queries/migration/groups...
04:52 INFO [databricks.labs.ucx.install] Creating dashboard in /home/runner/work/ucx/ucx/src/databricks/labs/ucx/queries/assessment/CLOUD_ENV...
04:52 INFO [databricks.labs.ucx.install] Creating dashboard in /home/runner/work/ucx/ucx/src/databricks/labs/ucx/queries/assessment/main...
04:52 INFO [databricks.labs.ucx.install] Creating dashboard in /home/runner/work/ucx/ucx/src/databricks/labs/ucx/queries/assessment/interactive...
04:52 INFO [databricks.labs.ucx.install] Creating dashboard in /home/runner/work/ucx/ucx/src/databricks/labs/ucx/queries/assessment/estimates...
04:52 INFO [databricks.labs.ucx.installer.mixins] Fetching warehouse_id from a config
04:52 INFO [databricks.labs.ucx.installer.mixins] Fetching warehouse_id from a config
04:52 INFO [databricks.labs.ucx.installer.mixins] Fetching warehouse_id from a config
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-external-hiveserde-tables-in-place-experimental
04:52 INFO [databricks.labs.ucx.installer.mixins] Fetching warehouse_id from a config
04:52 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=scan-tables-in-mounts-experimental
04:52 INFO [databricks.labs.ucx.installer.mixins] Fetching warehouse_id from a config
04:52 INFO [databricks.labs.ucx.installer.mixins] Fetching warehouse_id from a config
04:52 INFO [databricks.labs.ucx.installer.mixins] Fetching warehouse_id from a config
04:52 INFO [databricks.labs.ucx.install] Installation completed successfully! Please refer to the https://DATABRICKS_HOST/#workspace/Users/0a330eb5-dd51-4d97-b6e4-c474356b1d5d/.TE9Q/README for the next steps.
04:52 INFO [databricks.labs.ucx.progress.install] Installation completed successfully!
04:52 DEBUG [databricks.labs.ucx.installer.workflows] starting assessment job: https://DATABRICKS_HOST#job/226871138412842
04:52 INFO [databricks.labs.ucx.installer.workflows] Started assessment job: https://DATABRICKS_HOST#job/226871138412842/runs/560857488225883
04:52 DEBUG [databricks.labs.ucx.installer.workflows] Validating assessment workflow: https://DATABRICKS_HOST#job/226871138412842
04:52 INFO [databricks.labs.ucx.installer.workflows] Identified a run in progress waiting for run completion
04:54 DEBUG [databricks.labs.ucx.installer.workflows] starting migrate-tables job: https://DATABRICKS_HOST#job/823461816349106
04:54 INFO [databricks.labs.ucx.installer.workflows] Started migrate-tables job: https://DATABRICKS_HOST#job/823461816349106/runs/970527566029027
04:54 DEBUG [databricks.labs.ucx.installer.workflows] Validating migrate-tables workflow: https://DATABRICKS_HOST#job/823461816349106
04:54 INFO [databricks.labs.ucx.installer.workflows] Identified a run in progress waiting for run completion
05:02 INFO [databricks.labs.ucx.install] Deleting UCX v0.57.1+1420250306045219 from https://DATABRICKS_HOST
05:02 INFO [databricks.labs.ucx.install] Deleting inventory database dummy_soh7d
❌ test_permission_for_files_anonymous_func_migration_api: TimeoutError: Timed out after 0:02:00 (11m27.256s)
TimeoutError: Timed out after 0:02:00
[gw0] linux -- Python 3.10.16 /home/runner/work/ucx/ucx/.venv/bin/python
05:03 INFO [databricks.labs.ucx.workspace_access.groups] Migrating permissions for 1 account groups.
05:03 INFO [databricks.labs.ucx.workspace_access.groups] Migrating permissions: sdk-IX8O-ra78b383cf (workspace) -> sdk-ElTW-ra78b383cf (account) starting
05:03 INFO [databricks.labs.ucx.workspace_access.groups] Migrating permissions: sdk-IX8O-ra78b383cf (workspace) -> sdk-ElTW-ra78b383cf (account) progress=2(+2)
05:03 INFO [databricks.labs.ucx.workspace_access.groups] Migrating permissions: sdk-IX8O-ra78b383cf (workspace) -> sdk-ElTW-ra78b383cf (account) finished
05:03 INFO [databricks.labs.ucx.workspace_access.groups] Migrated 2 permissions: sdk-IX8O-ra78b383cf (workspace) -> sdk-ElTW-ra78b383cf (account)
05:03 INFO [databricks.labs.ucx.workspace_access.groups] Migrated 2 permissions for 1/1 groups successfully.
05:15 ERROR [databricks.labs.ucx.hive_metastore.grants] Couldn't fetch grants for object ANY FILE : TEMPORARILY_UNAVAILABLE: The service at /api/2.0/sql-acl/get-permissions is taking too long to process your request. Please try again later or try a faster operation. [TraceId: 00-63fa2e0bd02f35a8dec15e589af4937a-840769fbc7d75ce0-00]
05:03 INFO [databricks.labs.ucx.workspace_access.groups] Migrating permissions for 1 account groups.
05:03 INFO [databricks.labs.ucx.workspace_access.groups] Migrating permissions: sdk-IX8O-ra78b383cf (workspace) -> sdk-ElTW-ra78b383cf (account) starting
05:03 INFO [databricks.labs.ucx.workspace_access.groups] Migrating permissions: sdk-IX8O-ra78b383cf (workspace) -> sdk-ElTW-ra78b383cf (account) progress=2(+2)
05:03 INFO [databricks.labs.ucx.workspace_access.groups] Migrating permissions: sdk-IX8O-ra78b383cf (workspace) -> sdk-ElTW-ra78b383cf (account) finished
05:03 INFO [databricks.labs.ucx.workspace_access.groups] Migrated 2 permissions: sdk-IX8O-ra78b383cf (workspace) -> sdk-ElTW-ra78b383cf (account)
05:03 INFO [databricks.labs.ucx.workspace_access.groups] Migrated 2 permissions for 1/1 groups successfully.
05:15 ERROR [databricks.labs.ucx.hive_metastore.grants] Couldn't fetch grants for object ANY FILE : TEMPORARILY_UNAVAILABLE: The service at /api/2.0/sql-acl/get-permissions is taking too long to process your request. Please try again later or try a faster operation. [TraceId: 00-63fa2e0bd02f35a8dec15e589af4937a-840769fbc7d75ce0-00]
[gw0] linux -- Python 3.10.16 /home/runner/work/ucx/ucx/.venv/bin/python

Running from acceptance #8469

@pritishpai pritishpai force-pushed the fix/grants-integration-tests branch from cfaceb2 to a7c762e Compare February 28, 2025 22:43
@JCZuurmond JCZuurmond force-pushed the fix/grants-integration-tests branch from a7c762e to e405ef6 Compare March 4, 2025 08:47
@JCZuurmond JCZuurmond assigned pritishpai and unassigned JCZuurmond Mar 4, 2025
Copy link
Member Author

@JCZuurmond JCZuurmond left a comment

Choose a reason for hiding this comment

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

@pritishpai : Handing over this PR to you. We looked into the issue yesterday and saw it might be an issue specific to our workspace.

I added some comments with my thoughts.

assert tables_crawler._catalog == udf._catalog
assert tables_crawler._schema == udf._schema
super().__init__(tables_crawler._sql_backend, tables_crawler._catalog, tables_crawler._schema, "grants", Grant)
def __init__(
Copy link
Member Author

Choose a reason for hiding this comment

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

I decoupled the grantscrawler from the tables crawler for two reasons:

  1. IMO it is confusing because AFAIK this is the only crawler which does it. It also bears the question: why not tightly couple it with the UDFs crawler?
  2. The GrantsCrawler is expected to run against a different SqlBackend in the assessment workflow, namely the TACL cluster.

@@ -25,7 +35,7 @@ def _deployed_schema(runtime_ctx) -> None:


@retried(on=[NotFound, TimeoutError], timeout=dt.timedelta(minutes=3))
def test_all_grant_types(runtime_ctx: MockRuntimeContext, _deployed_schema: None):
def test_all_grant_types(runtime_ctx: MockRuntimeContext, sql_backend_tacl: SqlBackend, _deployed_schema: None):
Copy link
Member Author

Choose a reason for hiding this comment

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

I am mimicking the assessment workflow here:

  1. TablesCrawler and UdfsCrawler run against the "regular" backend
  2. GrantsCrawler run against the "tacl" backend

wait_for_grants(contains_select_on_any_file, any_file=True)
# Only verifying the SELECT permission on ANY FILE and ANONYMOUS FUNCTION as those take a while to propagate.
wait_for_grants(grants_contain_select_action, any_file=True)
wait_for_grants(grants_contain_select_action, anonymous_function=True)
Copy link
Member Author

Choose a reason for hiding this comment

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

This fails with the following error:

DatabricksServiceHttpClientException: TEMPORARILY_UNAVAILABLE: The service at /api/2.0/sql-acl/get-permissions is taking too long to process your request. Please try again later or try a faster operation. [TraceId: 00-afa5633f98d2b7cbc47937e9233436b5-c5249ad122b4daa2-00]

This endpoint API docs suggest to use the new API endpoint. However, the choice for API endpoint is not up to us as it we use SHOW GRANTS ... - not the API endpoints directly. (Note we might implicitly chose the endpoint with the runtime.)

@gueniai : Could you ask the endpoint team on guidance here?

Copy link
Contributor

Choose a reason for hiding this comment

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

I tried manually last night and I could make the /api/2.0/sql-acl/get-permissions via a python api call. If the endpoint team can give us the revoke permissions or anything that can help us clear the dangling permissions it would help us a lot.

@pritishpai pritishpai force-pushed the fix/grants-integration-tests branch from e405ef6 to 9e44daa Compare March 6, 2025 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/test-infra issues related to testing infrastructure internal this pull request won't appear in release notes migrate/access-control Access Control to things
Projects
Status: Ready for Review
Development

Successfully merging this pull request may close these issues.

Test failure: test_all_grant_types
2 participants