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

jsonchecker: retry on EOF/UnexpectedEOF in unmarshaller #587

Merged
merged 1 commit into from
Dec 12, 2022

Conversation

willfindlay
Copy link
Contributor

I ran into a corner case in CI a few times where it seems that the exporter is in the middle of writing an event when the jsonchecker decides to open the file and check it. In this case, the unmarshaller will bubble up either an EOF or UnexpectedEOF error which will fail the test. To handle this, let's just treat these errors the same way we treat regular JSON EOF: by retrying after a few seconds.

Signed-off-by: William Findlay [email protected]

I ran into a corner case in CI a few times where it seems that the exporter is in the
middle of writing an event when the jsonchecker decides to open the file and check it. In
this case, the unmarshaller will bubble up either an EOF or UnexpectedEOF error which will
fail the test. To handle this, let's just treat these errors the same way we treat regular
JSON EOF: by retrying after a few seconds.

Signed-off-by: William Findlay <[email protected]>
@willfindlay willfindlay requested a review from a team as a code owner December 9, 2022 20:07
@kkourt kkourt merged commit 56e424a into main Dec 12, 2022
@kkourt kkourt deleted the pr/willfindlay/unexpected-eof branch December 12, 2022 13: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.

4 participants