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

Fix BigQuery jobs Label Regex #39556

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion airflow/providers/google/cloud/operators/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

BIGQUERY_JOB_DETAILS_LINK_FMT = "https://console.cloud.google.com/bigquery?j={job_id}"

LABEL_REGEX = re.compile(r"^[a-z][\w-]{0,63}$")
LABEL_REGEX = re.compile(r"^[a-z][\w-]{0,62}$")


class BigQueryUIColors(enum.Enum):
Expand Down
4 changes: 2 additions & 2 deletions tests/providers/google/cloud/operators/test_bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -1878,7 +1878,7 @@ def test_task_label_too_big(self):
},
}
op = BigQueryInsertJobOperator(
task_id="insert_query_job_except_this_task_id_is_really_really_really_really_long",
task_id="insert_query_job_except_this_task_id_is_64_chars_or_more_xxxxxxx",
configuration=configuration,
location=TEST_DATASET_LOCATION,
project_id=TEST_GCP_PROJECT_ID,
Expand All @@ -1893,7 +1893,7 @@ def test_dag_label_too_big(self, dag_maker):
"useLegacySql": False,
},
}
with dag_maker("adhoc_airflow_except_this_task_id_is_really_really_really_really_long"):
with dag_maker("adhoc_airflow_except_this_dag_id_is_64_chars_or_more_xxxxxxxxxxx"):
op = BigQueryInsertJobOperator(
task_id="insert_query_job",
configuration=configuration,
Expand Down