Skip to content
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

Fix OpenLineage deprecation warning #1449

Merged
merged 8 commits into from
Jan 24, 2025
Merged

Conversation

CorsettiS
Copy link
Contributor

Description

openlineage suggests using event_v2 as the new import call. This can be seen in the source code of openlineage itself for the run method.

Related Issue(s)

UserWarning: {message : DeprecationWarning('This module is deprecated. Please use openlineage.client.event_v2.'), category : 'DeprecationWarning', filename : '/home/airflow/.local/lib/python3.10/site-packages/openlineage/client/filter.py', lineno : 9, line : None}

Breaking Change?

No

Checklist

  • I have made corresponding changes to the documentation (if required)
  • I have added tests that prove my fix is effective or that my feature works

openlineage suggests using event_v2 as the new import call 

UserWarning: {message : DeprecationWarning('This module is deprecated. Please use `openlineage.client.event_v2`.'), category : 'DeprecationWarning', filename : '/home/airflow/.local/lib/python3.10/site-packages/openlineage/client/filter.py', lineno : 9, line : None}
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jan 13, 2025
Copy link

netlify bot commented Jan 13, 2025

Deploy Preview for sunny-pastelito-5ecb04 canceled.

Name Link
🔨 Latest commit 46e383d
🔍 Latest deploy log https://app.netlify.com/sites/sunny-pastelito-5ecb04/deploys/67938d56c0cf5500085bff57

@dosubot dosubot bot added the area:lineage Related to open lineage or DBT dataset lineage label Jan 13, 2025
Copy link
Collaborator

@tatiana tatiana left a comment

Choose a reason for hiding this comment

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

This is really helpful, @CorsettiS , thank you very much for pointing this out and submitting a fix. I left some minor feedback in-line

cosmos/operators/local.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 96.87%. Comparing base (768a0b9) to head (8f4d2bd).

Files with missing lines Patch % Lines
cosmos/operators/local.py 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1449      +/-   ##
==========================================
- Coverage   96.94%   96.87%   -0.07%     
==========================================
  Files          73       73              
  Lines        4355     4358       +3     
==========================================
  Hits         4222     4222              
- Misses        133      136       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tatiana tatiana changed the title update openlineage to avoid deprecation warning Avoid OpenLineage deprecation warning Jan 24, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 24, 2025
@tatiana tatiana changed the title Avoid OpenLineage deprecation warning Fix OpenLineage deprecation warning Jan 24, 2025
@tatiana tatiana merged commit 2b99777 into astronomer:main Jan 24, 2025
65 of 66 checks passed
@tatiana
Copy link
Collaborator

tatiana commented Jan 24, 2025

Thanks a lot for taking this to completion, @corsettigyg ! We'll be releasing it as part of Cosmos 1.9.0

@tatiana tatiana added this to the Cosmos 1.9.0 milestone Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:lineage Related to open lineage or DBT dataset lineage lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants