Commit 4b527494 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Improved exception handling to recover from rare unexpected errors.

parent e5c345db
Pipeline #44894 canceled with stages
in 5 minutes and 23 seconds
......@@ -588,6 +588,7 @@ class NomadCOEMigration:
package_report = self.migrate_package(package, local=local, delete_local=delete_local)
except Exception as e:
package_report = Report()
'unexpected exception while migrating packages', exc_info=e)
......@@ -805,8 +806,12 @@ class NomadCOEMigration:
report.migrated_calcs += 1
calc_logger = logger.bind(calc_id=calc['calc_id'], mainfile=calc['mainfile'])
if not self._validate(calc, source_calc_with_metadata, calc_logger):
report.calcs_with_diffs += 1
except Exception as e:
logger.warning('unexpected exception during validation', exc_info=e)
report.calcs_with_diffs += 1
else:'processed a calc that has no source')
report.new_calcs += 1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment