Skip to content

Commit 33e9398

Browse files
justin808claude
andcommitted
Show gem versions in CI failure output instead of matrix params
Previously displayed: dummy-app-integration-tests (3.2, 20, minimum) Now displays: dummy-app-integration-tests (3.2, 20, minimum) (Ruby 3.2, Node 20, Shakapacker 8.2.0, React 18) This makes it immediately clear which gem versions are being tested, making it easier to understand test failures and replicate them locally. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 7afd66e commit 33e9398

File tree

1 file changed

+38
-7
lines changed

1 file changed

+38
-7
lines changed

bin/ci-rerun-failures

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,19 @@ fi
175175

176176
echo -e "${YELLOW}Failed CI jobs:${NC}"
177177
echo "$FAILED_CHECKS" | while read -r check; do
178-
echo -e "${RED}$check${NC}"
178+
# Try to get version info for the check
179+
version_info=""
180+
for job_name in "${!JOB_VERSION_MAP[@]}"; do
181+
if [[ "$check" == "$job_name"* ]]; then
182+
version_info=" (${JOB_VERSION_MAP[$job_name]})"
183+
break
184+
fi
185+
done
186+
echo -e "${RED}$check${version_info}${NC}"
179187
done
180188
echo ""
181189

182-
# Map CI job names to local commands
190+
# Map CI job names to local commands with version info
183191
declare -A JOB_MAP
184192
JOB_MAP["lint-js-and-ruby"]="bundle exec rubocop && yarn run eslint --report-unused-disable-directives && yarn start format.listDifferent"
185193
JOB_MAP["rspec-package-tests"]="bundle exec rake run_rspec:gem"
@@ -188,6 +196,11 @@ JOB_MAP["dummy-app-integration-tests (3.4, 22, latest)"]="bundle exec rake run_r
188196
JOB_MAP["dummy-app-integration-tests (3.2, 20, minimum)"]="bundle exec rake run_rspec:all_dummy"
189197
JOB_MAP["examples"]="bundle exec rake run_rspec:shakapacker_examples"
190198

199+
# Map CI job names to human-readable versions
200+
declare -A JOB_VERSION_MAP
201+
JOB_VERSION_MAP["dummy-app-integration-tests (3.4, 22, latest)"]="Ruby 3.4, Node 22, Shakapacker 9.3.0, React 19"
202+
JOB_VERSION_MAP["dummy-app-integration-tests (3.2, 20, minimum)"]="Ruby 3.2, Node 20, Shakapacker 8.2.0, React 18"
203+
191204
# Track what we'll run (deduplicated)
192205
declare -A COMMANDS_TO_RUN
193206

@@ -218,7 +231,16 @@ fi
218231

219232
echo -e "${BLUE}Will run the following commands:${NC}"
220233
for cmd in "${!COMMANDS_TO_RUN[@]}"; do
221-
echo -e "${BLUE}${COMMANDS_TO_RUN[$cmd]}:${NC} $cmd"
234+
job_name="${COMMANDS_TO_RUN[$cmd]}"
235+
# Try to get version info for the job
236+
version_info=""
237+
for mapped_job_name in "${!JOB_VERSION_MAP[@]}"; do
238+
if [[ "$job_name" == "$mapped_job_name"* ]]; then
239+
version_info=" (${JOB_VERSION_MAP[$mapped_job_name]})"
240+
break
241+
fi
242+
done
243+
echo -e "${BLUE}$job_name${version_info}:${NC} $cmd"
222244
done
223245
echo ""
224246

@@ -251,19 +273,28 @@ FAILED_COMMANDS=()
251273

252274
for cmd in "${!COMMANDS_TO_RUN[@]}"; do
253275
job_name="${COMMANDS_TO_RUN[$cmd]}"
254-
echo -e "${BLUE}▶ Running: $job_name${NC}"
276+
# Try to get version info for the job
277+
version_info=""
278+
for mapped_job_name in "${!JOB_VERSION_MAP[@]}"; do
279+
if [[ "$job_name" == "$mapped_job_name"* ]]; then
280+
version_info=" (${JOB_VERSION_MAP[$mapped_job_name]})"
281+
break
282+
fi
283+
done
284+
285+
echo -e "${BLUE}▶ Running: $job_name${version_info}${NC}"
255286
echo -e "${BLUE}Command: $cmd${NC}"
256287
echo ""
257288

258289
# Note: Using eval here is safe because $cmd comes from predefined JOB_MAP,
259290
# not from user input. Commands may contain shell operators like && and ||.
260291
if eval "$cmd"; then
261-
echo -e "${GREEN}$job_name passed${NC}"
292+
echo -e "${GREEN}$job_name${version_info} passed${NC}"
262293
echo ""
263294
else
264-
echo -e "${RED}$job_name failed${NC}"
295+
echo -e "${RED}$job_name${version_info} failed${NC}"
265296
echo ""
266-
FAILED_COMMANDS+=("$job_name")
297+
FAILED_COMMANDS+=("$job_name$version_info")
267298
fi
268299
done
269300

0 commit comments

Comments
 (0)