test_crypt_packages validates wrong BEP: use crypt_create_lib BEP instead of archive_dist_test

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • DevProd Test Infrastructure
    • Fully Compatible
    • ALL
    • DevProd Test Infra 2026-06-16
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description:

      Problem

      test_crypt_packages calls validate_no_remote_cache_or_execution to verify the crypt
      library was not built with remote caching or execution. However, the BEP (Build Event Protocol)
      file it fetches comes from archive_dist_test via the mongo_bep expansion — a task that
      builds MongoDB binaries and has no relationship to the crypt build pipeline.

      This causes an intermittent failure (BF-43586) on 17 enterprise variants where
      test_crypt_packages runs before archive_dist_test finishes uploading its BEP to S3.
      The s3.get optional=true creates a zero-byte local file, and validate_no_remote_cache_or_execution
      raises: "No optionsParsed event found in BEP file: build_events.json".

      Some variants (e.g. enterprise-amazon2023-arm64) accidentally pass because their
      archive_dist_test finishes fast enough (larger machines, no BOLT) to win the race.

      Root Cause

      SERVER-126784 added BEP validation to both run package test and run crypt package test
      using the same mongo_bep path. For run package test this is correct — it validates
      binaries built by archive_dist_test, which test_packages already depends on. For
      run crypt package test it is wrong — the crypt binary is built by crypt_create_lib,
      which never uploads to mongo_bep and is not in the dependency chain of test_crypt_packages.

      Fix

      • Add s3.put of build_events.json to crypt_create_lib (uploading to a new
        mongo_crypt_bep path)
      • Add a mongo_crypt_bep expansion key
      • Add fetch_crypt_bep_if_available function fetching from mongo_crypt_bep
      • Replace *fetch_bep_if_available with *fetch_crypt_bep_if_available in
        run crypt package test

      This ensures test_crypt_packages validates the BEP from the actual crypt compile task,
      and the existing dependency chain (test_crypt_packagescrypt_lib_package
      crypt_create_lib) guarantees the BEP is always uploaded before it is fetched.

      Files Changed

      • etc/evergreen_yml_components/definitions.yml
      • etc/evergreen_yml_components/tasks/compile_tasks_shared.yml

      Fixes

      BF-43586

            Assignee:
            Nicholas Jefferies
            Reporter:
            Nicholas Jefferies
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: