Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-5119

Support directory structure in CommandInfo.URI.filename in fetcher

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • fetcher
    • None

    Description

      In MESOS-4735, CommandInfo.URI.filename is added but there is no validation to make sure it's a simple basename, so people can actually specify the filename to be something like path/to/file but the validation won't catch it. The fetch will fail later in download() because it cannot open a destination file without its parent directory.

      Instead of fixing this by disallowing such output filename, we could actually support this behavior. There are use cases where multiple fetch targets have the same basename but they are organized by a directory hierarchy.

      root/app.dat
      root/parent/app.dat
      root/parent/child/app.dat
      

      It looks to me that supporting this is straightforward and we just need to 1) make sure the output path is within the sandbox and 2) recursively mkdirs for the parent dirs.

      Attachments

        Issue Links

          Activity

            People

              mrbrowning Michael Browning
              xujyan Yan Xu
              Yan Xu Yan Xu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: