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 2026/04/18 15:51:41 UTC

(airflow) branch main updated: Fix constraints diff status handling in ci_diff_constraints script (#65456)

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

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 667e6ac0720 Fix constraints diff status handling in ci_diff_constraints script (#65456)
667e6ac0720 is described below

commit 667e6ac0720e313e5eb694933e59d2cbc5cade4d
Author: Henry Chen <he...@gmail.com>
AuthorDate: Sat Apr 18 23:51:34 2026 +0800

    Fix constraints diff status handling in ci_diff_constraints script (#65456)
---
 scripts/ci/constraints/ci_diff_constraints.sh | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/scripts/ci/constraints/ci_diff_constraints.sh b/scripts/ci/constraints/ci_diff_constraints.sh
index 348cb63b1a3..336b580b2d8 100755
--- a/scripts/ci/constraints/ci_diff_constraints.sh
+++ b/scripts/ci/constraints/ci_diff_constraints.sh
@@ -17,4 +17,17 @@
 # under the License.
 cp -v ./files/constraints-*/constraints*.txt constraints/
 cd constraints || exit 1
-git diff --color --exit-code --ignore-matching-lines="^#.*" || echo "No changes in constraints"
+
+set +e
+git diff --color --exit-code --ignore-matching-lines="^#.*"
+diff_status=$?
+set -e
+
+if [[ ${diff_status} -eq 0 ]]; then
+echo "No changes in constraints"
+elif [[ ${diff_status} -eq 1 ]]; then
+echo "Changes detected in constraints, proceeding..."
+else
+echo "Failed to diff constraints"
+exit "${diff_status}"
+fi