Page MenuHomePhabricator

toolforge command fails for quickstatements tool
Closed, DuplicatePublicBUG REPORT

Description

Running as the quickstatements tool, any invocation of toolforge jobs or toolforge-jobs fails:

tools.quickstatements@tools-sgebastion-10:~/rust/quickstatements_rs$ toolforge jobs list
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/tjf_cli/cli.py", line 691, in main
    kubeconfig = Kubeconfig.load()
  File "/usr/lib/python3/dist-packages/toolforge_weld/kubernetes_config.py", line 62, in load
    return cls.from_path(path=path)
  File "/usr/lib/python3/dist-packages/toolforge_weld/kubernetes_config.py", line 38, in from_path
    data = yaml.safe_load(path.read_text())
  File "/usr/lib/python3/dist-packages/yaml/__init__.py", line 94, in safe_load
    return load(stream, SafeLoader)
  File "/usr/lib/python3/dist-packages/yaml/__init__.py", line 72, in load
    return loader.get_single_data()
  File "/usr/lib/python3/dist-packages/yaml/constructor.py", line 35, in get_single_data
    node = self.get_single_node()
  File "/usr/lib/python3/dist-packages/yaml/composer.py", line 36, in get_single_node
    document = self.compose_document()
  File "/usr/lib/python3/dist-packages/yaml/composer.py", line 55, in compose_document
    node = self.compose_node(None, None)
  File "/usr/lib/python3/dist-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/lib/python3/dist-packages/yaml/composer.py", line 127, in compose_mapping_node
    while not self.check_event(MappingEndEvent):
  File "/usr/lib/python3/dist-packages/yaml/parser.py", line 98, in check_event
    self.current_event = self.state()
  File "/usr/lib/python3/dist-packages/yaml/parser.py", line 439, in parse_block_mapping_key
    "expected <block end>, but found %r" % token.id, token.start_mark)
yaml.parser.ParserError: while parsing a block mapping
  in "<unicode string>", line 1, column 1:
    apiVersion: v1
    ^
expected <block end>, but found ':'
  in "<unicode string>", line 32, column 1:
    : /data/project/quickstatements/ ...
    ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/toolforge-jobs", line 11, in <module>
    load_entry_point('toolforge-jobs-framework-cli==8', 'console_scripts', 'toolforge-jobs')()
  File "/usr/lib/python3/dist-packages/tjf_cli/cli.py", line 700, in main
    raise TjfCliConfigLoadError(f"Failed to read config file '{args.cfg}'") from e
tjf_cli.api.TjfCliConfigLoadError: Failed to read config file '/etc/toolforge-jobs-framework-cli.cfg'