You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "shervinrad100 (via GitHub)" <gi...@apache.org> on 2024/10/30 14:52:37 UTC

[PR] removed all refs to page_size [airflow]

shervinrad100 opened a new pull request, #43515:
URL: https://github.com/apache/airflow/pull/43515

   <!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
   
      http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
    -->
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of an existing issue, reference it using one of the following:
   
   closes: #43486 
   related: #43486 
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   **Problem**
   When executing the GoogleAdsToGcsOperator I received an error that `page_size` is not accepted parameters by this API. According to [these](https://developers.google.com/google-ads/api/docs/sunset-dates) docs, it appears that none of the google API versions support this parameters. 
   
   This was raised in this issue: [#43486](https://github.com/apache/airflow/issues/43486) 
   
   **Solution**
   removed all refs to `page_size` as can no longer be passed onto the API. 
   
   
   <!-- Please keep an empty line above the dashes. -->
   ---
   **^ Add meaningful description above**
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   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](https://github.com/apache/airflow/tree/main/newsfragments).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] removed all refs to page_size [airflow]

Posted by "molcay (via GitHub)" <gi...@apache.org>.
molcay commented on PR #43515:
URL: https://github.com/apache/airflow/pull/43515#issuecomment-2449370509

   Hi @shervinrad100, Thank you for the contribution.
   
   For the Google provider (and also Airflow in general), we are following a depreciation policy which states that before removal (which requires a major version bump), we need to deprecate the `public` parameters/hooks/operators etc. While adding the depreciation, we also need to mention the **removal date** _(if possible alternative things to use)_.
   
   Normally, we have a hook to use it for depreciation but parameter depreciation is a bit tricky. Here is an example for depreciation for the parameter.
   ```python
   warnings.warn("Something is deprecated and will be removed after MONTH DD, YYYY. Please use something else instead." AirflowProviderDeprecationWarning, stacklevel=2)
   ```
   > Please check this warning message on the unit tests side as well.
   
   We can remove it from the [underlying API call](https://github.com/apache/airflow/blob/755c10b99752b1868eb410a00563eff537300e91/providers/src/airflow/providers/google/ads/hooks/ads.py#L287C68-L287C90) and private methods like [`_search`](https://github.com/apache/airflow/blob/755c10b99752b1868eb410a00563eff537300e91/providers/src/airflow/providers/google/ads/hooks/ads.py#L270) to avoid API error. However the public parts (in your PR, they are the parameter of the hooks) needs to deprecate first and then remove.
   
   Also, I wonder about operators; as far as I can see, the [operator](https://github.com/apache/airflow/blob/755c10b99752b1868eb410a00563eff537300e91/providers/src/airflow/providers/google/ads/transfers/ads_to_gcs.py#L86C9-L86C32) also has this `page_size` parameter. Are there any reasons for **not** changing the operators?
   
   
   ---
   
   I saw this is your first PR on this repo but removing something is just hard. I very much appreciated your effort, thank you!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] removed all refs to page_size [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #43515:
URL: https://github.com/apache/airflow/pull/43515#issuecomment-2505165336

   Shall we merge it @eladkal ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] removed all refs to page_size [airflow]

Posted by "molcay (via GitHub)" <gi...@apache.org>.
molcay commented on PR #43515:
URL: https://github.com/apache/airflow/pull/43515#issuecomment-2567444942

   Hi @eladkal,
   I created a [follow-up PR](https://github.com/apache/airflow/pull/43515) for this change. Can you have a look at it?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] removed all refs to page_size [airflow]

Posted by "molcay (via GitHub)" <gi...@apache.org>.
molcay commented on PR #43515:
URL: https://github.com/apache/airflow/pull/43515#issuecomment-2518427579

   Hi @eladkal,
   Yes, it is currently working in v16 but not in v17+. 
   Do we know when it will be the next cut?
   I asked @shervinrad100 to clarify the status. According to the response we might take action.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] removed all refs to page_size [airflow]

Posted by "molcay (via GitHub)" <gi...@apache.org>.
molcay commented on PR #43515:
URL: https://github.com/apache/airflow/pull/43515#issuecomment-2488091436

   @eladkal, the comment is accurate for `v17`, `v17.1` and `v18` of the Google Ads API. 
   On the other hand, `v16` and `v16.1` (which are supported until February 5, 2025) support this variable. 
   By default we have the latest version of the API but the users can always specify the API version to use a specific API version. 
   After February, since the support for `v16` and `v16.1` will be ended, then we can remove the parameter. 
   IMHO, we need to put the deprecation warning for February right now and will remove it on February


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] removed all refs to page_size [airflow]

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on code in PR #43515:
URL: https://github.com/apache/airflow/pull/43515#discussion_r1822867744


##########
newsfragments/43486.significant.rst:
##########
@@ -0,0 +1,4 @@
+page_size paramters has been removed from providers/google/ads

Review Comment:
   This is provider change not core so newfragment is not relevant.
   
   If the note is segnificant please place it at the top of the google changelog in the provider folder.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] removed all refs to page_size [airflow]

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #43515:
URL: https://github.com/apache/airflow/pull/43515#issuecomment-2447414471

   Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
   Here are some useful points:
   - Pay attention to the quality of your code (ruff, mypy and type annotations). Our [pre-commits]( https://github.com/apache/airflow/blob/main/contributing-docs/08_static_code_checks.rst#prerequisites-for-pre-commit-hooks) will help you with that.
   - In case of a new feature add useful documentation (in docstrings or in `docs/` directory). Adding a new operator? Check this short [guide](https://github.com/apache/airflow/blob/main/docs/apache-airflow/howto/custom-operator.rst) Consider adding an example DAG that shows how users should use it.
   - Consider using [Breeze environment](https://github.com/apache/airflow/blob/main/dev/breeze/doc/README.rst) for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
   - Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
   - Please follow [ASF Code of Conduct](https://www.apache.org/foundation/policies/conduct) for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
   - Be sure to read the [Airflow Coding style]( https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#coding-style-and-best-practices).
   - Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
   Apache Airflow is a community-driven project and together we are making it better 🚀.
   In case of doubts contact the developers at:
   Mailing List: dev@airflow.apache.org
   Slack: https://s.apache.org/airflow-slack
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] removed all refs to page_size [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #43515:
URL: https://github.com/apache/airflow/pull/43515#issuecomment-2578742260

   Closing


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] removed all refs to page_size [airflow]

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on PR #43515:
URL: https://github.com/apache/airflow/pull/43515#issuecomment-2467968935

   @molcay according to the description I am not sure if deprecation is needed?
   It suggests that the API itself doesn't accept this parameter so what is the reasoning with deprecation first?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] removed all refs to page_size [airflow]

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on PR #43515:
URL: https://github.com/apache/airflow/pull/43515#issuecomment-2514134399

   Just to get understanding...
   the current state is that the feature is usable only for v16 as v17+ get exception thus can't use it.
   If that is the case I suggest to get this resolved before next cut of providers wave.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] removed all refs to page_size [airflow]

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on PR #43515:
URL: https://github.com/apache/airflow/pull/43515#issuecomment-2505498829

   > Shall we merge it @eladkal ?
   
   According to @molcay we can't merge it unless we bump min version of SDK to 17. If we don't wish to do it then we need to deprecate the parameter and have some mechanism to detect which version of the SDK is being used to populate the right function signature.
   
   I'll leave to Google folks to decide how they want to proceed.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] removed all refs to page_size [airflow]

Posted by "molcay (via GitHub)" <gi...@apache.org>.
molcay commented on PR #43515:
URL: https://github.com/apache/airflow/pull/43515#issuecomment-2577222957

   Hi,
   The follow-up PR: #45239 is already merged! We can close this


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] removed all refs to page_size [airflow]

Posted by "molcay (via GitHub)" <gi...@apache.org>.
molcay commented on PR #43515:
URL: https://github.com/apache/airflow/pull/43515#issuecomment-2482915275

   Hi @eladkal, 
   The documentation page says after v16 sunset (February 5, 2025), this parameter will be removed. Currently we are trying to use the latest version in our provider but users of the operator can always change the version and use an old version (like v16 or v16.1). 
   
   Considering we have approx. 3 months before sunset of v16, I think we need to give some kind of depreciation warning to the user first and then remove it. Also, removing something requires the bump of the major version, we are just trying to avoid removing something directly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] removed all refs to page_size [airflow]

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on PR #43515:
URL: https://github.com/apache/airflow/pull/43515#issuecomment-2482927240

   > The documentation page says after v16 sunset (February 5, 2025), this parameter will be removed. 
   
   Then the statement of:
   
   > When executing the GoogleAdsToGcsOperator I received an error that page_size is not accepted parameters by this API.
   
   by the PR author, is not accurate?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] removed all refs to page_size [airflow]

Posted by "molcay (via GitHub)" <gi...@apache.org>.
molcay commented on PR #43515:
URL: https://github.com/apache/airflow/pull/43515#issuecomment-2514067488

   Hi @potiuk,
   
   Since we have ~3 months before sunset for `v16.x`, we have to deprecate first and then after February we can remove it. 
   Some users might be using the `v16.x` of the API and the `page_size` parameter is available for them.
   
   @shervinrad100 did you have an update on this topic?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] removed all refs to page_size [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #43515:
URL: https://github.com/apache/airflow/pull/43515#issuecomment-2506034763

   @molcay @VladaZakharova ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] removed all refs to page_size [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk closed pull request #43515: removed all refs to page_size
URL: https://github.com/apache/airflow/pull/43515


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org