You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mismatch of config.toml with git checkout and image in podman compose: pydantic_core._pydantic_core.ValidationError: 1 validation error for KaiConfig - Unable to extract tag using discriminator 'provider' [type=union_tag_not_found, input_value={'solution_detectors': 'n...'password': 'dog8code'}}, input_type=dict]
#264
Closed
jwmatthews opened this issue
Jul 29, 2024
· 1 comment
· Fixed by #353
I think the below is due to a mismatch where we are tagging images to isolate all changes, but we allow the config to be modified and used from the local checkout.
With this combination, the code running inside of the :stable image is reading the local checkout to parse the kai/config.toml and its crashing as I suspect we changed structure of kai/config.toml
Error from podman compose up
kai-1 | File "/kai/kai/server.py", line 265, in app
kai-1 | config = KaiConfig.model_validate_filepath(
kai-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
kai-1 | File "/kai/kai/models/kai_config.py", line 125, in model_validate_filepath
kai-1 | return KaiConfig.model_validate(model_dict)
kai-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
kai-1 | File "/opt/app-root/lib64/python3.12/site-packages/pydantic/main.py", line 551, in model_validate
kai-1 | return cls.__pydantic_validator__.validate_python(
kai-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
kai-1 | pydantic_core._pydantic_core.ValidationError: 1 validation error for KaiConfig
kai-1 | incident_store
kai-1 | pydantic_core._pydantic_core.ValidationError: 1 validation error for KaiConfig
kai-1 | For further information visit https://errors.pydantic.dev/2.7/v/union_tag_not_found
This problem will fade away when we bump the stable tag to match main, yet there is potential for it to reoccur as long as we allow a relationship of the container image reading local disk for kai/config.toml... in theory the config file does not change often so the problem isn't expected to occur a lot, but its a potential breakage we may want to isolate.
The text was updated successfully, but these errors were encountered:
jwmatthews
changed the title
pydantic_core._pydantic_core.ValidationError: 1 validation error for KaiConfig - pydantic_core._pydantic_core.ValidationError: 1 validation error for KaiConfig
pydantic_core._pydantic_core.ValidationError: 1 validation error for KaiConfig - Unable to extract tag using discriminator 'provider' [type=union_tag_not_found, input_value={'solution_detectors': 'n...'password': 'dog8code'}}, input_type=dict]
Jul 29, 2024
jwmatthews
changed the title
pydantic_core._pydantic_core.ValidationError: 1 validation error for KaiConfig - Unable to extract tag using discriminator 'provider' [type=union_tag_not_found, input_value={'solution_detectors': 'n...'password': 'dog8code'}}, input_type=dict]
Mismatch of config.toml with git checkout and image in podman compose: pydantic_core._pydantic_core.ValidationError: 1 validation error for KaiConfig - Unable to extract tag using discriminator 'provider' [type=union_tag_not_found, input_value={'solution_detectors': 'n...'password': 'dog8code'}}, input_type=dict]
Aug 30, 2024
The idea is that most settings will be overridden via environment variables, if the user wants/needs to make config settings, they may copy the build/config_example.toml to build/config.toml and edit what they need and this will be used and take precedence from podman compose up.
I think the below is due to a mismatch where we are tagging images to isolate all changes, but we allow the config to be modified and used from the local checkout.
So in my situation:'
-> running
podman compose up
that uses a:stable
tag pointing to: commit 65a5761d479d84c15ccf0769e2bf00ea71a4836c-> My kai checkout of 'main' is at commit 11a28d32992d9888234c2ea3a630a52733a48842
With this combination, the code running inside of the :stable image is reading the local checkout to parse the kai/config.toml and its crashing as I suspect we changed structure of kai/config.toml
Error from
podman compose up
https://gist.github.com/jwmatthews/2619140e479c4029b5e90d9639d41a68
The workaround for now is:
git checkout stable
podman compose up
This problem will fade away when we bump the stable tag to match main, yet there is potential for it to reoccur as long as we allow a relationship of the container image reading local disk for kai/config.toml... in theory the config file does not change often so the problem isn't expected to occur a lot, but its a potential breakage we may want to isolate.
The text was updated successfully, but these errors were encountered: