Skip to content

Commit e75dba3

Browse files
authored
Merge branch 'Checkmk:master' into feature-support-valkey
2 parents c3835b9 + c866b78 commit e75dba3

File tree

5,348 files changed

+212331
-121763
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

5,348 files changed

+212331
-121763
lines changed

.bazelignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ bazel/tools/node_modules
77
packages/cmk-frontend/node_modules
88
packages/cmk-frontend-vue/node_modules
99
packages/cmk-shared-typing/node_modules
10+
packages/cmk-werks/node_modules

.bazelrc

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,22 @@ common --test_summary=detailed
4141

4242
## For specific commands
4343
# Always require debug info.
44-
# build --copt="-g"
45-
build --flag_alias=cmk_version=@cmk//version
46-
build --flag_alias=cmk_edition=@cmk//edition
47-
build --flag_alias=cmk_distro=@cmk//distro
44+
# common --copt="-g"
45+
common --flag_alias=cmk_version=@cmk//version
46+
common --flag_alias=cmk_edition=@cmk//edition
47+
common --flag_alias=cmk_distro=@cmk//distro
4848

4949
# For some obscure reason, the re2 project made itself valgrind-dirty by default:
5050
# https://github.com/google/re2/commit/ce6f2884c4b52509fd6c5d12b8f1c40587067784
5151
# Defining the symbol below has a small performance hit, but makes our stuff
5252
# valgrind-clean again, which is a crucial feature for debugging the NEB & CMC!
53-
build --copt="-DRE2_ON_VALGRIND"
53+
common --copt="-DRE2_ON_VALGRIND"
5454

5555
clean --async
5656
# all bazel-created temporary and build output files
5757
# clean --expunge
5858
# run ...
59-
test --test_output=all
59+
common --test_output=all
6060

6161
# Flags for CI builds
6262
# Definition of "bazel x --config=ci -- ..."
@@ -80,14 +80,14 @@ common --@aspect_rules_ts//ts:skipLibCheck=always
8080
# common --@aspect_rules_ts//ts:skipLibCheck=honor_tsconfig
8181

8282
## For specific commands
83-
# build:ci ...
83+
# common:ci ...
8484
# Don't require system python for bootstrapping
8585
# See: https://github.com/bazelbuild/rules_python/commit/f5b19dce7bc0837396ac03a425cdb9b64643cf61
8686
# TODO: should be dropped as soon as this becomes the default
8787
# TODO: this should be the overall default, see discussions in
8888
# https://tribe29.slack.com/archives/C03PW9280U9/p1728303949973099
89-
build:ci --@rules_python//python/config_settings:bootstrap_impl=script
90-
build:ci --noshow_progress
89+
common:ci --@rules_python//python/config_settings:bootstrap_impl=script
90+
common:ci --noshow_progress
9191

9292
# clean:ci ...
9393
# run:ci ...
@@ -101,49 +101,44 @@ common:debug --announce_rc
101101
common:debug --verbose_failures
102102

103103
## For specific commands
104-
# build:debug ...
105-
# clean:debug ...
106-
# run:debug ...
107-
# test:debug ...
108104

109105
################################################################################
110106
# Example: bazel build --config=iwyu //non-free/packages/cmc:all
111107
################################################################################
112-
113-
build:iwyu --aspects @bazel_iwyu//bazel/iwyu:iwyu.bzl%iwyu_aspect
114-
build:iwyu --output_groups=report
115-
build:iwyu --@bazel_iwyu//:iwyu_executable=//bazel/tools:iwyu_bin
116-
build:iwyu --@bazel_iwyu//:iwyu_opts="--error"
117-
build:iwyu --@bazel_iwyu//:iwyu_mappings=//bazel/tools:iwyu_mappings
108+
common:iwyu --aspects @bazel_iwyu//bazel/iwyu:iwyu.bzl%iwyu_aspect
109+
common:iwyu --output_groups=report
110+
common:iwyu --@bazel_iwyu//:iwyu_executable=//bazel/tools:iwyu_bin
111+
common:iwyu --@bazel_iwyu//:iwyu_opts="--error"
112+
common:iwyu --@bazel_iwyu//:iwyu_mappings=//bazel/tools:iwyu_mappings
118113

119114
################################################################################
120115
# Example: bazel build --config=mypy //packages/cmk-agent-based:all
121116
################################################################################
122-
build:mypy --aspects //bazel/tools:aspects.bzl%mypy_aspect
123-
build:mypy --output_groups=mypy
117+
common:mypy --aspects //bazel/tools:aspects.bzl%mypy_aspect
118+
common:mypy --output_groups=mypy
124119

125120
################################################################################
126121
# Example: bazel build --config=clippy //packages/host/cmk-agent-ctl:all
127122
################################################################################
128-
build:clippy --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect
129-
build:clippy --output_groups=+clippy_checks
130-
build:clippy --@rules_rust//:clippy_flags=-Dwarnings
123+
common:clippy --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect
124+
common:clippy --output_groups=+clippy_checks
125+
common:clippy --@rules_rust//:clippy_flags=-Dwarnings
131126

132127
# Turn off automatic capturing of environmental stuff like PATH - those will be set explicitly
133128
# (see https://blog.aspect.build/bazelrc-flags)
134-
build --incompatible_strict_action_env
129+
common --incompatible_strict_action_env
135130

136131
# Set PATH manually (see above) for both action_env and host_action_env
137132
# Note: in the future PATH might not be needed at all as long as Bazel provides all the tools
138133
# currently taken from system. For now we still need `/usr/bin` and `/bin` for stuff like
139134
# `git`, etc.
140135
# Also note that in some distro specific exceptions we force tools to be located in
141136
# `/usr/bin` (by symlinking) when building the build images
142-
build --enable_platform_specific_config
143-
build:linux --action_env=PATH="/usr/bin:/bin"
144-
build:linux --host_action_env=PATH="/usr/bin:/bin"
145-
build:windows --action_env=PATH="c:\\Windows;c:\\Windows\\system32;C:\\Program Files (x86)\\Windows Kits\\10\\App Certification Kit"
146-
build:windows --host_action_env=PATH="c:\\Windows;c:\\Windows\\system32;C:\\Program Files (x86)\\Windows Kits\\10\\App Certification Kit"
137+
common --enable_platform_specific_config
138+
common:linux --action_env=PATH="/usr/bin:/bin"
139+
common:linux --host_action_env=PATH="/usr/bin:/bin"
140+
common:windows --action_env=PATH="c:\\Windows;c:\\Windows\\system32;C:\\Program Files (x86)\\Windows Kits\\10\\App Certification Kit"
141+
common:windows --host_action_env=PATH="c:\\Windows;c:\\Windows\\system32;C:\\Program Files (x86)\\Windows Kits\\10\\App Certification Kit"
147142

148143
# Default coverage configuration
149144
coverage --keep_going

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ check-mk-*.tar.gz
6262
check-mk-*_amd64.deb
6363
clang-analyzer/
6464
cmc-*.tar.gz
65-
cme-*.tar.gz
6665
/container_shadow_workspace*/
6766
download/
6867
doc/plugin-api/build/

.envrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,9 @@ layout_cmk_uv() {
1111
}
1212

1313
layout cmk_uv
14+
15+
watch_file bazel-out/bazel_env-opt/bin/bazel/tools/bazel_env/bin
16+
PATH_add bazel-out/bazel_env-opt/bin/bazel/tools/bazel_env/bin
17+
if [[ ! -d bazel-out/bazel_env-opt/bin/bazel/tools/bazel_env/bin ]]; then
18+
bazel run //bazel/tools:bazel_env
19+
fi

.github/workflows/pr.yaml

Lines changed: 61 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -11,62 +11,64 @@ name: PR-CI
1111
on: [push, pull_request]
1212

1313
jobs:
14-
testing:
15-
runs-on: ubuntu-22.04
16-
env:
17-
PYTHONWARNINGS: ignore:DeprecationWarning
18-
# Avoid falling back to our internal bazel remote cache on github actions
19-
BAZEL_CACHE_URL: ""
20-
strategy:
21-
matrix:
22-
include:
23-
- name: Bandit tests
24-
target: test-bandit
25-
- name: Python formatting
26-
target: test-format-python
27-
- name: Ruff lint tests
28-
target: test-ruff
29-
- name: Python unit tests
30-
target: test-unit
31-
- name: mypy tests
32-
target: test-mypy-raw
33-
steps:
34-
- name: Set Environment Variables
35-
run: |
36-
# Using existing environment variables within another variables is not working in the jobs.*.env section
37-
# more infos see: https://brandur.org/fragments/github-actions-env-vars-in-env-vars
38-
echo "UV_CACHE_DIR=$HOME/.cache/uv" >> $GITHUB_ENV
39-
- name: Checkout Repository
40-
uses: actions/checkout@v3
41-
- name: Cache uv
42-
uses: actions/cache@v3
43-
with:
44-
key: uv-${{ runner.os }}-${{ hashFiles('requirements_all_lock.txt') }}
45-
path: ${{ env.UV_CACHE_DIR }}
46-
- name: Cache bazel
47-
uses: actions/cache@v3
48-
with:
49-
key: ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE', 'MODULE.bazel') }}
50-
path: |
51-
~/.cache/bazel
52-
restore-keys: |
53-
${{ runner.os }}-bazel-
54-
- name: Setup Environment
55-
run: |
56-
# ksh: Needed for some "unit test" (test_mk_errpt_aix).
57-
# librrd-dev: Needed for building rrdtool python bindings.
58-
# libldap2-dev: Needed for building python-ldap.
59-
# libsasl2-dev: Needed for building python-ldap.
60-
# libkrb5-dev: Needed for building pykerberos.
61-
# libglib2.0-dev: required by packages/glib and therfore transitive by python unit tests
62-
# gettext: Needed for some "unit tests" (test_i18n.py)
63-
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/ppa
64-
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
65-
sudo apt-get update
66-
sudo apt-get install ksh libpango1.0-dev librrd-dev libldap2-dev libsasl2-dev libkrb5-dev libglib2.0-dev gettext g++-13 g++-14
67-
make .venv
68-
- name: Run ${{ matrix.name }}
69-
env:
70-
TEST_TARGETS: ${{ matrix.target }}
71-
run: |
72-
make -C tests $TEST_TARGETS
14+
testing:
15+
runs-on: ubuntu-24.04
16+
env:
17+
PYTHONWARNINGS: ignore:DeprecationWarning
18+
# Avoid falling back to our internal bazel remote cache on github actions
19+
BAZEL_CACHE_URL: ""
20+
# Needed by "make .venv" to compute PYTHON_REQUIREMENTS_TEST
21+
EDITION: community
22+
strategy:
23+
matrix:
24+
include:
25+
- name: Bandit tests
26+
target: test-bandit
27+
- name: Formatting
28+
target: test-format
29+
- name: Ruff lint tests
30+
target: test-ruff
31+
- name: Python unit tests
32+
target: test-unit
33+
- name: mypy tests
34+
target: test-mypy-gpl
35+
steps:
36+
- name: Set Environment Variables
37+
run: |
38+
# Using existing environment variables within another variables is not working in the jobs.*.env section
39+
# more infos see: https://brandur.org/fragments/github-actions-env-vars-in-env-vars
40+
echo "UV_CACHE_DIR=$HOME/.cache/uv" >> $GITHUB_ENV
41+
- name: Checkout Repository
42+
uses: actions/checkout@v3
43+
- name: Cache uv
44+
uses: actions/cache@v3
45+
with:
46+
key: uv-${{ runner.os }}-${{ hashFiles('requirements_all_lock.txt') }}
47+
path: ${{ env.UV_CACHE_DIR }}
48+
- name: Cache bazel
49+
uses: actions/cache@v3
50+
with:
51+
key: ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE', 'MODULE.bazel') }}
52+
path: |
53+
~/.cache/bazel
54+
restore-keys: |
55+
${{ runner.os }}-bazel-
56+
- name: Setup Environment
57+
run: |
58+
# ksh: Needed for some "unit test" (test_mk_errpt_aix).
59+
# librrd-dev: Needed for building rrdtool python bindings.
60+
# libldap2-dev: Needed for building python-ldap.
61+
# libsasl2-dev: Needed for building python-ldap.
62+
# libkrb5-dev: Needed for building pykerberos.
63+
# libglib2.0-dev: required by packages/glib and therfore transitive by python unit tests
64+
# gettext: Needed for some "unit tests" (test_i18n.py)
65+
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/ppa
66+
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
67+
sudo apt-get update
68+
sudo apt-get install ksh libpango1.0-dev librrd-dev libldap2-dev libsasl2-dev libkrb5-dev libglib2.0-dev gettext "^g\+\+-14$"
69+
make .venv
70+
- name: Run ${{ matrix.name }}
71+
env:
72+
TEST_TARGETS: ${{ matrix.target }}
73+
run: |
74+
make -C tests $TEST_TARGETS

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
.*.swo
21
.*.swp
32
.bugs/.last
43
.bugs/.my_ids
@@ -52,7 +51,6 @@ check-mk-*.tar.gz
5251
check-mk-*_amd64.deb
5352
clang-analyzer/
5453
cmc-*.tar.gz
55-
cme-*.tar.gz
5654
agents/linux/*
5755
doc/plugin-api/build/
5856
doc/plugin-api/source/apidoc/

.pre-commit-config.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,10 @@ repos:
142142
verbose: true
143143
require_serial: true
144144
- id: taplo
145-
name: format pyproject.toml
146-
entry: bazel run //bazel/tools:taplo_bin -- format pyproject.toml
147-
pass_filenames: false
145+
name: format pyproject.toml files
146+
entry: bazel run //bazel/tools/format:taplo_bin -- format
147+
pass_filenames: true
148148
language: system
149+
files: pyproject.toml
149150
verbose: true
150151
require_serial: true

.prettierignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
package-lock.json
33
pnpm-lock.yaml
44
node_modules/
5+
.werks/
56

67
*.jsonl
78

8-
# cmk-frontend
99
# 3rd party
10+
third_party/
11+
12+
# cmk-frontend
1013
packages/cmk-frontend/src/js/modules/colorpicker.js
1114
packages/cmk-frontend/src/jquery
1215
packages/cmk-frontend/src/openapi

.werks/16732.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[//]: # (werk v2)
2+
# Fix: Improve description on FutureWarning errors
3+
4+
key | value
5+
---------- | ---
6+
date | 2025-11-03T13:38:29+00:00
7+
version | 2.5.0b1
8+
class | fix
9+
edition | cre
10+
component | wato
11+
level | 1
12+
compatible | yes
13+
14+
The error message for warnings of type FutureWarning now includes the specific regex that triggered the warning, which was previously missing.
15+
16+
This enhancement provides users with more detailed information, making it easier to identify and address deprecated or problematic configurations early. As a result, users can improve system reliability by resolving issues before they cause failures.
17+
18+
No configuration changes are required; this update is purely informational.

.werks/16906.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[//]: # (werk v2)
2+
# Bytecode compilation in post-install step rather than packaging
3+
4+
key | value
5+
---------- | ---
6+
date | 2025-11-03T13:37:23+00:00
7+
version | 2.5.0b1
8+
class | feature
9+
edition | cre
10+
component | omd
11+
level | 1
12+
compatible | yes
13+
14+
Pre-compilation for Python byte code had previously been done during package
15+
builds, resulting in bigger Checkmk installation packages and potentially
16+
missing precompiled files due to differences in packaging processes.
17+
18+
This change turns the different `compileall` call sites into one post-install
19+
step for both `.deb` and `.rpm` packages, handling the whole Checkmk package
20+
at once.
21+
22+
As a result the whole Checkmk installation process takes roughly 10sec longer.

0 commit comments

Comments
 (0)