Disable server-side JS engine on PPC variants

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0, 9.0.0-rc2
    • Affects Version/s: None
    • Component/s: Backend
    • None
    • Query Integration
    • Fully Compatible
    • v9.0
    • QO 2025-02-17
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

        1. Summary

      Guarantees the server-side JavaScript engine is never compiled into PPC (`ppc64le`)
      `mongod`/`mongos` binaries, enforced in the build graph rather than per-variant flags.
      PPC is the only platform still on the legacy/native mozjs engine (the WASM engine is
      unsupported on ppc64le), which motivated dropping server-side JS there (see BF-44837).

      `mongod_main` and `mongos_main` select their scripting backend on the new
      `server_js_enabled_and_not_ppc` config group (`server_js_enabled` *and* `not_ppc`).
      On ppc64le that condition can never match, so any ppc64le build links `scripting_none`
      instead of `scripting_server` — **regardless of the `server_js` flag or which pipeline
      builds it**. This makes it impossible to accidentally ship a PPC release with the JS
      engine compiled in.

      The test shell keeps its own JS engine, so resmoke jstests still run on PPC. Tests that
      require server-side scripting are excluded via the existing `requires_scripting` tag.

        1. Changes
      • `bazel/config/BUILD.bazel` — add the `server_js_enabled_and_not_ppc` config setting
        group (`server_js_enabled` + `not_ppc`).
      • `src/mongo/db/BUILD.bazel`, `src/mongo/s/BUILD.bazel` — point the `mongod_main` /
        `mongos_main` scripting `select` at `server_js_enabled_and_not_ppc`, so ppc64le links
        `scripting_none`.
      • `etc/evergreen_yml_components/variants/ibm/test_release.yml` — add `requires_scripting`
        to the 3 base PPC variants' `--excludeWithAnyTags` (RHEL 8.1 / 9 / 10; inherited by the
        `-dynamic` variants).
      • `etc/evergreen_yml_components/variants/amazon/test_dev_master_branch_only.yml` — add
        `requires_scripting` to the nightly `rhel81-ppc64le-bazel-compile` smoke check.
        1. Safety / scope
      • The scripting change is gated on `not_ppc`, so *all non-PPC platforms are unchanged* —
        they still honor `--server_js` (default `True`).
      • The guarantee holds for the shipped release artifacts (the base PPC variants with
        `has_packages`/`push_*`), independent of any Evergreen build flag.
      • jstests continue to run on PPC; only `requires_scripting`-tagged tests are skipped.
        1. Testing

      Evergreen patches on the PPC variants (linked in comments). The `rhel81-ppc64le-bazel-compile`
      smoke check builds cleanly with server-side JS compiled out.

            Assignee:
            Lee Maguire
            Reporter:
            Lee Maguire
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: