Skip to content

fix(ci): don't fail deps-bump discover when the branch list is empty#515

Merged
ericfitz merged 1 commit into
mainfrom
fix/deps-bump-discover-empty-list
Jul 3, 2026
Merged

fix(ci): don't fail deps-bump discover when the branch list is empty#515
ericfitz merged 1 commit into
mainfrom
fix/deps-bump-discover-empty-list

Conversation

@ericfitz

@ericfitz ericfitz commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Problem

The daily Dependency Bump (Claude) schedule fails in the discover job whenever there are no open Dependabot alerts — the common case (e.g. run 28594307464).

It's a false failure: the job correctly decides there's nothing to do (No open Dependabot alerts — nothing to do.), sets LIST="", then builds the branch array with:

BRANCHES="$(printf '%s\n' "$LIST" | grep -v '^$' | jq -R . | jq -cs .)"

With LIST empty, grep -v '^$' matches no lines and exits 1. Under set -euo pipefail (+ bash -e), that non-zero aborts the step, so the intended no-op run goes red. (bump still skips correctly — only the red X is wrong.)

Fix

Drop grep and filter empty lines in jq instead, so no step depends on grep's exit-1-on-no-match:

BRANCHES="$(printf '%s\n' "$LIST" | jq -R . | jq -cs 'map(select(length > 0))')"

Empty LIST[] (bump skips, run green); non-empty lists are unchanged.

Harmonization

This is the identical line already used in the sibling tmi-ux repo's deps-bump.yml, which fixed the same bug. After this change the two repos' discover scripts are byte-for-byte identical again.

🤖 Generated with Claude Code

On the daily schedule with no open Dependabot alerts, LIST is empty and
`grep -v '^$'` matched no lines, exiting 1. Under `set -euo pipefail` that
aborted the discover step, turning the intended no-op run red (run
28594307464). Drop grep and filter empties in jq instead, matching the
fix already in the tmi-ux repo so both workflows stay harmonized.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kk9GxWS9EpazjbwBKfMpUX
@ericfitz ericfitz merged commit 80b71ca into main Jul 3, 2026
12 checks passed
@ericfitz ericfitz deleted the fix/deps-bump-discover-empty-list branch July 3, 2026 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant