-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix detached test tasks names so they do not exceed 250 chars (#1464)
Since we introduced detached test tasks in #1433 (released in 1.8.0), users started facing issues due to very long task names exceeding Airflow's limits. Example of Python traceback reported by user: ``` Traceback (most recent call last): File "/home/airflow/.local/lib/python3.12/site-packages/airflow/models/baseoperator.py", line 968, in __init__ validate_key(task_id) File "/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/helpers.py", line 55, in validate_key raise AirflowException(f"The key has to be less than {max_length} characters") airflow.exceptions.AirflowException: The key has to be less than 250 characters ``` This PR fixes this issue. In case the name exceeds Airflow's limit (250 ATM), it will name the detached test using: - "detached_{incremental unique number}_test" We also considered naming the new test using: - "parent1_parent2_..._test" - but that may not solve the issue, especially in circumstances where the same parents may have multiple detached nodes. Perhaps in future, we could bundle them in a single task. Closes: #1440
- Loading branch information
Showing
3 changed files
with
64 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters