pierrejeambrun commented on code in PR #30030:
URL: https://github.com/apache/airflow/pull/30030#discussion_r1134580059


##########
dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:
##########
@@ -190,16 +190,16 @@ def prepare_pypi_packages(version, version_suffix, 
repo_root):
         console_print("PyPI packages prepared")
 
 
-def push_packages_to_test_pypi():
+def push_packages_to_test_pypi(version):
     if confirm_action("Do you want to push packages to test PyPI?"):
         run_command(["twine", "upload", "-r", "pypitest", "dist/*"], 
dry_run_override=DRY_RUN, check=True)
         console_print("Packages pushed to test PyPI")
         console_print(
             "Verify that the test package looks good by downloading it and 
installing it into a virtual "
             "environment. The package download link is available at: "
-            "https://test.pypi.org/project/apache-airflow/#files";
-            "Install it with the appropriate constraint file, for instance: "
-            "pip install <download_link> --constraint 
https://raw.githubusercontent.com/apache/airflow/constraints-2.2.1rc1/constraints-3.8.txt";
  # noqa: 501
+            "https://test.pypi.org/project/apache-airflow/#files "
+            "Install it with the appropriate constraint file, adapt python 
version: "
+            f"pip install https://test.pypi.org/simple/ 
apache-airflow=={version} --constraint 
https://raw.githubusercontent.com/apache/airflow/constraints-{version}/constraints-3.8.txt";
  # noqa: 501

Review Comment:
   I think I have the answer @ephraimbuddy.
   
   I believe this had something to do with what @potiuk mentionned before. When 
installing only from `test.pypi.org` some packages might not be found because 
they do not exist on that test index. (I had trouble to reproduce because once 
those packages are cached by a successful install, they will be used and the 
index will not be used. Starting from a fresh env and purging cache highlights 
the issue).
   
   For instance in this case 
[rfc3339-validator==0.1.4](https://test.pypi.org/project/rfc6920/#history) does 
not exist on test index.
   
   I will update the PR to use the default index as a fallback (it doesn't work 
exactly as a fallback but that's the idea):
   ```
   pip install -i https://test.pypi.org/simple/ --extra-index-url 
https://pypi.org/simple/ apache-airflow==2.5.2rc2 --constraint 
https://raw.githubusercontent.com/apache/airflow/constraints-2.5.2rc2/constraints-3.8.txt
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to