Closed goern closed 2 years ago
From the log of the wait
containers in those pods and the annotations it looks like this messages_to_be_sent.json
is the output of that pod.
Together with the fact that the number of messages to be sent is 0 maybe the process tried to reread the file it writes, and fail when it did not write it because there was no messages ?
I'll take a look.
Hum, it's not as bad as it looks. We just log it wrong :
# Store message to file that need to be sent.
try:
with open(MSG_OUT_FILE, "r") as json_file:
if os.stat(MSG_OUT_FILE).st_size != 0:
all_messages: list = json.load(json_file)
if type(all_messages) != list:
raise TypeError(f"Message file must be a list of messages. Got type {type(all_messages)}")
all_messages = all_messages + output_messages
except Exception as e:
_LOGGER.exception(e)
all_messages = output_messages
_LOGGER.exception
is _LOGGER.error
with extra stuff. This should probably be more specific and not and error.
Bug description
Steps to Reproduce
Steps to reproduce the behavior:
Actual behavior
n/a
Expected behavior
n/a
Additional context
n/a
/kind bug /priority critical-urgent /assign @KPostOffice /assign @VannTen