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 failing test after upgrade to the newer dependencies #38759

Merged
merged 2 commits into from
Apr 4, 2024

Conversation

Taragolis
Copy link
Contributor

Fix failing tests into the main after upgrade to the newer openlineage packages

372,374c372,374
< openlineage-integration-common==1.10.2
< openlineage-python==1.10.2
< openlineage_sql==1.10.2
---
> openlineage-integration-common==1.11.3
> openlineage-python==1.11.3
> openlineage_sql==1.11.3
>       assert lineage.run_facets == {"bigQuery_error": BigQueryErrorRunFacet(clientError=mock.ANY)}
E       assert {'externalQuery': ExternalQueryRunFacet(_producer='https://github.com/OpenLineage/OpenLineage/tree/1.11.3/client/python', _schemaURL='https://raw.githubusercontent.com/OpenLineage/OpenLineage/main/spec/OpenLineage.json#/definitions/BaseFacet', externalQueryId='1234', source='bigquery'), 'bigQuery_error': BigQueryErrorRunFacet(_producer='https://github.com/OpenLineage/OpenLineage/tree/1.11.3/client/python', _schemaURL='https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/bq-error-run-facet.json', clientError=': Traceback (most recent call last):\n  File "/Users/taragolis/.pyenv/versions/airflow-dev-env-39/lib/python3.9/site-packages/openlineage/common/provider/bigquery.py", line 132, in get_facets\n    job = self.client.get_job(job_id=job_id)  # type: ignore\n  File "/Users/taragolis/.pyenv/versions/3.9.10/lib/python3.9/unittest/mock.py", line 1092, in __call__\n    return self._mock_call(*args, **kwargs)\n  File "/Users/taragolis/.pyenv/versions/3.9.10/lib/python3.9/unittest/mock.py", line 1096, in _mock_call\n    return self._execute_mock_call(*args, **kwargs)\n  File "/Users/taragolis/.pyenv/versions/3.9.10/lib/python3.9/unittest/mock.py", line 1151, in _execute_mock_call\n    raise effect\nRuntimeError\n', parserError=None)} == {'bigQuery_error': BigQueryErrorRunFacet(_producer='https://github.com/OpenLineage/OpenLineage/tree/1.11.3/client/python', _schemaURL='https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/bq-error-run-facet.json', clientError=<ANY>, parserError=None)}
E         Common items:
E         {'bigQuery_error': BigQueryErrorRunFacet(_producer='https://github.com/OpenLineage/OpenLineage/tree/1.11.3/client/python', _schemaURL='https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/bq-error-run-facet.json', clientError=': Traceback (most recent call last):\n  File "/Users/taragolis/.pyenv/versions/airflow-dev-env-39/lib/python3.9/site-packages/openlineage/common/provider/bigquery.py", line 132, in get_facets\n    job = self.client.get_job(job_id=job_id)  # type: ignore\n  File "/Users/taragolis/.pyenv/versions/3.9.10/lib/python3.9/unittest/mock.py", line 1092, in __call__\n    return self._mock_call(*args, **kwargs)\n  File "/Users/taragolis/.pyenv/versions/3.9.10/lib/python3.9/unittest/mock.py", line 1096, in _mock_call\n    return self._execute_mock_call(*args, **kwargs)\n  File "/Users/taragolis/.pyenv/versions/3.9.10/lib/python3.9/unittest/mock.py", line 1151, in _execute_mock_call\n    raise effect\nRuntimeError\n', parserError=None)}
E         Left contains 1 more item:
E         {'externalQuery': ExternalQueryRunFacet(_producer='https://github.com/OpenLineage/OpenLineage/tree/1.11.3/client/python', _schemaURL='https://raw.githubusercontent.com/OpenLineage/OpenLineage/main/spec/OpenLineage.json#/definitions/BaseFacet', externalQueryId='1234', source='bigquery')}
E         Full diff:
E           {
E         -  'bigQuery_error': BigQueryErrorRunFacet(_producer='https://github.com/OpenLineage/OpenLineage/tree/1.11.3/client/python', _schemaURL='https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/bq-error-run-facet.json', clientError=<ANY>, parserError=None),
E         +  'bigQuery_error': BigQueryErrorRunFacet(_producer='https://github.com/OpenLineage/OpenLineage/tree/1.11.3/client/python', _schemaURL='https://github.com/OpenLineage/OpenLineage/tree/main/integration/common/openlineage/schema/bq-error-run-facet.json', clientError=': Traceback (most recent call last):\n  File "/Users/taragolis/.pyenv/versions/airflow-dev-env-39/lib/python3.9/site-packages/openlineage/common/provider/bigquery.py", line 132, in get_facets\n    job = self.client.get_job(job_id=job_id)  # type: ignore\n  File "/Users/taragolis/.pyenv/versions/3.9.10/lib/python3.9/unittest/mock.py", line 1092, in __call__\n    return self._mock_call(*args, **kwargs)\n  File "/Users/taragolis/.pyenv/versions/3.9.10/lib/python3.9/unittest/mock.py", line 1096, in _mock_call\n    return self._execute_mock_call(*args, **kwargs)\n  File "/Users/taragolis/.pyenv/versions/3.9.10/lib/python3.9/unittest/mock.py", line 1151, in _execute_mock_call\n    raise effect\nRuntimeError\n', parserError=None),
E         +  'externalQuery': ExternalQueryRunFacet(_producer='https://github.com/OpenLineage/OpenLineage/tree/1.11.3/client/python', _schemaURL='https://raw.githubusercontent.com/OpenLineage/OpenLineage/main/spec/OpenLineage.json#/definitions/BaseFacet', externalQueryId='1234', source='bigquery'),
E           }

The solution it is pretty straightforward, and maybe it is not correct. cc @mobuchowski


^ 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 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.

Let's do it that way right now and let @kacpermuda adjust tomorrow if needed.

@potiuk
Copy link
Member

potiuk commented Apr 4, 2024

Hmmm. One small problem - this test will sart failing with old versions of openlineage - I guess - and most PRs will run with the latest constraints until they get refreshed, so that might cause test failures. Maybe we can figure better way of fixing it

@Taragolis
Copy link
Contributor Author

Add changes, now it should work in old and never version

@potiuk
Copy link
Member

potiuk commented Apr 4, 2024

Add changes, now it should work in old and never version

Coool

@Taragolis Taragolis merged commit 960a6bf into apache:main Apr 4, 2024
40 checks passed
@Taragolis Taragolis deleted the fix-bigquery-openlineage-test branch April 4, 2024 22:57
odaneau-astro pushed a commit to odaneau-astro/airflow that referenced this pull request Apr 8, 2024
* Fix failing test after upgrade to the newer dependencies

* Fix test for old version of openlineage
utkarsharma2 pushed a commit to astronomer/airflow that referenced this pull request Apr 22, 2024
* Fix failing test after upgrade to the newer dependencies

* Fix test for old version of openlineage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers provider:google Google (including GCP) related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants