]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
Introduce "debug" flavor
authorMatan Breizman <mbreizma@redhat.com>
Sun, 23 Nov 2025 11:41:42 +0000 (13:41 +0200)
committerMatan Breizman <mbreizma@redhat.com>
Sun, 23 Nov 2025 12:46:34 +0000 (14:46 +0200)
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 <mbreizma@redhat.com>
ceph-dev-cron/config/definitions/ceph-dev-cron.yml
ceph-dev-new-trigger/config/definitions/ceph-dev-new-trigger.yml
ceph-dev-new/config/definitions/ceph-dev-new.yml
ceph-dev-pipeline/build/Jenkinsfile
ceph-dev-pipeline/config/definitions/ceph-dev-pipeline.yml
ceph-dev/config/definitions/ceph-dev.yml
ceph-trigger-build/README.md
ceph-trigger-build/build/Jenkinsfile
scripts/build_utils.sh

index 51fd9df69594290ddc7ec7d80597675b4a27d8d8..126f0b522146afd93e0b23d344a7cbf204d639ed 100644 (file)
@@ -77,6 +77,7 @@
       # build tentacle on:
       # default: noble jammy centos9 windows
       # crimson: centos9
+      # debug: centos9
       - conditional-step:
           condition-kind: regex-match
           regex: .*tentacle.*
                     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.*
                     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:
index 924c38fe5f8577f43adbdbbce115cca972bbfab3..08ac50e5ea7b3efa6ca1aa7f1818c5454bb30683 100644 (file)
@@ -69,6 +69,7 @@
       # build tentacle on:
       # default: noble jammy centos9 windows
       # crimson: centos9
+      # debug: centos9
       - conditional-step:
           condition-kind: regex-match
           regex: .*tentacle.*
                     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:
                     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.*
                     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
index 0f8db9a4ecc7e434f5ad37a645e32ae2837f4d47..5dd08d481894ffe174b43a6c2dba00c61f554818 100644 (file)
           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
index 9ee521be6effd2e5b6f44f6524d3946a15494b64..5f683aa4237c5c2774789a0ec997e1988bd81d98 100644 (file)
@@ -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"
index 2995d087a87e3dcb8196b2f0f765746b3706e2dc..7fd10050a7cd6ec449fd56cfda725a9dfb708ef7 100644 (file)
@@ -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
index 4801a620866462050442ed8df8002803c64fbd70..c9319338a6d2445dd263773047b14b7c078e887f 100644 (file)
@@ -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
index 1896b2ae8c5c65569ca82a54a88fe9495b43c8ef..9d9bd59a6fdc0b84afa9be45696c666b19bf9897 100644 (file)
@@ -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<br>`false` when using ceph-dev-pipeline[^2]|
index eb7286bd6457113d96526dad55185b461c7a51c1..8e86d260d8ddb7cde1a363d983881496ba08dca0 100644 (file)
@@ -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 ) {
index ca12b679034c5dc5261b90dc7e29e09a89d96ceb..57425bcbdc9dd9214d9804507407f69cb2bb799e 100755 (executable)
@@ -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"