Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fail on 2nd failed attempt of error deserialization #97

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

michalrus
Copy link
Member

@michalrus michalrus commented Dec 3, 2024

Related to #42.

Follow up to #93.

Context

I realized that we potentially have an infinite loop (although each iteration slept for 1 s). If a user broke the deployment so that testgen-hs became inaccessible, the request to deserialize a CBOR would never be fulfilled, not even with an error. We only returned deserialization errors from a working Haskell tool itself. Lower-level errors were only logged to our stdout.

After this change, a "repeated internal failure" is returned after the 2nd attempt to deserialize the same request fails on a lower level (e.g. because the child binary cannot be found, because someone moved it).

I recommend reviewing with hidden whitespace, its much clearer then.

Important Changes Introduced

  • None to the happy path.

  • Failure mode is better.

Related to #42.

Follow up to #93.

I realized that we potentially have an infinite loop (although each
iteration slept for 1 s). If a user broke the deployment so that
`testgen-hs` became inaccessible, the request to deserialize a CBOR
would never be fulfilled, not even with an error. We only returned
deserialization errors from a working Haskell tool itself. Lower-level
errors were only logged to our `stdout`.

After this change, a "repeated internal failure" is returned after
the *2nd* attempt to deserialize the same request fails on a lower
level (e.g. because the child binary cannot be found, because someone
moved it).
Copy link

Deploying blockfrost-platform with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1309488
Status: ✅  Deploy successful!
Preview URL: https://7d6ceea2.blockfrost-platform.pages.dev
Branch Preview URL: https://fix-fail-deser-on-retry.blockfrost-platform.pages.dev

View logs

@vladimirvolek vladimirvolek merged commit 67f29cb into main Dec 4, 2024
5 checks passed
@michalrus michalrus deleted the fix/fail-deser-on-retry branch December 4, 2024 15:10
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