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 maintenance of internal state related to snapshot submissions #113

Open
anomit opened this issue Feb 4, 2025 · 1 comment
Open

Fix maintenance of internal state related to snapshot submissions #113

anomit opened this issue Feb 4, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@anomit
Copy link
Member

anomit commented Feb 4, 2025

Describe the bug

While debugging the Telegram bot alerts on malfunctioning nodes, it was discovered that the internal state is not being correctly maintained in the snapshotter node regarding submissions which were in turn shared in the Telegram alert messages. The values against each of these 3 fields are being reported as 0.

class SnapshotterStatus(BaseModel):
totalSuccessfulSubmissions: int = 0
totalIncorrectSubmissions: int = 0
totalMissedSubmissions: int = 0
consecutiveMissedSubmissions: int = 0
projects: List[ProjectStatus]

To Reproduce

Affected versions:

Steps to reproduce the behavior:

  1. Let snapshots fail by blocking RPC calls or supplying bad RPC URLs etc
  2. Configure the Telgram Chat ID in env
  3. Check Telegram messages sent by bot

Expected behavior

The fields in the data model linked above should be set correctly regarding total, missed, incorrect and other categories of submission data.

The telgram alert data model for the same:

class TelegramSnapshotterReportMessage(TelegramMessage):
issue: SnapshotterIssue
status: SnapshotterStatus

Proposed Solution
NA

Caveats
NA

Additional context
NA

@anomit anomit added the bug Something isn't working label Feb 4, 2025
@anomit anomit mentioned this issue Feb 5, 2025
3 tasks
@Seth-Schmidt
Copy link
Contributor

Seth-Schmidt commented Feb 14, 2025

The fix has been implemented on this issue branch: https://github.com/PowerLoom/snapshotter-lite-v2/tree/113-fix-maintenance-of-internal-state-related-to-snapshot-submissions

It changes the missed snapshot tracking pattern by bubbling up exceptions and catching a failed snapshot process at the top level instead of tracking individual exceptions as they pop up. Will need to test a bit to ensure that all exceptions are now being handled correctly.

E: The preloader failures were also not being tracked properly which is likely the cause of the fields being reported as 0. Most failures due to RPC issues will fail at the preloader level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants