You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Gilbert Song <so...@gmail.com> on 2016/11/28 15:23:29 UTC
Re: Review Request 53695: Allows caching extractable files when
outputFile is set.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/53695/#review157032
-----------------------------------------------------------
src/launcher/fetcher.cpp (line 61)
<https://reviews.apache.org/r/53695/#comment227417>
you can use `None()` instead of `Option<string>::none()`.
src/launcher/fetcher.cpp (lines 346 - 347)
<https://reviews.apache.org/r/53695/#comment227418>
Just some style nits:
```
Try<bool> extracted = extract(
sourcePath,
sandboxDirectory,
outputFile.get());
- Gilbert Song
On Nov. 14, 2016, 7:02 a.m., Stephen Hankinson wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53695/
> -----------------------------------------------------------
>
> (Updated Nov. 14, 2016, 7:02 a.m.)
>
>
> Review request for mesos, Gilbert Song and Jie Yu.
>
>
> Bugs: MESOS-6587
> https://issues.apache.org/jira/browse/MESOS-6587
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Allows caching extractable files when outputFile is set.
>
>
> Diffs
> -----
>
> src/launcher/fetcher.cpp 4456c28139966e42859cc6d2c79a1d90e83fb22f
> src/tests/fetcher_cache_tests.cpp 03e817d46194d451eceb70f4cebb54dfdcb4c2e7
>
> Diff: https://reviews.apache.org/r/53695/diff/
>
>
> Testing
> -------
>
> A new test, FetcherCacheTest.LocalCachedExtractCustomOutputFile, was created to confirm that when a URI is created with cached: true, extract: true, a custom outputFile with a proper compression suffix set, and an original URI that doesn't end with a proper compression suffix fails to extract properly from the cache.
>
> The test makes a copy of the test archive in the cache but appends "misc" to the end, forming an invalid compression suffix, causing mesos-fetcher-test-archive.tgz to become mesos-fetcher-test-archive.tgzmisc. The URI path is set to this modified location. The outputFile of the URI is set ARCHIVE_NAME which ends with a valid compression suffix, so therefore should extract properly.
>
> At the end of the test the temporary cached archive file (mesos-fetcher-test-archive.tgzmisc) is deleted.
>
> Before the patch was written this test was failing as expected. After implementing the patch, this and all other tests were passing.
>
>
> Thanks,
>
> Stephen Hankinson
>
>