Repository navigation
Exit non-zero when airflowctl connections test fails - #76281
Conversation
|
Fork CI: green. CI for the latest commit passed in your fork. The pull request is ready for maintainer review. Pull requests from contributors run their CI in the contributor's own fork. GitHub Actions is free and has no minute limit on public forks, while the CI capacity of the Apache Software Foundation is shared by every ASF project and is finite. How this works: fork CI for external contributors. This comment was posted automatically by the fork CI monitor from templates drafted with an AI-assisted tool, so it may contain mistakes. An Apache Airflow maintainer, a real person, will review the pull request once its fork CI is green. Why the first pass is automated. |
The API server reports a failed connection test with HTTP 200 and "status": false in the response body. airflowctl exits 1 only on HTTP errors, so a failed test exited 0 and a script could not detect it. `airflow connections test` already exits 1 in this case.
e69bf5f to
338a9cb
Compare
Backport successfully created: airflow-ctl/v0-1-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
…t fails (#76281) (#76319) The API server reports a failed connection test with HTTP 200 and "status": false in the response body. airflowctl exits 1 only on HTTP errors, so a failed test exited 0 and a script could not detect it. `airflow connections test` already exits 1 in this case. (cherry picked from commit 3318b88) Co-authored-by: Andrew Chang <[email protected]>
…t fails (apache#76281) (apache#76319) The API server reports a failed connection test with HTTP 200 and "status": false in the response body. airflowctl exits 1 only on HTTP errors, so a failed test exited 0 and a script could not detect it. `airflow connections test` already exits 1 in this case. (cherry picked from commit 3318b88) Co-authored-by: Andrew Chang <[email protected]>
Why
airflowctl connections testsends the connection toPOST /api/v2/connections/test. If the test fails, the API server still answers with HTTP 200. The response body shows the failure with"status": false. airflowctl exits 1 only on HTTP errors. Because of this, a failed test exits 0, and a script that checks the exit code cannot see the failure.airflow connections testexits 1 in the same case.What
After airflowctl prints the result, it now exits 1 if
statusis false. The printed output does not change.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5.5) following the guidelines