Skip to content

Handle CircleCI jobs without the "dependencies" property in the workflow notifier.#1408

Merged
filipsobol merged 1 commit into
masterfrom
ci/4559-handle-undefined-job-dependencies
Jun 30, 2026
Merged

Handle CircleCI jobs without the "dependencies" property in the workflow notifier.#1408
filipsobol merged 1 commit into
masterfrom
ci/4559-handle-undefined-job-dependencies

Conversation

@filipsobol

Copy link
Copy Markdown
Member

🚀 Summary

Handle CircleCI jobs without the dependencies property in the workflow notifier. The CircleCI API may return job objects without that property, which caused processJobStatuses() to throw. Such jobs are now treated as jobs with no dependencies.


📌 Related issues


💡 Additional information

The fix is a minimal optional-chaining guard (!job.dependencies?.length); the later dependency lookup is already gated behind that check. Added test coverage for jobs with a missing dependencies property.

@pomek

pomek commented Jun 30, 2026

Copy link
Copy Markdown
Member

From the issue DoD's:

Consider adding retry logic to handle CircleCI API instability

Was this considered? And if so, why did you reject implementing it?

@filipsobol

filipsobol commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

From the issue DoD's:

Consider adding retry logic to handle CircleCI API instability

Was this considered? And if so, why did you reject implementing it?

Yes, but I generally avoid adding logic for blindly retrying the code because it can mask real issues. It would be overkill here because the fix for the actual root cause was small enough, and such errors are so uncommon.

IMO, retry logic should only be added as a last resort, when the provided code is fundamentally flawed and cannot be fixed or the expense is too great to justify.

@filipsobol filipsobol merged commit ebf0585 into master Jun 30, 2026
8 checks passed
@filipsobol filipsobol deleted the ci/4559-handle-undefined-job-dependencies branch June 30, 2026 06:54
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.

3 participants