Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-60972

Have compilation log the MONGO_VERSION and note its impact on `releases.h`

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Dev Platform 2021-11-15, Dev Platform 2021-11-29, Dev Platform 2021-12-13, Dev Platform 2021-12-27

    Description

      Successful compilation now requires a correct MONGO_VERSION variable that creates a releases.h header from a template containing FCV constants the rest of the checked in code references.

      If this file is generated from a bad MONGO_VERSION value (i.e: 5.1 when the code references FCV 5.2), this results in compile errors that often require expert help to diagnose and solve.

      In an effort to make these issues more self-diagnosable, I'd like to see:

      • Everytime compilation is invoked, either via ninja or scons and with changed files, the (evaluated) value of MONGO_VERSION being used should be reported in its own log line.
      • A following log line reporting that the releases.h file is generated using that as its primary input.

      As an example, we could perhaps add the plused (+) lines to the example output:

      Creating 'build/newninja/mongo/config.h'
      + MONGO_VERSION evaluated to 5.2.0-alpha
      + releases.h is being regenerated with current FCV value of 5.2
      /bin/icerun /opt/mongodbtoolchain/v3/bin/python3 buildscripts/cheetah_source_generator.py -o build/newninja/mongo/idl/feature_flag_test.idl src/mongo/idl/feature_flag_test.idl.tpl src/mongo/util/version/releases.yml 5.2.0-alpha
      Creating 'build/newninja/mongo/util/version_constants.h'
      Creating 'build/newninja/third_party/third_party_shim.cpp'
      Creating 'build/newninja/third_party/wiredtiger/wiredtiger.h'
      mkdir -p build/scons/icecream && ICECC_VERSION_TMP=$(/bin/icecc-create-env --clang /opt/mongodbtoolchain/v3/bin/clang /opt/mongodbtoolchain/v3/bin/clang++ | awk '/^creating .*\.tar\.gz/ { print $2 }') && mv $ICECC_VERSION_TMP build/scons/icecream/icecc-create-env._opt_mongodbtoolchain_v3_bin_clang_opt_mongodbtoolchain_v3_bin_clang++.tar.gz
      tar xfO build/scons/icecream/icecc-create-env._opt_mongodbtoolchain_v3_bin_clang_opt_mongodbtoolchain_v3_bin_clang++.tar.gz | shasum -b -a 256 - | awk '{ print $1 }' > build/scons/icecream/icecc-create-env._opt_mongodbtoolchain_v3_bin_clang_opt_mongodbtoolchain_v3_bin_clang++.tar.gz.sha256
      ln -f build/scons/icecream/icecc-create-env._opt_mongodbtoolchain_v3_bin_clang_opt_mongodbtoolchain_v3_bin_clang++.tar.gz build/scons/icecream/icecream_py_sha256_$(cat build/scons/icecream/icecc-create-env._opt_mongodbtoolchain_v3_bin_clang_opt_mongodbtoolchain_v3_bin_clang++.tar.gz.sha256).tar.gz
      echo /home/dgottlieb/xgen/mongo/build/scons/icecream/icecream_py_sha256_$(cat build/scons/icecream/icecc-create-env._opt_mongodbtoolchain_v3_bin_clang_opt_mongodbtoolchain_v3_bin_clang++.tar.gz.sha256).tar.gz > build/scons/icecream/icecc-create-env._opt_mongodbtoolchain_v3_bin_clang_opt_mongodbtoolchain_v3_bin_clang++.tar.gz.sha256.path
      <lambda>([None], ["build/scons/icecream/icecc-create-env._opt_mongodbtoolchain_v3_bin_clang_opt_mongodbtoolchain_v3_bin_clang++.tar.gz.sha256.path"])
      Creating 'build/scons/icecream/run-icecc.sh'
      Chmod("build/scons/icecream/run-icecc.sh", "u+x")
      scons: done building targets.
      [4671/4671 (100%) 290.366s] Install bin/db_unittest_test
      

      Attachments

        Activity

          People

            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: