Skip to content

Enhance OCL job resilience with comprehensive failure handling#166

Merged
grahamegrieve merged 3 commits intomainfrom
feature/ocl
Mar 12, 2026
Merged

Enhance OCL job resilience with comprehensive failure handling#166
grahamegrieve merged 3 commits intomainfrom
feature/ocl

Conversation

@italomacedo
Copy link
Collaborator

This pull request adds a new test suite for the OCL background job queue, focusing on its resilience to various API failure scenarios, and strengthens the code to better handle malformed API responses. The most important changes are grouped below:

Testing OCL Background Job Resilience:

  • Added a comprehensive test suite (ocl-background-resilience.test.js) that simulates various OCL API failure scenarios (connection refused, timeouts, repeated HTTP 500 errors, malformed payloads, and sequential failures) to ensure that the OCLBackgroundJobQueue handles these failures gracefully and does not get blocked.

Robustness Improvements:

  • Enhanced the #fetchAllPages method in OCLCodeSystemProvider to explicitly check that API responses are objects or arrays, throwing an error if the response format is invalid. This prevents malformed payloads from being silently accepted.

…xx, hang, malformed payload) are handled safely; jobs always release resources; regression tests ensure queue recovery, no deadlock, and no unhandled rejection
Copy link
Contributor

@grahamegrieve grahamegrieve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@grahamegrieve grahamegrieve merged commit a8c9fb8 into main Mar 12, 2026
6 of 7 checks passed
@grahamegrieve grahamegrieve deleted the feature/ocl branch March 12, 2026 21:52
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.

2 participants