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

Ticket 72 handle IMA 2 IMA net errors #83

Merged
merged 5 commits into from
Feb 8, 2024

Conversation

sergiy-skalelabs
Copy link
Contributor

@sergiy-skalelabs sergiy-skalelabs commented Feb 5, 2024

IMA uses express-based HTTP server to deliver IMA-2-IMA notifications like PWA state tracking. This PR fixes network connection problems by adding error handlers. Express-related code also ported from JS into TypeScript. No performance changes expected.
It's barely possible to cover all possible network problems with unit-tests, especially when connection problem appear after JSON request received and before answer is sent. Such errors can have guaranteed emulation only with modified source code of IMA Agent where network socket is manually damaged.


New version's testing sequence and expected result on dev net is:

  • disable Main Net connectivity on selected node
  • restart IMA Agent
  • wait 20-30 minutes
  • expect normal shutdown of IMA Agent with exit code 163
  • expect no network errors and crashes in log output all this time

Old buggy version's notes:

  • use same testing sequence
  • expect crash of IMA Agent with network timeout error and no normal call stack
  • crash normally occur in less than 5 minutes
  • crash does not change exit code to 163

@sergiy-skalelabs sergiy-skalelabs self-assigned this Feb 5, 2024
@sergiy-skalelabs sergiy-skalelabs linked an issue Feb 5, 2024 that may be closed by this pull request
@sergiy-skalelabs sergiy-skalelabs marked this pull request as ready for review February 8, 2024 11:55
@sergiy-skalelabs sergiy-skalelabs merged commit 1538b4b into develop Feb 8, 2024
19 checks passed
@sergiy-skalelabs sergiy-skalelabs deleted the ticket-72-handle-ima-2-ima-net-errors branch February 8, 2024 18:44
@github-actions github-actions bot locked and limited conversation to collaborators Feb 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IMA: Agent crash if geth node is unreachable
3 participants