From: Matan Breizman Date: Sun, 23 Nov 2025 11:41:42 +0000 (+0200) Subject: Introduce "debug" flavor X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=04311dbd006ef9e1fa144725a44243554cde3a44;p=ceph-build.git Introduce "debug" flavor Currently, the only flavor used for testing is "default". While this ensures that the tested flavor matches the released flavor, it can also be a limitation. Introducing a debug flavor would allow us to test branches that require additional or more thorough validation. The main difference is that built-in assertions would be compiled in. The reasons for this change are: a) The Crimson suite uses a crimson-debug flavor for project PR gating. The next commit will clean up the Crimson flavor entirely, and the new debug flavor introduced here could be used as its replacement. b) Good practice: having an additional build with debug enabled is useful when retesting or performing extra checks. Initially, the new debug flavor will only apply to centos9 builds. If it proves valuable, we can expand support to other distros. Note: The current way to schedule debug builds is by using a *-debug branch name. Having a dedicated flavor seems more straightforward. Signed-off-by: Matan Breizman --- diff --git a/ceph-dev-cron/config/definitions/ceph-dev-cron.yml b/ceph-dev-cron/config/definitions/ceph-dev-cron.yml index 51fd9df69..126f0b522 100644 --- a/ceph-dev-cron/config/definitions/ceph-dev-cron.yml +++ b/ceph-dev-cron/config/definitions/ceph-dev-cron.yml @@ -77,6 +77,7 @@ # build tentacle on: # default: noble jammy centos9 windows # crimson: centos9 + # debug: centos9 - conditional-step: condition-kind: regex-match regex: .*tentacle.* @@ -100,10 +101,18 @@ DISTROS=centos9 FLAVOR=crimson-debug ARCHS=x86_64 + - project: 'ceph-dev' + predefined-parameters: | + BRANCH=${{GIT_BRANCH}} + FORCE=True + DISTROS=centos9 + FLAVOR=debug + ARCHS=x86_64 # build main on: # default: noble jammy centos9 windows # crimson-debug: centos9 # crimson-release: centos9 + # debug: centos9 - conditional-step: condition-kind: regex-match regex: .*main.* @@ -134,6 +143,13 @@ DISTROS=centos9 FLAVOR=crimson-release ARCHS=x86_64 + - project: 'ceph-dev' + predefined-parameters: | + BRANCH=${{GIT_BRANCH}} + FORCE=True + DISTROS=centos9 + FLAVOR=debug + ARCHS=x86_64 wrappers: - inject-passwords: diff --git a/ceph-dev-new-trigger/config/definitions/ceph-dev-new-trigger.yml b/ceph-dev-new-trigger/config/definitions/ceph-dev-new-trigger.yml index 924c38fe5..08ac50e5e 100644 --- a/ceph-dev-new-trigger/config/definitions/ceph-dev-new-trigger.yml +++ b/ceph-dev-new-trigger/config/definitions/ceph-dev-new-trigger.yml @@ -69,6 +69,7 @@ # build tentacle on: # default: noble jammy centos9 windows # crimson: centos9 + # debug: centos9 - conditional-step: condition-kind: regex-match regex: .*tentacle.* @@ -92,6 +93,13 @@ DISTROS=centos9 FLAVOR=crimson-debug ARCHS=x86_64 + - project: 'ceph-dev-new' + predefined-parameters: | + BRANCH=${{GIT_BRANCH}} + FORCE=True + DISTROS=centos9 + FLAVOR=debug + ARCHS=x86_64 # If no release name is found in branch, build on all possible distro/flavor combos (except xenial, bionic, focal). # regex matching and 'on-evaluation-failure: run' doesn't work here so triple negative it is. - conditional-step: @@ -118,7 +126,15 @@ DISTROS=centos9 FLAVOR=crimson-debug ARCHS=x86_64 - # build only centos9, no crimson + - trigger-builds: + - project: 'ceph-dev-new' + predefined-parameters: | + BRANCH=${{GIT_BRANCH}} + FORCE=True + DISTROS=centos9 + FLAVOR=debug + ARCHS=x86_64 + # build only centos9, default and debug. no crimson - conditional-step: condition-kind: regex-match regex: .*centos9-only.* @@ -136,6 +152,14 @@ FORCE=True DISTROS=centos9 ARCHS=x86_64 + - trigger-builds: + - project: 'ceph-dev-new' + predefined-parameters: | + BRANCH=${{GIT_BRANCH}} + FORCE=True + DISTROS=centos9 + FLAVOR=debug + ARCHS=x86_64 # Build only the `crimson` flavour, don't waste resources on the default one. # Useful for the crimson's bug-hunt at Sepia # crimson-debug: centos9 diff --git a/ceph-dev-new/config/definitions/ceph-dev-new.yml b/ceph-dev-new/config/definitions/ceph-dev-new.yml index 0f8db9a4e..5dd08d481 100644 --- a/ceph-dev-new/config/definitions/ceph-dev-new.yml +++ b/ceph-dev-new/config/definitions/ceph-dev-new.yml @@ -51,10 +51,11 @@ name: FLAVOR choices: - default + - debug - crimson-debug - crimson-release default: "default" - description: "Type of Ceph build, choices are: crimson-debug, crimson-release, default. Defaults to: 'default'" + description: "Type of Ceph build, choices are: crimson-debug, crimson-release, debug, default. Defaults to: 'default'" - string: name: CI_CONTAINER diff --git a/ceph-dev-pipeline/build/Jenkinsfile b/ceph-dev-pipeline/build/Jenkinsfile index 9ee521be6..5f683aa42 100644 --- a/ceph-dev-pipeline/build/Jenkinsfile +++ b/ceph-dev-pipeline/build/Jenkinsfile @@ -200,15 +200,16 @@ pipeline { } axes { name 'FLAVOR' - values 'default', 'crimson-release', 'crimson-debug' + values 'default', 'crimson-release', 'crimson-debug', 'debug' } } // crimson is only supported on centos9 x86_64 + // debug flavor is currently only supported on centos9 x86_64 excludes { exclude { axis { name 'FLAVOR' - values 'crimson-release', 'crimson-debug' + values 'crimson-release', 'crimson-debug', 'debug' } axis { name 'DIST' @@ -218,7 +219,7 @@ pipeline { exclude { axis { name 'FLAVOR' - values 'crimson-release', 'crimson-debug' + values 'crimson-release', 'crimson-debug', 'debug' } axis { name 'ARCH' @@ -449,6 +450,9 @@ pipeline { ceph_extra_cmake_args += " -DWITH_STATIC_LIBSTDCXX=ON" } break + case "debug": + ceph_extra_cmake_args += " -DCMAKE_BUILD_TYPE=Debug" + break case "crimson-debug": deb_build_profiles = "pkg.ceph.crimson" ceph_extra_cmake_args += " -DCMAKE_BUILD_TYPE=Debug" diff --git a/ceph-dev-pipeline/config/definitions/ceph-dev-pipeline.yml b/ceph-dev-pipeline/config/definitions/ceph-dev-pipeline.yml index 2995d087a..7fd10050a 100644 --- a/ceph-dev-pipeline/config/definitions/ceph-dev-pipeline.yml +++ b/ceph-dev-pipeline/config/definitions/ceph-dev-pipeline.yml @@ -46,7 +46,7 @@ - string: name: FLAVORS - description: "A list of flavors to build. Available options are: default, crimson-release, crimson-debug" + description: "A list of flavors to build. Available options are: default, crimson-release, crimson-debug, debug" default: "default" - bool: @@ -70,8 +70,9 @@ - default - crimson-debug - crimson-release + - debug default: "default" - description: "Type of Ceph build, choices are: crimson-debug, crimson-release, default. Defaults to: 'default'" + description: "Type of Ceph build, choices are: crimson-debug, crimson-release, default, debug. Defaults to: 'default'" - bool: name: CI_CONTAINER diff --git a/ceph-dev/config/definitions/ceph-dev.yml b/ceph-dev/config/definitions/ceph-dev.yml index 4801a6208..c9319338a 100644 --- a/ceph-dev/config/definitions/ceph-dev.yml +++ b/ceph-dev/config/definitions/ceph-dev.yml @@ -53,10 +53,11 @@ If this is checked, then the binaries will be built and pushed to chacra even if name: FLAVOR choices: - default + - debug - crimson-debug - crimson-release default: "default" - description: "Type of Ceph build, choices are: crimson-debug, crimson-release, default. Defaults to: 'default'" + description: "Type of Ceph build, choices are: crimson-debug, crimson-release, debug, default. Defaults to: 'default'" - bool: name: CI_CONTAINER diff --git a/ceph-trigger-build/README.md b/ceph-trigger-build/README.md index 1896b2ae8..9d9bd59a6 100644 --- a/ceph-trigger-build/README.md +++ b/ceph-trigger-build/README.md @@ -19,7 +19,7 @@ This pipeline's role is to: |CEPH-BUILD-JOB|Which Jenkins job to trigger. Only ceph-dev-pipeline supports the options below.|ceph-dev-pipeline, ceph-dev-new|`ceph-dev-pipeline`| |DISTROS|Space-sparated list of Linux distributions to build for|focal, jammy, noble, centos9, windows|Depends on keywords in branch name| |ARCHS|Space-separated list of architectures to build on|x86_64, arm64|`x86_64 arm64`| -|FLAVORS|Crimson or non-Crimson|default, crimson-debug, crimson-release|`default`| +|FLAVORS|Crimson or non-Crimson or debug|default, debug, crimson-debug, crimson-release|`default`| |CI-COMPILE|Compile binaries and packages[^1]|Boolean|`true`| |CI-CONTAINER|Build a dev container using the packages built|Boolean|`true`| |DWZ|Use [DWZ](https://sourceware.org/dwz/) to make debuginfo packages smaller|Boolean|`true` when using ceph-dev-new
`false` when using ceph-dev-pipeline[^2]| diff --git a/ceph-trigger-build/build/Jenkinsfile b/ceph-trigger-build/build/Jenkinsfile index eb7286bd6..8e86d260d 100644 --- a/ceph-trigger-build/build/Jenkinsfile +++ b/ceph-trigger-build/build/Jenkinsfile @@ -58,15 +58,21 @@ def params_from_branch(initialParams) { params << params[0].clone() params[-1]['ARCHS'] = 'x86_64' params[-1]['DISTROS'] = 'centos9' - params[-1]['FLAVOR'] = 'crimson-debug' + params[-1]['FLAVOR'] = 'crimson-debug debug' } else { params[0]['ARCHS'] += ' arm64' params[0]['FLAVOR'] += ' crimson-debug' + params[1]['FLAVOR'] += ' debug' } break case ~/.*centos9-only.*/: params[0]['DISTROS'] = 'centos9' - break + if ( !singleSet ) { + params << params[0].clone() + params[0]['FLAVOR'] = 'debug' + } else { + params[0]['FLAVOR'] += ' debug' + } case ~/.*crimson-only.*/: params[0]['ARCHS'] = 'x86_64' params[0]['DISTROS'] = 'centos9' @@ -83,9 +89,10 @@ def params_from_branch(initialParams) { params << params[0].clone() params[-1]['ARCHS'] = 'x86_64' params[-1]['DISTROS'] = 'centos9' - params[-1]['FLAVOR'] = 'crimson-debug' + params[-1]['FLAVOR'] = 'crimson-debug debug' } else { params[0]['FLAVOR'] += ' crimson-debug' + params[1]['FLAVOR'] += ' debug' } } if ( singleSet ) { diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh index ca12b6790..57425bcbd 100755 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -884,6 +884,9 @@ ceph_build_args_from_flavor() { CEPH_EXTRA_CMAKE_ARGS+=" -DWITH_SYSTEM_BOOST=OFF -DWITH_BOOST_VALGRIND=ON" DEB_BUILD_PROFILES="" ;; + debug) + CEPH_EXTRA_CMAKE_ARGS+=" -DCMAKE_BUILD_TYPE=Debug" + ;; crimson-debug) CEPH_EXTRA_RPMBUILD_ARGS="--with crimson" DEB_BUILD_PROFILES="pkg.ceph.crimson"