Skip to content

[reports] Raise an exception if a generator fail during execution#1436

Merged
mickmis merged 1 commit intointeruss:mainfrom
Orbitalize:fix_1434
Apr 23, 2026
Merged

[reports] Raise an exception if a generator fail during execution#1436
mickmis merged 1 commit intointeruss:mainfrom
Orbitalize:fix_1434

Conversation

@the-glu
Copy link
Copy Markdown
Contributor

@the-glu the-glu commented Apr 22, 2026

Follows #1435 , to have reports working.

Contrib and close #1434 by checking process exit code of generator to ensure errors are not hidden.

Tested locally with a typo:

2026-04-22 17:44:13.828 | INFO     | monitoring.uss_qualifier.reports.artifacts:make_globally_expanded_report:134 - Wrote globally-expanded report in 0.0s
Process Process-4:
Traceback (most recent call last):
  File "/root/.local/share/uv/python/cpython-3.13.5-linux-x86_64-gnu/lib/python3.13/multiprocessing/process.py", line 313, in _bootstrap
    self.run()
    ~~~~~~~~^^
  File "/root/.local/share/uv/python/cpython-3.13.5-linux-x86_64-gnu/lib/python3.13/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/monitoring/uss_qualifier/reports/artifacts.py", line 103, in make_tested_requirements
    generate_tested_requirements(redacted_report, tested_reqs_config, path)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/monitoring/uss_qualifier/reports/tested_requirements/generate.py", line 137, in generate_tested_requirements
    template.render(
    ~~~~~~~~~~~~~~~^
        participant_id=participant_id,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<9 lines>...
        anchor_name_of=_anchor_name_of,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/venv/lib/python3.13/site-packages/jinja2/environment.py", line 1295, in render
    self.environment.handle_exception()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/venv/lib/python3.13/site-packages/jinja2/environment.py", line 942, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/app/monitoring/uss_qualifier/reports/templates/tested_requirements/participant_tested_requirements.html", line 148, in top-level template code
    {% if check.passses + check.failures > 1 %}
    ^^^
jinja2.exceptions.UndefinedError: 'monitoring.uss_qualifier.reports.tested_requirements.data_types.TestedCheck object' has no attribute 'passses'
2026-04-22 17:44:13.894 | INFO     | monitoring.uss_qualifier.reports.artifacts:make_sequence_view:118 - Wrote sequence view in 0.1s
Traceback (most recent call last):
  File "/app/monitoring/uss_qualifier/main.py", line 331, in <module>
    sys.exit(main())
             ~~~~^^
  File "/app/monitoring/uss_qualifier/main.py", line 311, in main
    exit_code = run_config(
        config_name,
    ...<6 lines>...
        scenarios_filter,
    )
  File "/app/monitoring/uss_qualifier/main.py", line 267, in run_config
    generate_artifacts(report, config.artifacts, output_path, disallow_unredacted)
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/monitoring/uss_qualifier/reports/artifacts.py", line 162, in generate_artifacts
    raise RuntimeError(f"{len(failed)} generator(s) failed. Check exception above.")
RuntimeError: 1 generator(s) failed. Check exception above.

Copy link
Copy Markdown
Contributor

@mickmis mickmis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed a802023
LGTM

@mickmis mickmis merged commit 285c0f3 into interuss:main Apr 23, 2026
22 checks passed
@mickmis mickmis deleted the fix_1434 branch April 23, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hidden issue in CI with 'successes' left over in jinja templates

2 participants