Branch: refs/heads/2.2.0
Home:
https://github.com/Checkmk/checkmk
Commit: 24664d076b6dce954fa8be6dd88fcbf28ed8ccd8
https://github.com/Checkmk/checkmk/commit/24664d076b6dce954fa8be6dd88fcbf28…
Author: Lars Michelsen <lm(a)checkmk.com>
Date: 2023-12-19 (Tue, 19 Dec 2023)
Changed paths:
M cmk/gui/fields/base.py
M cmk/gui/fields/definitions.py
M cmk/gui/plugins/openapi/endpoints/host_config/response_schemas.py
Log Message:
-----------
Compute host attribute fields after application has been loaded
Previously during import time of the host_config request and response
schema modules the host attributes were needed to compute the schema for
the related endpoints.
This required all host attribute definitions to be loaded before the
import happened. This implicit dependency is error prone. It can also
not be made explicit easily since we have a few attributes which are
only available conditionally (e.g. bake_agent_package).
The idea of this change is now to perform the definition of these
attributes later, after the whole application has been loaded. This
way the import order does not matter anymore.
With this change we can get rid of another layer violation, a hack we
had to make to make the host and folder endpoint registration work.
Change-Id: Id902df18c2dbaa1b738cd07ff498bc5f3a2f4d34