Skip to content

Invalid JSON files in IPF_ETC/workflows/glue2 will cause ipfinfo step to fail #11

@ericblau

Description

@ericblau

The ipfinfo step needs to have better error handling; currently if there is an unparsable json file in the workflows directories, it causes the step to fail, which will cause the workflow to fail.

Example where a zero-length .json file is in the directory:

Process IPFWorkflowsStep-121:
Traceback (most recent call last):
File "/usr/lib64/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/site-packages/ipf/ipfinfo.py", line 185, in run
self._output(IPFWorkflows(ipf_version, self._run()))
File "/usr/lib/python3.6/site-packages/ipf/ipfinfo.py", line 204, in _run
d = json.load(json_data)
File "/usr/lib64/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions