You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/12/11 17:52:23 UTC

[GitHub] [airflow] potiuk opened a new pull request #13021: Switching to standard --tag-build flag in setuptools in providers

potiuk opened a new pull request #13021:
URL: https://github.com/apache/airflow/pull/13021


   Following #13020 provider packages are also switching to
   --tag-build flag.
   
   <!--
   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 existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+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 [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   


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

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



[GitHub] [airflow] kaxil commented on a change in pull request #13021: Switching to standard --tag-build flag in setuptools in providers

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #13021:
URL: https://github.com/apache/airflow/pull/13021#discussion_r541149323



##########
File path: dev/provider_packages/prepare_provider_packages.py
##########
@@ -1598,7 +1598,9 @@ def copy_readme_and_changelog(provider_package_id: str, backport_packages: bool)
     package_format = os.environ.get("PACKAGE_FORMAT", "wheel")
     print(f"Building backport package: {_provider_package} in format ${package_format}")
     copy_readme_and_changelog(_provider_package, BACKPORT_PACKAGES)
-    command = ["python3", "setup.py", "--version-suffix-for-pypi", suffix]
+    command = ["python3", "setup.py"]
+    if suffix != "":
+        command.extend(['egg_info', '--tag-build', suffix])
     if package_format in ['sdist', 'both']:
         command.append("sdist")
     if package_format in ['wheel', 'both']:

Review comment:
       This will add `bdist_wheel` by default.
   
   ```
   python3 setup.py egg_info --tag-build rc1 bdist_wheel
   ```
   
   for example
   




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

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



[GitHub] [airflow] potiuk merged pull request #13021: Switching to standard --tag-build flag in setuptools in providers

Posted by GitBox <gi...@apache.org>.
potiuk merged pull request #13021:
URL: https://github.com/apache/airflow/pull/13021


   


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

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



[GitHub] [airflow] potiuk commented on a change in pull request #13021: Switching to standard --tag-build flag in setuptools in providers

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #13021:
URL: https://github.com/apache/airflow/pull/13021#discussion_r541139923



##########
File path: scripts/in_container/_in_container_utils.sh
##########
@@ -394,9 +394,9 @@ function verify_suffix_versions_for_package_preparation() {
 
     if [[ ${VERSION_SUFFIX_FOR_SVN} =~ ^rc ]]; then
         echo
-        echo "${COLOR_RED_ERROR} The version suffix for SVN is used only for file names in RC version  ${COLOR_RESET}"
+        echo "${COLOR_YELLOW_WARNING} The version suffix for SVN is used only for file names not for versions in RC version in SVN${COLOR_RESET}"

Review comment:
       True. Fixed.




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

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



[GitHub] [airflow] github-actions[bot] commented on pull request #13021: Switching to standard --tag-build flag in setuptools in providers

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #13021:
URL: https://github.com/apache/airflow/pull/13021#issuecomment-743373015


   The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest master at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.


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

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



[GitHub] [airflow] kaxil commented on a change in pull request #13021: Switching to standard --tag-build flag in setuptools in providers

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #13021:
URL: https://github.com/apache/airflow/pull/13021#discussion_r541163498



##########
File path: dev/provider_packages/prepare_provider_packages.py
##########
@@ -1598,7 +1598,9 @@ def copy_readme_and_changelog(provider_package_id: str, backport_packages: bool)
     package_format = os.environ.get("PACKAGE_FORMAT", "wheel")
     print(f"Building backport package: {_provider_package} in format ${package_format}")
     copy_readme_and_changelog(_provider_package, BACKPORT_PACKAGES)
-    command = ["python3", "setup.py", "--version-suffix-for-pypi", suffix]
+    command = ["python3", "setup.py"]
+    if suffix != "":
+        command.extend(['egg_info', '--tag-build', suffix])
     if package_format in ['sdist', 'both']:
         command.append("sdist")
     if package_format in ['wheel', 'both']:

Review comment:
       Based on Ash's comment on https://github.com/apache/airflow/pull/13020#discussion_r541099194, we either need one of `egg_info` (both), `wheel` or `bdist_wheel` right?
   
   With the above code we will have both `egg_info` and `bdist_wheel` :
   
   ```
   python3 setup.py egg_info --tag-build rc1 bdist_wheel
   ```




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

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



[GitHub] [airflow] potiuk commented on a change in pull request #13021: Switching to standard --tag-build flag in setuptools in providers

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #13021:
URL: https://github.com/apache/airflow/pull/13021#discussion_r541159286



##########
File path: dev/provider_packages/prepare_provider_packages.py
##########
@@ -1598,7 +1598,9 @@ def copy_readme_and_changelog(provider_package_id: str, backport_packages: bool)
     package_format = os.environ.get("PACKAGE_FORMAT", "wheel")
     print(f"Building backport package: {_provider_package} in format ${package_format}")
     copy_readme_and_changelog(_provider_package, BACKPORT_PACKAGES)
-    command = ["python3", "setup.py", "--version-suffix-for-pypi", suffix]
+    command = ["python3", "setup.py"]
+    if suffix != "":
+        command.extend(['egg_info', '--tag-build', suffix])
     if package_format in ['sdist', 'both']:
         command.append("sdist")
     if package_format in ['wheel', 'both']:

Review comment:
       Yeah. That was intentional. I want `wheel/bdist_wheel` to be the default format which can be overridden by the `--package-format` flag. Anything wrong here?




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

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



[GitHub] [airflow] potiuk commented on a change in pull request #13021: Switching to standard --tag-build flag in setuptools in providers

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #13021:
URL: https://github.com/apache/airflow/pull/13021#discussion_r541174366



##########
File path: dev/provider_packages/prepare_provider_packages.py
##########
@@ -1598,7 +1598,9 @@ def copy_readme_and_changelog(provider_package_id: str, backport_packages: bool)
     package_format = os.environ.get("PACKAGE_FORMAT", "wheel")
     print(f"Building backport package: {_provider_package} in format ${package_format}")
     copy_readme_and_changelog(_provider_package, BACKPORT_PACKAGES)
-    command = ["python3", "setup.py", "--version-suffix-for-pypi", suffix]
+    command = ["python3", "setup.py"]
+    if suffix != "":
+        command.extend(['egg_info', '--tag-build', suffix])
     if package_format in ['sdist', 'both']:
         command.append("sdist")
     if package_format in ['wheel', 'both']:

Review comment:
       No no. We need `egg_info --tag-build x`  and then either one or both of (bdist_wheel, sdist). 
   The egg_info is really pre-requisite for both..
   
   BUT I did found another issue with SVN rename while checking (it was only working when `--package-format both` was specified). Fixed 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.

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



[GitHub] [airflow] potiuk commented on pull request #13021: Switching to standard --tag-build flag in setuptools in providers

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #13021:
URL: https://github.com/apache/airflow/pull/13021#issuecomment-743351441


   ![Screenshot from 2020-12-11 19-23-26](https://user-images.githubusercontent.com/595491/101940162-5df84280-3be6-11eb-985d-5825461a1da6.png)
   


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

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



[GitHub] [airflow] potiuk commented on a change in pull request #13021: Switching to standard --tag-build flag in setuptools in providers

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #13021:
URL: https://github.com/apache/airflow/pull/13021#discussion_r541159286



##########
File path: dev/provider_packages/prepare_provider_packages.py
##########
@@ -1598,7 +1598,9 @@ def copy_readme_and_changelog(provider_package_id: str, backport_packages: bool)
     package_format = os.environ.get("PACKAGE_FORMAT", "wheel")
     print(f"Building backport package: {_provider_package} in format ${package_format}")
     copy_readme_and_changelog(_provider_package, BACKPORT_PACKAGES)
-    command = ["python3", "setup.py", "--version-suffix-for-pypi", suffix]
+    command = ["python3", "setup.py"]
+    if suffix != "":
+        command.extend(['egg_info', '--tag-build', suffix])
     if package_format in ['sdist', 'both']:
         command.append("sdist")
     if package_format in ['wheel', 'both']:

Review comment:
       Yeah. That was intentional. I want `bdist_wheel` to be the default format which can be overridden by the `--package-format` flag. Anything wrong here?




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

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



[GitHub] [airflow] kaxil commented on a change in pull request #13021: Switching to standard --tag-build flag in setuptools in providers

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #13021:
URL: https://github.com/apache/airflow/pull/13021#discussion_r541131810



##########
File path: scripts/in_container/_in_container_utils.sh
##########
@@ -394,9 +394,9 @@ function verify_suffix_versions_for_package_preparation() {
 
     if [[ ${VERSION_SUFFIX_FOR_SVN} =~ ^rc ]]; then
         echo
-        echo "${COLOR_RED_ERROR} The version suffix for SVN is used only for file names in RC version  ${COLOR_RESET}"
+        echo "${COLOR_YELLOW_WARNING} The version suffix for SVN is used only for file names not for versions in RC version in SVN${COLOR_RESET}"

Review comment:
       This line is a bit unclear, especially "used only for file names not for versions in RC version in SVN"




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

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