mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jie Yu <yujie....@gmail.com>
Subject Re: Review Request 68454: Windows: Fetch blobs with V2S2 Docker image manifest.
Date Thu, 23 Aug 2018 06:08:31 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68454/#review207803
-----------------------------------------------------------



I am perfectly fine if you combine this patch with the previous patch if that's easier.


src/uri/fetchers/docker.cpp
Line 861 (original), 906 (patched)
<https://reviews.apache.org/r/68454/#comment291311>

    this is wierd in this patch. Can you make sure it's in the previous patch? `git add -p`
is your friend.



src/uri/fetchers/docker.cpp
Lines 979 (patched)
<https://reviews.apache.org/r/68454/#comment291314>

    I'd pass the http code here so that we only do the rest if the code is 404.



src/uri/fetchers/docker.cpp
Lines 981 (patched)
<https://reviews.apache.org/r/68454/#comment291313>

    Caller is responsible for printing errors. No need for the VLOG here, please do:
    ```
    return Failure(
        "Failed to read schema 2 manifest: " +
        _manifest.error());
    ```



src/uri/fetchers/docker.cpp
Lines 987-988 (patched)
<https://reviews.apache.org/r/68454/#comment291318>

    Ditto. No need for VLOG



src/uri/fetchers/docker.cpp
Lines 1003 (patched)
<https://reviews.apache.org/r/68454/#comment291320>

    Ditto.



src/uri/fetchers/docker.cpp
Lines 1009-1016 (patched)
<https://reviews.apache.org/r/68454/#comment291327>

    I wouldn't use `onAny` here. The following is probably better:
    
    ```
    Future<Nothing> urlFetchBlob(...)
    {
      // Calculate urls
      ...
      
      return _urlFetchBlob(blobUri, directory, authHeaders, urls);
    }
    
    Future<Nothing> _urlFetchBlob(
        const URI& blobUri,
        const string& directory,
        const http::Headers& authHeaders,
        vector<string> urls)
    {
      if (urls.empty()) {
        return Failure("...");
      }
      
      string url = urls.back();
      urls.pop_back();
      
      return download(...)
        .then(defer(self(), [=](int code) {
          if (code == http::Status::OK) {
            return Nothing();
          }
        
          return _urlFetchBlob(blobUri, directory, authHeaders, urls);
        });
    }
    ```


- Jie Yu


On Aug. 21, 2018, 9:30 p.m., Liangyu Zhao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68454/
> -----------------------------------------------------------
> 
> (Updated Aug. 21, 2018, 9:30 p.m.)
> 
> 
> Review request for mesos, Akash Gupta, Andrew Schwartzmeyer, Gilbert Song, Jie Yu, Joseph
Wu, and Qian Zhang.
> 
> 
> Bugs: MESOS-9159
>     https://issues.apache.org/jira/browse/MESOS-9159
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> In addition to fetching from DockerHub, DockerFetcher now support
> fetching from foreign URLs provided in V2S2 Docker image manifest.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/path.hpp ef5a2f3d14cc8cf7416ded5cad00d30a49fd5cf7 
>   3rdparty/stout/tests/path_tests.cpp 452865b919c0d3644eb0ece0e17e402318aaff41 
>   src/uri/fetchers/docker.cpp 55ca118660872a933a2dc186723bec6a39ee80f7 
> 
> 
> Diff: https://reviews.apache.org/r/68454/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Liangyu Zhao
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message