MatrixAI / Polykey

Polykey Core Library
https://polykey.com
GNU General Public License v3.0
31 stars 4 forks source link

Fix undefined behaviour for `GestaltId` when starting agent #840

Closed aryanjassal closed 1 week ago

aryanjassal commented 1 week ago

Description

When starting the agent after approximately 1 hour, an error is thrown like such:

WARN:polykey.PolykeyAgent.task v0ppdq4uibpo01417n072jft4io:Failed - Reason: ErrorUtilsUndefinedBehaviour("failed to decode vertex GestaltId "undefined"")

This is caused due to a minor typo in the discovery domain. This has been resolved in this PR, and similar messages should no longer happen.

Issues Fixed

Tasks

Final checklist

linear[bot] commented 1 week ago

ENG-400 Fix undefined behaviour error message coming from background tasks

aryanjassal commented 1 week ago

This PR depends on https://github.com/MatrixAI/Polykey/pull/838.

After that PR has been merged, this can be too.

CMCDragonkai commented 1 week ago

That's great how can we prevent regressions of this nature in the future? Types or fast check tests?

aryanjassal commented 1 week ago

That's great how can we prevent regressions of this nature in the future? Types or fast check tests?

https://github.com/MatrixAI/Polykey/issues/797#issuecomment-2467292822

aryanjassal commented 1 week ago

I ran manual sanity checks for this change by printing the status of the actual task in TaskManager.startTask() and by setting the time interval to 1 second so it will trigger continuously. That resulted in zero errors and the rediscovery triggering each second.

This means that the changes made was successful in fixing this issue.

aryanjassal commented 1 week ago

Now that the CI is passing and the changes are approved, I will be merging this and making a release.