Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-11417

False positive from primitive_check.py

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 2
    • StorEng - Defined Pipeline

      I am still getting the following warning when running the script even though my code changes are not impacting the mentioned types:

      ####################### MESSAGE ############################
      s_all run of: "python3 primitive_check.py" resulted in:
          Code changes made since this branch diverged from develop include the following concurrency control primitives: ['volatile', 'WT_ORDERED_READ', 'WT_PUBLISH']
          If you have introduced or removed a primitive it will impact the in progress shared variable review project. Please reach out accordingly.
      #######################
      

      The script could be improved by performing a simple diff between the tip of the branch being modified and develop using the following command:

      git diff <current_branch>..develop
      

      The code changes could be the following ones:

      diff --git a/dist/primitive_check.py b/dist/primitive_check.py
      index 59df27343..7f246964a 100755
      --- a/dist/primitive_check.py
      +++ b/dist/primitive_check.py
      @@ -33,9 +33,12 @@ primitives = [
       ]
       
       command = "git rev-parse --show-toplevel"
      -root = subprocess.run(command, capture_output=True, text=True, shell=True).stdout
      +root = subprocess.run(command, capture_output=True, text=True, shell=True).stdout.strip()
       
      -command = f"git diff {common_functions.last_commit_from_dev()} -- src/"
      +command = "git rev-parse --abbrev-ref HEAD"
      +branch = subprocess.run(command, capture_output=True, text=True, shell=True).stdout.strip()
      +
      +command = f"git diff develop..{branch}"
       diff = subprocess.run(command, capture_output=True, cwd=root.strip(), text=True, shell=True).stdout
       found = False
       found_primitives = []
      

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            etienne.petrel@mongodb.com Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: