Taragolis commented on code in PR #37845:
URL: https://github.com/apache/airflow/pull/37845#discussion_r1509939945


##########
scripts/docker/common.sh:
##########
@@ -95,6 +95,18 @@ function common::get_constraints_location() {
         python_version="$(python --version 2>/dev/stdout | cut -d " " -f 2 | 
cut -d "." -f 1-2)"
         
AIRFLOW_CONSTRAINTS_LOCATION="${constraints_base}/${AIRFLOW_CONSTRAINTS_MODE}-${python_version}.txt"
     fi
+
+    if [[ ${AIRFLOW_CONSTRAINTS_LOCATION} =~ http.* ]]; then
+        echo
+        echo "${COLOR_BLUE}Downloading constraints from 
${AIRFLOW_CONSTRAINTS_LOCATION} to ${HOME}/constraints.txt ${COLOR_RESET}"
+        echo
+        curl -o "${HOME}/constraints.txt" "${AIRFLOW_CONSTRAINTS_LOCATION}" 
>/dev/null

Review Comment:
   `-sSf` ???
   
   -S will show an error, e.g.
   
   ```console
   ❯ curl -sSf 
https2://raw.githubusercontent.com/apache/airflow/constraints-main/constraints-source-providers-3.9.txt
   curl: (1) Protocol "https2" not supported or disabled in libcurl
   ❯ curl -sSf 
https://raw.githubusercontent.com/apache/airflow/constraints-main/constraints-source-providers-3.13.txt
   curl: (22) The requested URL returned error: 404
   ```
   
   ```console
   ❯ curl -sf 
https://raw.githubusercontent.com/apache/airflow/constraints-main/constraints-source-providers-3.13.txt
   ❯ curl -sf 
https2://raw.githubusercontent.com/apache/airflow/constraints-main/constraints-source-providers-3.9.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