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

Retry deploy schema on InternalError #283

Merged
merged 2 commits into from
Sep 16, 2024

Conversation

JCZuurmond
Copy link
Contributor

Retry deploy schema on InternalError to improve resilience against sporadic Databricks issues

Copy link

github-actions bot commented Sep 16, 2024

❌ 34/35 passed, 3 flaky, 1 failed, 3 skipped, 7m36s total

❌ test_appends_complex_types: databricks.sdk.errors.platform.BadRequest: [INSUFFICIENT_PERMISSIONS] Insufficient privileges: (505ms)
databricks.sdk.errors.platform.BadRequest: [INSUFFICIENT_PERMISSIONS] Insufficient privileges:
User does not have permission CREATE,USAGE on database `TEST_SCHEMA`. SQLSTATE: 42501
08:57 DEBUG [databricks.sdk] Loaded from environment
08:57 DEBUG [databricks.sdk] Ignoring pat auth, because metadata-service is preferred
08:57 DEBUG [databricks.sdk] Ignoring basic auth, because metadata-service is preferred
08:57 DEBUG [databricks.sdk] Attempting to configure auth: metadata-service
08:57 INFO [databricks.sdk] Using Databricks Metadata Service authentication
[gw2] linux -- Python 3.10.14 /home/runner/work/lsql/lsql/.venv/bin/python
08:57 DEBUG [databricks.sdk] Loaded from environment
08:57 DEBUG [databricks.sdk] Ignoring pat auth, because metadata-service is preferred
08:57 DEBUG [databricks.sdk] Ignoring basic auth, because metadata-service is preferred
08:57 DEBUG [databricks.sdk] Attempting to configure auth: metadata-service
08:57 INFO [databricks.sdk] Using Databricks Metadata Service authentication
08:57 DEBUG [databricks.labs.lsql.backends] [api][execute] CREATE TABLE IF NOT EXISTS hive_metastore.TEST_SCHEMA.tadKN (nested STRUCT<first:STRING,second:BOOLE... (216 more bytes)
08:57 DEBUG [databricks.labs.lsql.core] Executing SQL statement: CREATE TABLE IF NOT EXISTS hive_metastore.TEST_SCHEMA.tadKN (nested STRUCT<first:STRING,second:BOOLEAN> NOT NULL, since DATE NOT NULL, created TIMESTAMP NOT NULL, mapping MAP<STRING,LONG> NOT NULL, int_array ARRAY<LONG> NOT NULL, struct_array ARRAY<STRUCT<name:STRING,other:MAP<STRING,STRING>>> NOT NULL) USING DELTA
08:57 DEBUG [databricks.sdk] POST /api/2.0/sql/statements/
> {
>   "format": "JSON_ARRAY",
>   "statement": "CREATE TABLE IF NOT EXISTS hive_metastore.TEST_SCHEMA.tadKN (nested STRUCT<first:STRING,second:BOOLE... (216 more bytes)",
>   "warehouse_id": "TEST_DEFAULT_WAREHOUSE_ID"
> }
< 200 OK
< {
<   "statement_id": "01ef7409-b6c7-1372-8bb6-8dbf178dd726",
<   "status": {
<     "error": {
<       "error_code": "BAD_REQUEST",
<       "message": "[INSUFFICIENT_PERMISSIONS] Insufficient privileges:\nUser does not have permission CREATE,USAGE o... (37 more bytes)"
<     },
<     "state": "FAILED"
<   }
< }
08:57 DEBUG [databricks.sdk] Loaded from environment
08:57 DEBUG [databricks.sdk] Ignoring pat auth, because metadata-service is preferred
08:57 DEBUG [databricks.sdk] Ignoring basic auth, because metadata-service is preferred
08:57 DEBUG [databricks.sdk] Attempting to configure auth: metadata-service
08:57 INFO [databricks.sdk] Using Databricks Metadata Service authentication
08:57 DEBUG [databricks.labs.lsql.backends] [api][execute] CREATE TABLE IF NOT EXISTS hive_metastore.TEST_SCHEMA.tadKN (nested STRUCT<first:STRING,second:BOOLE... (216 more bytes)
08:57 DEBUG [databricks.labs.lsql.core] Executing SQL statement: CREATE TABLE IF NOT EXISTS hive_metastore.TEST_SCHEMA.tadKN (nested STRUCT<first:STRING,second:BOOLEAN> NOT NULL, since DATE NOT NULL, created TIMESTAMP NOT NULL, mapping MAP<STRING,LONG> NOT NULL, int_array ARRAY<LONG> NOT NULL, struct_array ARRAY<STRUCT<name:STRING,other:MAP<STRING,STRING>>> NOT NULL) USING DELTA
08:57 DEBUG [databricks.sdk] POST /api/2.0/sql/statements/
> {
>   "format": "JSON_ARRAY",
>   "statement": "CREATE TABLE IF NOT EXISTS hive_metastore.TEST_SCHEMA.tadKN (nested STRUCT<first:STRING,second:BOOLE... (216 more bytes)",
>   "warehouse_id": "TEST_DEFAULT_WAREHOUSE_ID"
> }
< 200 OK
< {
<   "statement_id": "01ef7409-b6c7-1372-8bb6-8dbf178dd726",
<   "status": {
<     "error": {
<       "error_code": "BAD_REQUEST",
<       "message": "[INSUFFICIENT_PERMISSIONS] Insufficient privileges:\nUser does not have permission CREATE,USAGE o... (37 more bytes)"
<     },
<     "state": "FAILED"
<   }
< }
[gw2] linux -- Python 3.10.14 /home/runner/work/lsql/lsql/.venv/bin/python

Flaky tests:

  • 🤪 test_dashboards_creates_exported_dashboard_definition (6.396s)
  • 🤪 test_dashboard_deploys_dashboard_the_same_as_created_dashboard (6.841s)
  • 🤪 test_dashboard_deploys_dashboard_with_display_name (9.246s)

Running from acceptance #398

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.

lgtm

@nfx nfx merged commit 2ad66b6 into main Sep 16, 2024
6 of 8 checks passed
@nfx nfx deleted the internal/retry-deploy-schema-on-internal-error branch September 16, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants