Skip to content

Commit

Permalink
stable-rc: fix BOOT TESTS section
Browse files Browse the repository at this point in the history
Fix the below error while displaying boot failures
when related build architecture information not found:
```
File "/workspace/kcidb/templates/stable_rc_test.j2", line 22, in template
    {% for architecture, tests in boot_tests|groupby("build.architecture") %}
  File "/layers/google.python.pip/pip/lib/python3.9/site-packages/jinja2/async_utils.py", line 45, in wrapper
    return normal_func(*args, **kwargs)
  File "/layers/google.python.pip/pip/lib/python3.9/site-packages/jinja2/filters.py", line 1261, in sync_do_groupby
    for key, values in groupby(sorted(value, key=expr), expr)
TypeError: '<' not supported between instances of 'str' and 'NoneType
```

Signed-off-by: Jeny Sadadia <[email protected]>
  • Loading branch information
Jeny Sadadia authored and spbnick committed Aug 8, 2024
1 parent 9cba1ee commit 7c53b8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kcidb/templates/stable_rc_test.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
{% if failed_boot_tests %}
{{- "\n Failures" }}
{% for origin, boot_tests in failed_boot_tests|groupby("origin") %}
{% set boot_tests_info = boot_tests | selectattr('environment_misc.platform', 'defined') | list %}
{% set boot_tests_info = boot_tests | selectattr('environment_misc.platform', 'defined') |
selectattr('build.architecture', 'ne', None) | list %}
{% if boot_tests_info %}
{% for architecture, tests in boot_tests_info|groupby("build.architecture") %}
{{- " " + architecture }}:({{ tests|map(attribute="build.config_name") | unique | join("") }})
Expand Down

0 comments on commit 7c53b8b

Please sign in to comment.