Aiven-Open / karapace

Karapace - Your Apache Kafka® essentials in one tool
https://karapace.io
Apache License 2.0
470 stars 71 forks source link

fix: catch all exceptions in forked process #921

Closed jjaakola-aiven closed 3 months ago

jjaakola-aiven commented 3 months ago

If base exception is raised the communication queue will block in the calling process and will cause timeouts. This is prevalent in unit test for protobuf serialization in Github Actions, caused by the protobuf compiler work directory existence. The fix is to use pathlib.Path with exists=True and parents=True for removing the FileExistsError and also changing the error handling logic to pass back also BaseExceptions through the multiprocess queue.

About this change - What it does

References: #xxxxx

Why this way

github-actions[bot] commented 3 months ago

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  karapace
  utils.py
  karapace/kafka
  common.py
  karapace/protobuf
  field_element.py
  io.py
  proto_file_element.py
  proto_normalizations.py
  schema.py
Project Total  

This report was generated by python-coverage-comment-action