Lilypad-Tech / lilypad-modicum

This is the deprecated Lilypad v1. See https://github.com/bacalhau-project/lilypad for v2. Previous FEVM-Bacalhau bridge (v0): https://github.com/bacalhau-project/lilypad-v0
GNU General Public License v3.0
12 stars 8 forks source link

resource-provider sometimes crashes with KeyError on startup #62

Open lukemarsden opened 1 year ago

lukemarsden commented 1 year ago
2023-07-19 08:40:40,416;ResourceProvider;Matched offerId= 1
Exception in thread Thread-1 (platformListener):
Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/app/modicum/ResourceProvider.py", line 248, in platformListener
    self.logger.info("Job offer %s = %s" % (name, self.job_offers[joid].ijoid))
KeyError: 2

seems to be because of stray offers in the contract that we don't have in memory, which is understandable after a restart, probably just ignore them