Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(helper.py): Handle better exception in kbuild #2747

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

nuclearcat
Copy link
Member

Observed error with pod crash:

11/27/2024 10:24:52 PM UTC [ERROR] Traceback (most recent call last):
  File "/home/kernelci/pipeline/src/base.py", line 69, in run
    status = self._run(context)
             ^^^^^^^^^^^^^^^^^^
  File "/home/kernelci/pipeline/./src/scheduler.py", line 296, in _run
    self._run_job(job, runtime, platform, input_node)
  File "/home/kernelci/pipeline/./src/scheduler.py", line 80, in _run_job
    node = self._api_helper.create_job_node(job_config, input_node,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/kernelci/api/helper.py", line 456, in create_job_node
    job_node['data'] = platform.format_params(job_node['data'], extra_args)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/kernelci/config/base.py", line 167, in format_params
    return _format_dict_strings(param, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/kernelci/config/base.py", line 79, in _format_dict_strings
    param[key] = _format_dict_strings(param[key], fmap)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/kernelci/config/base.py", line 79, in _format_dict_strings
    param[key] = _format_dict_strings(param[key], fmap)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/kernelci/config/base.py", line 74, in _format_dict_strings
    param = param.format_map(fmap)
            ^^^^^^^^^^^^^^^^^^^^^^
ValueError: unmatched '{' in format spec

We can handle it without crash.

Observed error with pod crash:
```
11/27/2024 10:24:52 PM UTC [ERROR] Traceback (most recent call last):
  File "/home/kernelci/pipeline/src/base.py", line 69, in run
    status = self._run(context)
             ^^^^^^^^^^^^^^^^^^
  File "/home/kernelci/pipeline/./src/scheduler.py", line 296, in _run
    self._run_job(job, runtime, platform, input_node)
  File "/home/kernelci/pipeline/./src/scheduler.py", line 80, in _run_job
    node = self._api_helper.create_job_node(job_config, input_node,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/kernelci/api/helper.py", line 456, in create_job_node
    job_node['data'] = platform.format_params(job_node['data'], extra_args)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/kernelci/config/base.py", line 167, in format_params
    return _format_dict_strings(param, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/kernelci/config/base.py", line 79, in _format_dict_strings
    param[key] = _format_dict_strings(param[key], fmap)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/kernelci/config/base.py", line 79, in _format_dict_strings
    param[key] = _format_dict_strings(param[key], fmap)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/kernelci/config/base.py", line 74, in _format_dict_strings
    param = param.format_map(fmap)
            ^^^^^^^^^^^^^^^^^^^^^^
ValueError: unmatched '{' in format spec
```
We can handle it without crash.

Signed-off-by: Denys Fedoryshchenko <[email protected]>
@nuclearcat nuclearcat added this pull request to the merge queue Dec 3, 2024
Merged via the queue into kernelci:main with commit 2b361a8 Dec 3, 2024
2 of 4 checks passed
@nuclearcat nuclearcat deleted the fix-crash-1 branch December 3, 2024 08:16
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.

1 participant