Repository navigation
[Bug] Strict validation in Dataset URI in Airflow 2.9 breaks some DAGs #39486
Copy link
Copy link
Closed
Labels
_eol_affected_version:2.9Issues Reported for 2.9Issues Reported for 2.9area:corearea:data-aware-schedulingassets, datasets, AIP-48, AIP-76, AIP-74, Asset Partitionsassets, datasets, AIP-48, AIP-76, AIP-74, Asset Partitionsgood first issuekind:bugThis is a clearly a bugThis is a clearly a bug
Description
Activity
- addedkind:bugThis is a clearly a bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yet
on May 8, 2024 - changed the title
[-][Bug] Strict validation in Dataset URI in Airflow 2.9 break some DAGs[/-][+][Bug] Strict validation in Dataset URI in Airflow 2.9 breaks some DAGs[/+]on May 8, 2024 Tentatively targeting 2.9.2, I think we can argue this is a bug fix (the issue being backward incompatibility).
Reacted by Tatiana Al-Chueyr and Alex Seeholzer@uranusjr I'll try to get the PR ready for today - I can't assign the ticket to myself, but feel free to assign it if possible.
Reacted by Alex Seeholzer- added_eol_affected_version:2.9Issues Reported for 2.9Issues Reported for 2.9and removedneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yet
on May 11, 2024 @tatiana Any progress on this one?
- added a commit that references this issue
on May 17, 2024 - added 2 commits that reference this issue
on Jun 4, 2024 - added a commit that references this issue
on Jun 5, 2024 - added a commit that references this issue
on Jul 26, 2024 - addedarea:data-aware-schedulingassets, datasets, AIP-48, AIP-76, AIP-74, Asset Partitionsassets, datasets, AIP-48, AIP-76, AIP-74, Asset Partitionsand removed
on Mar 25, 2025
Metadata
Metadata
Assignees
Labels
_eol_affected_version:2.9Issues Reported for 2.9Issues Reported for 2.9area:corearea:data-aware-schedulingassets, datasets, AIP-48, AIP-76, AIP-74, Asset Partitionsassets, datasets, AIP-48, AIP-76, AIP-74, Asset Partitionsgood first issuekind:bugThis is a clearly a bugThis is a clearly a bug
Apache Airflow version
2.9.0 & 2.9.1
What happened?
Valid DAGs that worked in Airflow 2.8.x and had tasks with outlets with specific URIs, such as
Dataset("postgres://postgres:5432/postgres.dbt.stg_customers"), stopped working in Airflow 2.9.0, after #37005 was merged.What you think should happen instead?
This is a breaking change in an Airflow minor version. We should avoid this.
Airflow < 3.0 should raise a warning, and from Airflow 3.0, we can make errors by default. We can have a feature flag to allow users who want to see this in advance to enable errors in Airflow 2. x, but this should not be the default behaviour.
The DAGs should continue working on Airflow 2.x minor/micro releases without errors (unless the user opts in via configuration).
How to reproduce
By running the following DAG, as an example:
Causes to the exception:
Operating System
All
Versions of Apache Airflow Providers
apache-airflow-providers-postgres==5.11.0Deployment
Astronomer
Deployment details
This issue can be seen in any Airflow 2.9.0 or 2.9.1 deployment.
Anything else?
An apparent "quick-fix" could be to replace "." by "/" in the Dataset URI of the DAG. However, this would break any DAGs that use data-aware schedules and consume from this Dataset - in a silent way. For this reason, let's fix this in Airflow 2.9 and prepare users for a breaking change in Airflow 3.0.
Suggested approach to fix the problem:
Introduce a boolean configuration within
[core],namedstrict_dataset_uri_validation,which should beFalseby default.When this configuration is
False,Airflow should raise a warning saying:If this configuration is
True,Airflow should raise the exception, as it does now in Airflow 2.9.0 and 2.9.1From Airflow 3.0, we change this configuration to be True by default.
Are you willing to submit PR?
Code of Conduct