Skip to content

Conversation

@kacpermuda
Copy link
Contributor

Adding TagsJobFacet to DAGRun events, with DAG tags. Currently DAG tags have only been included in AirflowRunFacet, but they are not serialized in a consistent manner, this should provide a reliable way to retrieve them. I'm also passing the producer explicitly when creating facet, to avoid any room for mistakes.

Apart from that, in this PR I've added all the facets included in DAG START event also to COMPLETE and FAIL event. From now, if the source info is present, all these facets will be available in all DAG level events, for consistency:

  • OwnershipJobFacet
  • DocumentationJobFacet
  • NominalTimeRunFacet

Also removed the code_location arg from adapter method, it has not been used, None has been hardcoded there since beginning. I plan to refactor the facet creation process, as it looks a bit chaotic now. This will be done in a separate PR.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

Copy link
Contributor

@mobuchowski mobuchowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me, however can we add test that checks whether it works well with additionally added tags by user? Like, via OPENLINEAGE__TAGS__JOB?

@kacpermuda
Copy link
Contributor Author

I believe this is already tested on the client side, here. This logic is not in the Airflow integration itself so the OL client is responsible for appending tags from env variables. I'll add a system tests to make sure it's working well. Sounds good?

@kacpermuda kacpermuda force-pushed the feat-ol-tag-facet branch from a790228 to 3db6ced Compare June 4, 2025 10:48
@kacpermuda kacpermuda force-pushed the feat-ol-tag-facet branch from 3db6ced to 77b1b9e Compare June 4, 2025 11:22
@mobuchowski mobuchowski merged commit d8727eb into apache:main Jun 4, 2025
70 checks passed
@kacpermuda kacpermuda deleted the feat-ol-tag-facet branch June 4, 2025 12:34
sanederchik pushed a commit to sanederchik/airflow that referenced this pull request Jun 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants