Repository navigation
Conversation
Lightning's upcoming API error refactor (OpenFn/lightning#5239) sends the 504 timeout reply as a problem document with code: "timeout" instead of error: "timeout". Check the status, the work order id and the timeout code in either field, and stop asserting the human-readable text.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lightning's upcoming API error refactor, OpenFn/lightning#5239, changes the 504 reply on a sync webhook timeout.
Lightning used to send
{error: "timeout", message: "...", work_order_id}and will now send a problem document:{type, status, title, code: "timeout", detail: "The workflow did not finish in time.", work_order_id}.As far as I can tell the worker/kit doesn't use this endpoint and/or doesn't depend on the response body.
I've changed the timeout test in
tests/lightning-worker/sync-webhook.spec.tsto only check that the status is 504, and thatwork_order_idis the run's id, and that the timeout code is"timeout"in eithercodeorerror. It no longer checks the human-readable message. The header comment describes both shapes. No other test changed.I ran the spec file locally against both Lightning refs, with
WORKER=latest:a3d16403d0):Test Files 1 passed (1),Tests 10 passed (10)6335ecfb95):Test Files 1 passed (1),Tests 10 passed (10)Lightning's workflow uses
@v1, so once this merges we need to update that it before OpenFn/lightning#5239 is merged.