Skip to content

Commit 28e6a82

Browse files
authored
Merge pull request #10264 from mook-as/release-1.22/moby-openapi-revert
Revert moby-openapi changes in release-1.22 branch
2 parents 37a4e6d + a88a2c9 commit 28e6a82

5 files changed

Lines changed: 8 additions & 7 deletions

File tree

scripts/dependencies/moby-openapi.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ export class MobyOpenAPISpec extends GlobalDependency(VersionedDependency) {
1818
readonly releaseFilter = 'custom';
1919

2020
async download(context: DownloadContext): Promise<void> {
21-
const baseUrl = `https://raw.githubusercontent.com/${ this.githubOwner }/${ this.githubRepo }/master/api/docs`;
21+
const commit = 'b0c8ff7d0c990d28e67d0df3432abcdf6804d847';
22+
const baseUrl = `https://raw.githubusercontent.com/${ this.githubOwner }/${ this.githubRepo }/${ commit }/api/docs`;
2223
const url = `${ baseUrl }/v${ context.versions.mobyOpenAPISpec }.yaml`;
2324
const outPath = path.join(process.cwd(), 'src', 'go', 'wsl-helper', 'pkg', 'dockerproxy', 'swagger.yaml');
2425
const modifiedPath = path.join(path.dirname(outPath), 'swagger-modified.yaml');

src/go/wsl-helper/pkg/dockerproxy/mungers/containers_create_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func (b *bindManager) mungeContainersCreateRequest(req *http.Request, contextVal
238238

239239
for _, mount := range body.HostConfig.Mounts {
240240
logEntry := logrus.WithField("mount", fmt.Sprintf("%+v", mount))
241-
if mount.Type.MountType != "bind" {
241+
if mount.Type != "bind" {
242242
logEntry.Trace("skipping mount of unsupported type")
243243
continue
244244
}

src/go/wsl-helper/pkg/dockerproxy/mungers/containers_create_linux_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ func TestContainersCreate(t *testing.T) {
162162
Consistency: "cached",
163163
Source: bindPath,
164164
Target: "/host",
165-
Type: struct{ models.MountType }{"bind"},
165+
Type: "bind",
166166
}
167167
buf, err := json.Marshal(&containersCreateRequestBody{
168168
HostConfig: models.HostConfig{
@@ -219,7 +219,7 @@ func TestContainersCreate(t *testing.T) {
219219
Consistency: "cached",
220220
Source: path.Join(bindManager.mountRoot, mountID),
221221
Target: "/host",
222-
Type: struct{ models.MountType }{"bind"},
222+
Type: "bind",
223223
},
224224
}, requestBody.HostConfig.Mounts)
225225
assert.Equal(t, "hello", responseBody.ID)

src/go/wsl-helper/pkg/dockerproxy/mungers/containers_create_windows.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ func mungeContainersCreate(req *http.Request, contextValue *dockerproxy.RequestC
6868
if mount == nil {
6969
continue
7070
}
71-
if mount.Type.MountType == "npipe" {
71+
if mount.Type == "npipe" {
7272
logrus.WithField("mount", mount).Warn("named pipes are not supported")
7373
}
74-
if mount.Type.MountType != "bind" {
74+
if mount.Type != "bind" {
7575
// We only support bind mounts for now
7676
continue
7777
}

src/go/wsl-helper/pkg/dockerproxy/mungers/containers_create_windows_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func TestContainersCreate(t *testing.T) {
7272
Consistency: "cached",
7373
Source: bindPath,
7474
Target: "/host",
75-
Type: struct{ models.MountType }{"bind"},
75+
Type: "bind",
7676
}
7777
body := containersCreateBody{
7878
HostConfig: models.HostConfig{

0 commit comments

Comments
 (0)