Skip to content

Commit 3c33591

Browse files
Keep the issue open when the bump could not be opened
The verdict and the close both came from needs.test.result, so a green suite whose propose_bump failed filed as "passes", linked no adoption PR, and closed itself. That reads as "nothing needed adopting" — the one reading that is wrong. It is also the state every repository starts in: without "Allow GitHub Actions to create and approve pull requests" the bump job gets a 403 on the first real run. needs.propose_bump.result now feeds in. A bump that failed or was cancelled keeps the issue open and says which of the two usual causes to look at. A bump that succeeded without opening anything — already pinned, or a PR already open — still closes, because nothing is wrong in that case. Exercised all three outcomes against a stubbed gh: green closes and links the PR, a failed bump stays open with the explanation, a failed suite stays open with the ABI pointer. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 567c617 commit 3c33591

1 file changed

Lines changed: 27 additions & 5 deletions

File tree

.github/workflows/engine-release-check.yml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,24 +186,46 @@ jobs:
186186
GH_REPO: ${{ github.repository }}
187187
RESULT: ${{ needs.test.result }}
188188
BUMP_PR: ${{ needs.propose_bump.outputs.pr }}
189+
BUMP_RESULT: ${{ needs.propose_bump.result }}
189190
ENGINE_VERSION: ${{ github.event.client_payload.tag || github.event.inputs.engine_version }}
190191
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
191192
run: |
192193
set -euo pipefail
193194
194-
if [ "$RESULT" = success ]; then
195-
verdict="passes"
196-
else
195+
# A green suite whose bump could not be opened is not a green run. Closing
196+
# on needs.test.result alone would file it as "nothing to adopt" and leave
197+
# the broken automation with no signal at all.
198+
bump_broke=0
199+
if [ "$RESULT" != success ]; then
197200
verdict="FAILS"
201+
keep=1
202+
elif [ "$BUMP_RESULT" = failure ] || [ "$BUMP_RESULT" = cancelled ]; then
203+
verdict="passes, bump PR did not open"
204+
keep=1
205+
bump_broke=1
206+
else
207+
verdict="passes"
208+
keep=0
198209
fi
199210
200211
{
201-
echo "chdb-rust $verdict against chdb-core \`$ENGINE_VERSION\`."
212+
if [ "$bump_broke" = 1 ]; then
213+
echo "chdb-rust passes against chdb-core \`$ENGINE_VERSION\`, but the bump PR did not open."
214+
else
215+
echo "chdb-rust $verdict against chdb-core \`$ENGINE_VERSION\`."
216+
fi
202217
echo
203218
echo "$RUN_URL"
204219
if [ -n "$BUMP_PR" ]; then
205220
echo
206221
echo "Adopting it: $BUMP_PR"
222+
elif [ "$bump_broke" = 1 ]; then
223+
echo
224+
echo "The engine is fine; the automation is not. The pull request moving the"
225+
echo "pin could not be opened, so this issue stays open. The usual cause is"
226+
echo "this repository having \"Allow GitHub Actions to create and approve pull"
227+
echo "requests\" turned off; the other is the branch push being rejected. The"
228+
echo "pin is unchanged either way, and moving it by hand is one line."
207229
fi
208230
if [ "$RESULT" != success ]; then
209231
echo
@@ -221,6 +243,6 @@ jobs:
221243
--body-file body.md)
222244
echo "$url"
223245
224-
if [ "$RESULT" = success ]; then
246+
if [ "$keep" = 0 ]; then
225247
gh issue close "$url" --comment "Green, closing. The run is linked above."
226248
fi

0 commit comments

Comments
 (0)