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 deprecation warnings location in google provider #16403

Conversation

ashb
Copy link
Member

@ashb ashb commented Jun 11, 2021

These warnings were being issued from the wrong location, making them
hard for any users who hit them to fix

tests/serialization/test_dag_serialization.py::TestStringifiedDAGs::test_serialization
  /opt/airflow/airflow/models/dagbag.py:317: DeprecationWarning: This operator is deprecated. Please use BigQueryUpdateDatasetOperator.
    loader.exec_module(new_module)

tests/serialization/test_dag_serialization.py::TestStringifiedDAGs::test_roundtrip_provider_example_dags
tests/serialization/test_dag_serialization.py::TestStringifiedDAGs::test_serialization
  /opt/airflow/airflow/models/baseoperator.py:181: DeprecationWarning: `destination_bucket` is deprecated please use `bucket_name`
    result = func(self, *args, **kwargs)

tests/serialization/test_dag_serialization.py::TestStringifiedDAGs::test_roundtrip_provider_example_dags
tests/serialization/test_dag_serialization.py::TestStringifiedDAGs::test_serialization
  /opt/airflow/airflow/models/baseoperator.py:181: DeprecationWarning: `destination_object` is deprecated please use `object_name`
    result = func(self, *args, **kwargs)

^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, 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 UPDATING.md.

These warnings were being issued from the wrong location, making them
hard for any users who hit them to fix

```
tests/serialization/test_dag_serialization.py::TestStringifiedDAGs::test_serialization
  /opt/airflow/airflow/models/dagbag.py:317: DeprecationWarning: This operator is deprecated. Please use BigQueryUpdateDatasetOperator.
    loader.exec_module(new_module)

tests/serialization/test_dag_serialization.py::TestStringifiedDAGs::test_roundtrip_provider_example_dags
tests/serialization/test_dag_serialization.py::TestStringifiedDAGs::test_serialization
  /opt/airflow/airflow/models/baseoperator.py:181: DeprecationWarning: `destination_bucket` is deprecated please use `bucket_name`
    result = func(self, *args, **kwargs)

tests/serialization/test_dag_serialization.py::TestStringifiedDAGs::test_roundtrip_provider_example_dags
tests/serialization/test_dag_serialization.py::TestStringifiedDAGs::test_serialization
  /opt/airflow/airflow/models/baseoperator.py:181: DeprecationWarning: `destination_object` is deprecated please use `object_name`
    result = func(self, *args, **kwargs)
```
@ashb ashb requested a review from turbaszek as a code owner June 11, 2021 21:34
@boring-cyborg boring-cyborg bot added area:providers provider:google Google (including GCP) related issues labels Jun 11, 2021
@ashb ashb requested review from kaxil, jhtimmins and potiuk June 11, 2021 21:35
@potiuk
Copy link
Member

potiuk commented Jun 11, 2021

Yeah. You've beaten me to it.

@github-actions
Copy link

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Jun 11, 2021
@eladkal eladkal merged commit 3c5cc42 into apache:main Jun 14, 2021
@ashb ashb deleted the fix-deprecation-warning-location-google-provider branch June 14, 2021 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers okay to merge It's ok to merge this PR as it does not require more tests provider:google Google (including GCP) related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants