Skip to content

Display dependency-failed jobs as skipped (grayed out)#142

Merged
linyows merged 1 commit intomainfrom
display-skipped-jobs-as-grayed-out
Jan 11, 2026
Merged

Display dependency-failed jobs as skipped (grayed out)#142
linyows merged 1 commit intomainfrom
display-skipped-jobs-as-grayed-out

Conversation

@linyows
Copy link
Owner

@linyows linyows commented Jan 11, 2026

Summary

Jobs that cannot run due to failed dependencies are now displayed as SKIPPED (grayed out) in the report, matching the behavior of jobs skipped by skipif conditions.

Problem

When jobs were skipped due to failed dependencies:

  • They were displayed as "Failed" (red)
  • They were counted in the failure count
  • This was inconsistent with skipif behavior, which shows jobs as grayed out

Example before:

⏺ 3rd job (Failed in 0.02s)
⏺ 4th job (Failed in 0.00s)  <- actually didn't run
⏺ 5th job (Failed in 0.00s)  <- actually didn't run
Total: ✗ 3 job(s) failed

Solution

Changed the status of dependency-failed jobs from "Skipped" (capitalized) to "skipped" (lowercase) to match the existing printer logic for skipif conditions.

Also set Success=true for these jobs so they don't count as failures.

Changes

  • workflow.go:
    • Changed jr.Status = "Skipped""skipped" (lowercase)
    • Changed jr.Success = falsetrue

Result

Example after:

⏺ 3rd job (Failed in 0.02s)
⏺ 4th job (SKIPPED)  <- grayed out, not counted as failure
⏺ 5th job (SKIPPED)  <- grayed out, not counted as failure
Total: ✗ 1 job(s) failed

This provides a clearer distinction between:

  • Jobs that actually failed during execution (counted as failures)
  • Jobs that were skipped due to failed dependencies (not counted, grayed out)

Test Plan

  • ✅ Tested with examples/needs-literal.yml (5-level dependency chain)
  • ✅ All existing tests pass
  • ✅ Linter passes (0 issues)
  • ✅ Verified grayed out display matches skipif behavior

🤖 Generated with Claude Code

Jobs that cannot run due to failed dependencies are now displayed
as SKIPPED (grayed out) in the report, similar to jobs skipped by
skipif conditions.

Changes:
- workflow.go: Changed Status from "Skipped" to "skipped" (lowercase)
  to match skipif behavior
- workflow.go: Set Success=true for skipped jobs, so they don't count
  as failures in the final report

This provides a clearer distinction between:
- Jobs that actually failed (counted as failures)
- Jobs that were skipped due to failed dependencies (not counted)

Example output:
  ⏺ 3rd job (Failed in 0.02s)
  ⏺ 4th job (SKIPPED)  <- grayed out
  ⏺ 5th job (SKIPPED)  <- grayed out
  Total: ✗ 1 job(s) failed (not 3)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions
Copy link

Code Metrics Report

main (9938fa9) #142 (d67a816) +/-
Coverage 48.5% 48.5% +0.0%
Code to Test Ratio 1:1.1 1:1.1 0.0
Test Execution Time 20s 23s +3s
Details
  |                     | main (9938fa9) | #142 (d67a816) |  +/-  |
  |---------------------|----------------|----------------|-------|
+ | Coverage            |          48.5% |          48.5% | +0.0% |
  |   Files             |             52 |             52 |     0 |
  |   Lines             |           5244 |           5244 |     0 |
+ |   Covered           |           2546 |           2547 |    +1 |
  | Code to Test Ratio  |          1:1.1 |          1:1.1 |   0.0 |
  |   Code              |          10564 |          10564 |     0 |
  |   Test              |          11955 |          11955 |     0 |
- | Test Execution Time |            20s |            23s |   +3s |

Code coverage of files in pull request scope (70.1% → 70.6%)

Files Coverage +/- Status
mail/mock_server.go 73.1% +1.0% affected
workflow.go 68.1% 0.0% modified

Reported by octocov

1 similar comment
@github-actions
Copy link

Code Metrics Report

main (9938fa9) #142 (d67a816) +/-
Coverage 48.5% 48.5% +0.0%
Code to Test Ratio 1:1.1 1:1.1 0.0
Test Execution Time 20s 23s +3s
Details
  |                     | main (9938fa9) | #142 (d67a816) |  +/-  |
  |---------------------|----------------|----------------|-------|
+ | Coverage            |          48.5% |          48.5% | +0.0% |
  |   Files             |             52 |             52 |     0 |
  |   Lines             |           5244 |           5244 |     0 |
+ |   Covered           |           2546 |           2547 |    +1 |
  | Code to Test Ratio  |          1:1.1 |          1:1.1 |   0.0 |
  |   Code              |          10564 |          10564 |     0 |
  |   Test              |          11955 |          11955 |     0 |
- | Test Execution Time |            20s |            23s |   +3s |

Code coverage of files in pull request scope (70.1% → 70.6%)

Files Coverage +/- Status
mail/mock_server.go 73.1% +1.0% affected
workflow.go 68.1% 0.0% modified

Reported by octocov

@linyows linyows merged commit a0e183f into main Jan 11, 2026
7 checks passed
@linyows linyows deleted the display-skipped-jobs-as-grayed-out branch January 11, 2026 15:07
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