Use relative path in ParseImportError.filename#51406
Merged
ephraimbuddy merged 5 commits intoapache:mainfrom Jun 12, 2025
Merged
Use relative path in ParseImportError.filename#51406ephraimbuddy merged 5 commits intoapache:mainfrom
ephraimbuddy merged 5 commits intoapache:mainfrom
Conversation
af0857a to
23f0643
Compare
23f0643 to
5d40e93
Compare
Contributor
There was a problem hiding this comment.
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
bugraoz93
approved these changes
Jun 11, 2025
Contributor
bugraoz93
left a comment
There was a problem hiding this comment.
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
uranusjr
reviewed
Jun 12, 2025
uranusjr
approved these changes
Jun 12, 2025
Co-authored-by: Tzu-ping Chung <[email protected]>
choo121600
pushed a commit
to choo121600/airflow
that referenced
this pull request
Jun 14, 2025
* 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 file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This aligns with our use of relative path in DAGs