ExportXMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0
    • Affects Version/s: None
    • Component/s: Bazel
    • None
    • Query Integration
    • Fully Compatible
    • QI 2025-02-17
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Fixes [BF-45702](https://jira.mongodb.org/browse/BF-45702) — `full_bazel_compiledb` failing on `enterprise-windows` and `enterprise-amazon2023-arm64` in `mongodb-mongo-master-nightly`.

        1. What this PR does

      Wraps `ExtensionsSignaturePubKeyPathOptionTest` and its four test cases in `src/mongo/db/server_options_test.cpp` in `#ifndef MONGO_CONFIG_EXT_SIG_SECURE`.

      `ServerGlobalParams::extensionsSignaturePublicKeyPath` (`server_options.h:322`) only exists when `MONGO_CONFIG_EXT_SIG_SECURE` is not defined, and the option itself is conditioned the same way in `server_options_general.idl:149-154`. The test fixture read that member unconditionally, so the translation unit did not compile in secure mode:

      ```
      src/mongo/db/server_options_test.cpp(1606,35): error C2039:
      'extensionsSignaturePublicKeyPath': is not a member of 'mongo::ServerGlobalParams'
      ```

        1. Motivation

      This is a compile break, not a Windows-specific one — `MONGO_CONFIG_EXT_SIG_SECURE` is defined for every release/secure config (`src/mongo/BUILD.bazel:118-131`), which is why both a Windows and an ARM64 variant fail identically. Ordinary unittest tasks build in insecure mode, so only `full_bazel_compiledb` — which type-checks all test compilations under the release config — catches it. Regression from the flag added in `2dfabc3e52e` (SERVER-115282); `signature_validator_test.cpp` already uses this guard convention throughout.

        1. Reviewer reading guide

      Single file, ~5 added lines. The only thing worth checking is that the `#endif` sits above `ExtensionsConfigPathOptionTest` — `extensionsConfigPath` is a different, unconditional option and must stay outside the guard.

        1. Followups & caveats
      • No test was added for secure mode because none is possible: the option is not registered there, so the harness's `ASSERT_OK(_parser.run(...))` (line 1568) fails on the unrecognized flag before any validation runs.
      • That makes the `BadValue` branch in `setExtensionsSignaturePubKeyPath` (`server_options_helpers.cpp:92-97`) *unreachable dead code* — its single caller (line 515) returns OK early because `params[...]` is always empty in secure mode. Left as-is here since removing it is a separate change; worth its own ticket.
      • This does not make `full_bazel_compiledb` reliably green. That task has failed ~31% of runs over the last 30 days for unrelated reasons (memory pressure), tracked separately on the BF.

            Assignee:
            Finley Lau
            Reporter:
            Finley Lau
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: