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

clang_format.py's caching mechanism should save tarballs that include the UID

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Build, Usability
    • None

      buildscripts/clang_format.py does this:

      def get_clang_format_from_cache_and_extract(url, tarball_ext):
          """Get clang-format from mongodb's cache and extract the tarball."""
          dest_dir = tempfile.gettempdir()
          temp_tar_file = os.path.join(dest_dir, "temp.tar" + tarball_ext)
      
          # Download from file
          print("Downloading clang-format %s from %s, saving to %s" % (CLANG_FORMAT_VERSION, url,
                                                                       temp_tar_file))
      

      It tries to download, and cache, the clang-format binary into /tmp/temp.tar.gz. Unfortunately, if two Linux accounts are trying to run clang_format.py, only one can successfully download the binary.

      To fix this, the cache path the script saves the tarball into should contain something unique to the account, likely the UID.

            Assignee:
            backlog-server-devtools DO NOT USE - Backlog - Dev Tools
            Reporter:
            spencer.jackson@mongodb.com Spencer Jackson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: