Skip to content

Fix kernelci.toml generation for local deployment #225

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tollsimy
Copy link
Contributor

@tollsimy tollsimy commented Apr 8, 2025

This PR fixes the generation of the kernelci.toml for kernelci-core for local deployment:

Traceback (most recent call last):
  File "/var/home/tollsimy/lfx-mentorship/kernelCI/kernelci-deploy/localinstall/kernelci/kernelci-core/./kci", line 35, in <module>
    main()
  File "/var/home/tollsimy/lfx-mentorship/kernelCI/kernelci-deploy/localinstall/kernelci/kernelci-core/./kci", line 31, in main
    kci()  # pylint: disable=no-value-for-parameter
    ^^^^^
  File "/var/home/tollsimy/lfx-mentorship/kernelCI/kernelci-deploy/localinstall/env/lib64/python3.12/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/home/tollsimy/lfx-mentorship/kernelCI/kernelci-deploy/localinstall/env/lib64/python3.12/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/var/home/tollsimy/lfx-mentorship/kernelCI/kernelci-deploy/localinstall/env/lib64/python3.12/site-packages/click/core.py", line 1654, in invoke
    super().invoke(ctx)
  File "/var/home/tollsimy/lfx-mentorship/kernelCI/kernelci-deploy/localinstall/env/lib64/python3.12/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/home/tollsimy/lfx-mentorship/kernelCI/kernelci-deploy/localinstall/env/lib64/python3.12/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/home/tollsimy/lfx-mentorship/kernelCI/kernelci-deploy/localinstall/env/lib64/python3.12/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/home/tollsimy/lfx-mentorship/kernelCI/kernelci-deploy/localinstall/kernelci/kernelci-core/kernelci/cli/__init__.py", line 184, in kci
    ctx.obj = CommandSettings(settings)
              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/home/tollsimy/lfx-mentorship/kernelCI/kernelci-deploy/localinstall/kernelci/kernelci-core/kernelci/cli/__init__.py", line 101, in __init__
    self._settings = kernelci.settings.Settings(settings_path)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/home/tollsimy/lfx-mentorship/kernelCI/kernelci-deploy/localinstall/kernelci/kernelci-core/kernelci/settings.py", line 48, in __init__
    self._settings = toml.load(path) if path else {}
                     ^^^^^^^^^^^^^^^
  File "/var/home/tollsimy/lfx-mentorship/kernelCI/kernelci-deploy/localinstall/env/lib64/python3.12/site-packages/toml/decoder.py", line 134, in load
    return loads(ffile.read(), _dict, decoder)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/home/tollsimy/lfx-mentorship/kernelCI/kernelci-deploy/localinstall/env/lib64/python3.12/site-packages/toml/decoder.py", line 340, in loads
    raise TomlDecodeError("Unbalanced quotes", original, i)
toml.decoder.TomlDecodeError: Unbalanced quotes (line 11 column 216 char 344)

since the generated kernelci.toml is actually generated as follows:

[DEFAULT]
api = "docker-host"
indent = 4

[kci]
api = "docker-host"
storage = "personal"
config = ["config/core"]

[kci.secrets]
api."docker-host".token = "token
" 

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