You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2022/01/22 15:49:19 UTC

[airflow] 06/33: Fix Constraints failure in PRs (#20631)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch v2-2-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit e6c13712039f31063f2d30ec3c02707005333b50
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Mon Jan 3 15:08:35 2022 +0100

    Fix Constraints failure in PRs (#20631)
    
    The #20624 broke PRs that are changing setup.py.
    
    This PR fixes it.
    
    (cherry picked from commit fd2d7d3fd817c9405feb4ff8cf696ef510b56f43)
---
 scripts/ci/constraints/ci_branch_constraints.sh | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/scripts/ci/constraints/ci_branch_constraints.sh b/scripts/ci/constraints/ci_branch_constraints.sh
index f4ace35..b8a3b27 100755
--- a/scripts/ci/constraints/ci_branch_constraints.sh
+++ b/scripts/ci/constraints/ci_branch_constraints.sh
@@ -20,13 +20,12 @@
 
 if [[ ${GITHUB_REF} == 'refs/heads/main' ]]; then
   echo "::set-output name=branch::constraints-main"
-elif [[ ${GITHUB_REF} == 'refs/heads/main' ]]; then
-  echo "::set-output name=branch::constraints-main"
 elif [[ ${GITHUB_REF} =~ refs/heads/v([0-9\-]*)\-(test|stable) ]]; then
   echo "::set-output name=branch::constraints-${BASH_REMATCH[1]}"
 else
+  # Assume PR to constraints-main here
   echo
-  echo "Unexpected ref ${GITHUB_REF}. Exiting!"
+  echo "[${COLOR_YELLOW}Assuming that the PR is to 'main' branch!${COLOR_RESET}"
   echo
-  exit 1
+  echo "::set-output name=branch::constraints-main"
 fi