Branch: refs/heads/2.3.0
Home:
https://github.com/Checkmk/checkmk
Commit: 80668104a0f18845cfc6794f1724eff25408b2e2
https://github.com/Checkmk/checkmk/commit/80668104a0f18845cfc6794f1724eff25…
Author: Lars Michelsen <lm(a)checkmk.com>
Date: 2024-02-20 (Tue, 20 Feb 2024)
Changed paths:
M bin/.f12
A bin/cmk-compute-api-spec
M cmk/gui/openapi/restful_objects/specification.py
M cmk/gui/openapi/spec_generator.py
M cmk/gui/wsgi/applications/rest_api.py
M tests/testlib/pylint_checker_cmk_module_layers.py
Log Message:
-----------
Add dedicated command to compute REST API spec: cmk-compute-api-spec
Previously the REST API specification was computed and cached in every
apache process. This caused several issues:
a) After spawning a new apache, the spec needed to be recomputed for
every process. This caused a delay in the first request hitting an
apache process asking for it.
b) It was held in memory by every process consuming a few MB.
c) The invalidation of the cache and computation of new spec could not
be triggered manually.
With this change the spec is now stored in the site and made available
to all apache processes from there.
With the dedicated command `cmk-compute-api-spec` the computation can
now be triggered in specific situations automatically or manually for
debugging.
CMK-15981
Change-Id: I7c7a04b15d7715024f4ef213689edbf0ad630795
Commit: abde7377876b98e3f93a482c30768381d0e13daf
https://github.com/Checkmk/checkmk/commit/abde7377876b98e3f93a482c30768381d…
Author: Lars Michelsen <lm(a)checkmk.com>
Date: 2024-02-20 (Tue, 20 Feb 2024)
Changed paths:
M cmk/gui/wsgi/applications/rest_api.py
Log Message:
-----------
Drop dead code
Change-Id: Ib8b244e26b3a6694a4034619fae5d1a2f0532693
Commit: 2e98df5b2b7ab70d86b0fd7c16240c59bf7d0507
https://github.com/Checkmk/checkmk/commit/2e98df5b2b7ab70d86b0fd7c16240c59b…
Author: Lars Michelsen <lm(a)checkmk.com>
Date: 2024-02-20 (Tue, 20 Feb 2024)
Changed paths:
A tests/integration/cmk/gui/openapi/test_spec_generator.py
Log Message:
-----------
Add integration test to ensure cmk-compute-api-spec works
CMK-15981
Change-Id: Icc64b14bf029d64db6b24e2a2ccea8ab5766833d
Commit: a13e3744f83838c0efdf5b4d4d9aec215285edd2
https://github.com/Checkmk/checkmk/commit/a13e3744f83838c0efdf5b4d4d9aec215…
Author: Lars Michelsen <lm(a)checkmk.com>
Date: 2024-02-20 (Tue, 20 Feb 2024)
Changed paths:
A cmk/post_rename_site/plugins/actions/compute_api_spec.py
A cmk/update_config/plugins/actions/compute_api_spec.py
M omd/packages/check_mk/check_mk.make
A omd/packages/check_mk/post-create/02_cmk-compute-api-spec
M tests/unit/cmk/post_rename_site/test_load_plugins.py
Log Message:
-----------
Execute the API spec generation in various situations
This change registers the new cmk-compose-api-spec command into various
events happening during the lifecycle of a site.
- post-create hook: Create the initial spec after a site has been created
- post rename action: Update the spec after a site has been copied,
restored or renamed
- update-config action: Update the spec after Checkmk has been updated
It might be necessary to run the command in some other situations. We'll
have to find out about those along the way.
CMK-15981
Change-Id: I29eeffd60ec11a797f55d103a8a86fd74fdf3935
Commit: 741455761777d03a9bf90329107a7882b324df0e
https://github.com/Checkmk/checkmk/commit/741455761777d03a9bf90329107a7882b…
Author: Lars Michelsen <lm(a)checkmk.com>
Date: 2024-02-20 (Tue, 20 Feb 2024)
Changed paths:
A .werks/15724.md
Log Message:
-----------
15724 FIX Change API specification computation
The specification of the REST API defines the structure of the API. It is
computed automatically from the implementation in Checkmk.
Previously the specification was computed during runtime when something
requested access to the specification. This could be a user opening ReDoc or the
Swagger UI. The specification was then computed ad-hoc and cached in the memory of the
apache process. This caused several issues:
* After spawning a new apache, the specification needed to be recomputed for
every process. This caused a delay in the first request hitting an
apache process asking for it.
* It was held in memory by every process consuming a few MB.
* The invalidation of the cache and computation of new specification could not
be triggered manually.
With this change the specification is now stored in the site and made available
to all apache processes from there.
With the dedicated command `cmk-compute-api-spec` the computation can now be
triggered in specific situations automatically or manually for debugging.
The specification is now updated in these situations:
* post-create hook: Create the initial spec after a site has been created
* post rename action: Update the spec after a site has been copied, restored or renamed
* update-config action: Update the spec after the site has been updated
CMK-15981
Change-Id: Ic524bf8146640c66919fd49653b805c981f47771
Commit: 4f1bca39a14ea1df47ae4902bd744d3d18cfc5ce
https://github.com/Checkmk/checkmk/commit/4f1bca39a14ea1df47ae4902bd744d3d1…
Author: Lars Michelsen <lm(a)checkmk.com>
Date: 2024-02-20 (Tue, 20 Feb 2024)
Changed paths:
M cmk/gui/wsgi/applications/rest_api.py
Log Message:
-----------
Improve spec serving performance by using a cache
The final spec is now cached in the tmpfs of the site. This way the
API UIs can be rendered even faster. The cache is invalidated once a
new specification is available.
CMK-15981
Change-Id: I71c4aa43a0e631f6a2022ec2e7905993941db47d
Commit: 9a30dd35839b930b86ea2006e86f1a274d830fb1
https://github.com/Checkmk/checkmk/commit/9a30dd35839b930b86ea2006e86f1a274…
Author: Lars Michelsen <lm(a)checkmk.com>
Date: 2024-02-20 (Tue, 20 Feb 2024)
Changed paths:
M cmk/gui/wato/pages/tags.py
Log Message:
-----------
Consistently use shared helper for editing tags
CMK-15981
Change-Id: I066da0f9d5de5942a21386a45d96bb49035d4c5b
Commit: cc3f8d1403b7030fc0e1ce90a86b2d885948e4ae
https://github.com/Checkmk/checkmk/commit/cc3f8d1403b7030fc0e1ce90a86b2d885…
Author: Lars Michelsen <lm(a)checkmk.com>
Date: 2024-02-20 (Tue, 20 Feb 2024)
Changed paths:
M cmk/gui/openapi/registration.py
A cmk/gui/openapi/spec_generator_job.py
M cmk/gui/plugins/main_modules/registration.py
M cmk/gui/watolib/tags.py
M tests/unit/cmk/gui/test_background_job.py
Log Message:
-----------
Background job for spec creation triggered by UI actions
We need to trigger an update of the spec to reflect changes made by previous
config steps in the API specification.
Since the computation takes some time, this must not be done
synchronously. We need to be able to track the outcome of the job and be
able to analyze the progress of the job through the UI. So it makes
sense to realize this as background job.
The job shall be triggered by every change to the configuration which
has an effect on the API specification. The first place we trigger this
job is the configuration of tags.
Change-Id: Ie595552cd79eb3c38abdfa594b91ac7c99ac9330
Compare:
https://github.com/Checkmk/checkmk/compare/7af6994a6ae3...cc3f8d1403b7
To unsubscribe from these emails, change your notification settings at
https://github.com/Checkmk/checkmk/settings/notifications