{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/hcsshim/issues/284","repository_url":"https://api.github.com/repos/Microsoft/hcsshim","labels_url":"https://api.github.com/repos/Microsoft/hcsshim/issues/284/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/hcsshim/issues/284/comments","events_url":"https://api.github.com/repos/Microsoft/hcsshim/issues/284/events","html_url":"https://github.com/Microsoft/hcsshim/issues/284","id":350190179,"node_id":"MDU6SXNzdWUzNTAxOTAxNzk=","number":284,"title":"Confusing parameter","user":{"login":"liangyuRain","id":33206816,"node_id":"MDQ6VXNlcjMzMjA2ODE2","avatar_url":"https://avatars1.githubusercontent.com/u/33206816?v=4","gravatar_id":"","url":"https://api.github.com/users/liangyuRain","html_url":"https://github.com/liangyuRain","followers_url":"https://api.github.com/users/liangyuRain/followers","following_url":"https://api.github.com/users/liangyuRain/following{/other_user}","gists_url":"https://api.github.com/users/liangyuRain/gists{/gist_id}","starred_url":"https://api.github.com/users/liangyuRain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liangyuRain/subscriptions","organizations_url":"https://api.github.com/users/liangyuRain/orgs","repos_url":"https://api.github.com/users/liangyuRain/repos","events_url":"https://api.github.com/users/liangyuRain/events{/privacy}","received_events_url":"https://api.github.com/users/liangyuRain/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-08-13T20:53:53Z","updated_at":"2018-08-14T17:37:18Z","closed_at":null,"author_association":"NONE","body":"In [layer.go](https://github.com/Microsoft/hcsshim/blob/6c511c0a92bf6ec952336c6cc5bcf4884dda572c/layer.go#L23-L28), the `CreateSandboxLayer` and `CreateScratchLayer` functions both have a parameter named `parentId`. It is a natural way to think that this is the parent layer of the layer we want to create, but from line 34 of [create.go](https://github.com/Microsoft/hcsshim/blob/6c511c0a92bf6ec952336c6cc5bcf4884dda572c/cmd/wclayer/create.go#L34), we can deduce that the `parentId` is actually the base layer ID, because the order of paths to read-only parent layers given to `wclayer create` as argument should ends with base layer. Interestingly, the `parentId` parameter is ignored inside the `CreateSandboxLayer` and `CreateScratchLayer` functions, so it does not make any difference in the execution.\r\n\r\nHere, I suggest probably we should delete that parameter. In addition, for argument specifying paths to parent layers like in `create`, `import`, `export`, and `mount`, we probably need a better documentation on the order and how the list should be given. The order should be ending with base layer instead of starting with it, and the list should have `-l` before every element like `-l layer_1 -l layer_2 -l layer_3`."},"comment":{"url":"https://api.github.com/repos/Microsoft/hcsshim/issues/comments/412954821","html_url":"https://github.com/Microsoft/hcsshim/issues/284#issuecomment-412954821","issue_url":"https://api.github.com/repos/Microsoft/hcsshim/issues/284","id":412954821,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjk1NDgyMQ==","user":{"login":"jterry75","id":5858142,"node_id":"MDQ6VXNlcjU4NTgxNDI=","avatar_url":"https://avatars1.githubusercontent.com/u/5858142?v=4","gravatar_id":"","url":"https://api.github.com/users/jterry75","html_url":"https://github.com/jterry75","followers_url":"https://api.github.com/users/jterry75/followers","following_url":"https://api.github.com/users/jterry75/following{/other_user}","gists_url":"https://api.github.com/users/jterry75/gists{/gist_id}","starred_url":"https://api.github.com/users/jterry75/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jterry75/subscriptions","organizations_url":"https://api.github.com/users/jterry75/orgs","repos_url":"https://api.github.com/users/jterry75/repos","events_url":"https://api.github.com/users/jterry75/events{/privacy}","received_events_url":"https://api.github.com/users/jterry75/received_events","type":"User","site_admin":false},"created_at":"2018-08-14T17:37:18Z","updated_at":"2018-08-14T17:37:18Z","author_association":"CONTRIBUTOR","body":"No you are right. I was just saying we could call it `baseLayerId` to help with documentation when reading the code at least."}}
{"actor":{"display_login":"jterry75"}}