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

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Build, Usability
    • None
    • Developer Tools

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: