-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Use relative path in ParseImportError.filename #51406
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 relative path in ParseImportError.filename #51406
Conversation
af0857a
to
23f0643
Compare
23f0643
to
5d40e93
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.
Pull Request Overview
This PR aligns our usage of relative paths for import error filenames with our DAGs by updating the DAG model and related error handling logic while also bumping the uv version from 0.7.8 to 0.7.11.
- Changed the type and default of relative_fileloc in the DAG model to ensure a non-null value for downstream processing.
- Updated all references to use the relative_fileloc (as well as tuple‐based keys for error mappings) and bumped uv version settings across multiple files.
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
task-sdk/src/airflow/sdk/definitions/dag.py | Updated relative_fileloc type from Optional[str] to str with a default empty string. |
scripts/, pyproject.toml, dev/breeze/, Dockerfile* | Bumped uv version from 0.7.8 to 0.7.11. |
airflow-core/* | Updated error handling and database interactions to use relative_fileloc and tuple keys. |
Comments suppressed due to low confidence (1)
task-sdk/src/airflow/sdk/definitions/dag.py:448
- Changing relative_fileloc from an optional type to a non-nullable string with a default empty value may have downstream implications. Please confirm that an empty string is acceptable when no relative path can be determined or consider adding explicit handling for such cases.
relative_fileloc: str = attrs.field(init=False, default="")
38ed4f2
to
402a69d
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.
Looks good. One small nit although not a blocker
airflow-core/src/airflow/api_fastapi/core_api/routes/public/import_error.py
Outdated
Show resolved
Hide resolved
This aligns with our use of relative path in DAGs
402a69d
to
bf79346
Compare
Co-authored-by: Tzu-ping Chung <[email protected]>
* Use relative path in ParseImportError.filename This aligns with our use of relative path in DAGs * fixup! Use relative path in ParseImportError.filename * revert empty string default for relative_fileloc * Fix typo and query explanatory comment * Apply suggestions from code review Co-authored-by: Tzu-ping Chung <[email protected]> --------- Co-authored-by: Tzu-ping Chung <[email protected]>
This aligns with our use of relative path in DAGs