Fix KeyError accessing config. #620

Merged
telackey merged 1 commits from telackey/cfgkeyerr into main 2023-10-31 17:29:20 +00:00
Member

Fixes:

laconic-so --stack act-runner deploy init --output act-runner.yml --config CERC_GITEA_RUNNER_REGISTRATION_TOKEN=FOO
Traceback (most recent call last):
  File "/home/telackey/cerc/stack-orchestrator/venv/bin/laconic-so", line 33, in <module>
    sys.exit(load_entry_point('laconic-stack-orchestrator', 'console_scripts', 'laconic-so')())
  File "/home/telackey/cerc/stack-orchestrator/venv/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/telackey/cerc/stack-orchestrator/venv/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/telackey/cerc/stack-orchestrator/venv/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/telackey/cerc/stack-orchestrator/venv/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/telackey/cerc/stack-orchestrator/venv/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/telackey/cerc/stack-orchestrator/venv/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/telackey/cerc/stack-orchestrator/venv/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/telackey/cerc/stack-orchestrator/app/deploy/deployment_create.py", line 264, in init
    orig_config = spec_file_content["config"]
KeyError: 'config'
Fixes: ``` laconic-so --stack act-runner deploy init --output act-runner.yml --config CERC_GITEA_RUNNER_REGISTRATION_TOKEN=FOO Traceback (most recent call last): File "/home/telackey/cerc/stack-orchestrator/venv/bin/laconic-so", line 33, in <module> sys.exit(load_entry_point('laconic-stack-orchestrator', 'console_scripts', 'laconic-so')()) File "/home/telackey/cerc/stack-orchestrator/venv/lib/python3.10/site-packages/click/core.py", line 1157, in __call__ return self.main(*args, **kwargs) File "/home/telackey/cerc/stack-orchestrator/venv/lib/python3.10/site-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) File "/home/telackey/cerc/stack-orchestrator/venv/lib/python3.10/site-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/telackey/cerc/stack-orchestrator/venv/lib/python3.10/site-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/telackey/cerc/stack-orchestrator/venv/lib/python3.10/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/telackey/cerc/stack-orchestrator/venv/lib/python3.10/site-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs) File "/home/telackey/cerc/stack-orchestrator/venv/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func return f(get_current_context(), *args, **kwargs) File "/home/telackey/cerc/stack-orchestrator/app/deploy/deployment_create.py", line 264, in init orig_config = spec_file_content["config"] KeyError: 'config' ```
dboreham approved these changes 2023-10-30 21:27:05 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/stack-orchestrator#620
No description provided.