Skip to content

docker-py: skip flaky AttachContainerTest::test_attach_no_stream (again)#40500

Merged
cpuguy83 merged 1 commit intomoby:masterfrom
thaJeztah:docker_py_skip_flaky
Feb 12, 2020
Merged

docker-py: skip flaky AttachContainerTest::test_attach_no_stream (again)#40500
cpuguy83 merged 1 commit intomoby:masterfrom
thaJeztah:docker_py_skip_flaky

Conversation

@thaJeztah
Copy link
Member

relates to docker/docker-py#2513

This test was disabled in the past (#39848), but re-enabled when we upgraded docker-py to 4.2.0 (#40467).

The test looks to be still flaky though, so skipping it again:

[2020-02-10T23:40:44.429Z] =================================== FAILURES ===================================
[2020-02-10T23:40:44.429Z] __________________ AttachContainerTest.test_attach_no_stream ___________________
[2020-02-10T23:40:44.429Z] tests/integration/api_container_test.py:1250: in test_attach_no_stream
[2020-02-10T23:40:44.429Z]     assert output == 'hello\n'.encode(encoding='ascii')
[2020-02-10T23:40:44.429Z] E   AssertionError: assert b'' == b'hello\n'
[2020-02-10T23:40:44.429Z] E     Right contains more items, first extra item: 104
[2020-02-10T23:40:44.429Z] E     Use -v to get the full diff
[2020-02-10T23:40:44.429Z] ------- generated xml file: /src/bundles/test-docker-py/junit-report.xml -------

@thaJeztah
Copy link
Member Author

Interesting; it's now complaining about other gofmt issues;


[2020-02-11T15:03:07.058Z] daemon/logger/splunk/splunk_test.go:33: File is not `goimports`-ed (goimports)
[2020-02-11T15:03:07.058Z] 		envKey:      "a",
[2020-02-11T15:03:07.058Z] 		envRegexKey: "^foo",
[2020-02-11T15:03:07.058Z] 		labelsKey:   "b",
[2020-02-11T15:03:07.058Z] 		tagKey:      "c",
[2020-02-11T15:03:07.058Z] integration/build/build_test.go:41: File is not `goimports`-ed (goimports)
[2020-02-11T15:03:07.058Z] 			rm:      false,
[2020-02-11T15:03:07.058Z] 			forceRm: false,
[2020-02-11T15:03:07.058Z] integration/image/remove_unix_test.go:49: File is not `goimports`-ed (goimports)
[2020-02-11T15:03:07.058Z] 		Root: d.Root,

I thought I rebased, but let me try again

@AkihiroSuda
Copy link
Member

@thaJeztah those goimports errors were not covered in https://github.com/moby/moby/pull/40501/files .

Curious, are we linting a random set of *.go files per CI invocation?

@thaJeztah
Copy link
Member Author

That's what I'm curious about as well. I know golangci-lint has a configurable limit of warnings per type of linting, but that wouldn't explain why it would completely ignore things

@thaJeztah thaJeztah force-pushed the docker_py_skip_flaky branch from 32ab61c to 001820c Compare February 11, 2020 22:22
@thaJeztah
Copy link
Member Author

CI Failure is unrelated; Windows image failed to be built for unknown reasons (output isn't very useful);

[2020-02-11T22:25:44.491Z] Step 6/10 : RUN   Function Test-Nano() {     $EditionId = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' -Name 'EditionID').EditionId;     return (($EditionId -eq 'ServerStandardNano') -or ($EditionId -eq 'ServerDataCenterNano') -or ($EditionId -eq 'NanoServer'));   }    Function Download-File([string] $source, [string] $target) {     if (Test-Nano) {       $handler = New-Object System.Net.Http.HttpClientHandler;       $client = New-Object System.Net.Http.HttpClient($handler);       $client.Timeout = New-Object System.TimeSpan(0, 30, 0);       $cancelTokenSource = [System.Threading.CancellationTokenSource]::new();       $responseMsg = $client.GetAsync([System.Uri]::new($source), $cancelTokenSource.Token);       $responseMsg.Wait();       if (!$responseMsg.IsCanceled) {         $response = $responseMsg.Result;         if ($response.IsSuccessStatusCode) {           $downloadedFileStream = [System.IO.FileStream]::new($target, [System.IO.FileMode]::Create, [System.IO.FileAccess]::Write);           $copyStreamOp = $response.Content.CopyToAsync($downloadedFileStream);           $copyStreamOp.Wait();           $downloadedFileStream.Close();           if ($copyStreamOp.Exception -ne $null) { throw $copyStreamOp.Exception }         }       } else {       Throw ("Failed to download " + $source)       }    } else {       $webClient = New-Object System.Net.WebClient;       $webClient.DownloadFile($source, $target);     }   }     setx /M PATH $('C:\git\cmd;C:\git\usr\bin;'+$Env:PATH+';C:\gcc\bin;C:\go\bin');     Write-Host INFO: Downloading git...;   $location='https://www.nuget.org/api/v2/package/GitForWindows/'+$Env:GIT_VERSION;   Download-File $location C:\gitsetup.zip;     Write-Host INFO: Downloading go...;   $dlGoVersion=$Env:GO_VERSION -replace '\.0$','';   Download-File "https://golang.org/dl/go${dlGoVersion}.windows-amd64.zip" C:\go.zip;     Write-Host INFO: Downloading compiler 1 of 3...;   Download-File https://raw.githubusercontent.com/moby/docker-tdmgcc/master/gcc.zip C:\gcc.zip;     Write-Host INFO: Downloading compiler 2 of 3...;   Download-File https://raw.githubusercontent.com/moby/docker-tdmgcc/master/runtime.zip C:\runtime.zip;     Write-Host INFO: Downloading compiler 3 of 3...;   Download-File https://raw.githubusercontent.com/moby/docker-tdmgcc/master/binutils.zip C:\binutils.zip;     Write-Host INFO: Extracting git...;   Expand-Archive C:\gitsetup.zip C:\git-tmp;   New-Item -Type Directory C:\git | Out-Null;   Move-Item C:\git-tmp\tools\* C:\git\.;   Remove-Item -Recurse -Force C:\git-tmp;     Write-Host INFO: Expanding go...;   Expand-Archive C:\go.zip -DestinationPath C:\;     Write-Host INFO: Expanding compiler 1 of 3...;   Expand-Archive C:\gcc.zip -DestinationPath C:\gcc -Force;   Write-Host INFO: Expanding compiler 2 of 3...;   Expand-Archive C:\runtime.zip -DestinationPath C:\gcc -Force;   Write-Host INFO: Expanding compiler 3 of 3...;   Expand-Archive C:\binutils.zip -DestinationPath C:\gcc -Force;     Write-Host INFO: Removing downloaded files...;   Remove-Item C:\gcc.zip;   Remove-Item C:\runtime.zip;   Remove-Item C:\binutils.zip;   Remove-Item C:\gitsetup.zip;     $srcDir = """$Env:GOPATH`\src\github.com\docker\docker\bundles""";   Write-Host INFO: Ensuring existence of directory $srcDir...;   New-Item -Force -ItemType Directory -Path $srcDir | Out-Null;     Write-Host INFO: Configuring git core.autocrlf...;   C:\git\cmd\git config --global core.autocrlf true;
[2020-02-11T22:25:44.491Z]  ---> Running in 1b0dc0931cbb
[2020-02-11T23:25:59.557Z] 
[2020-02-11T23:25:59.557Z] 
[2020-02-11T23:25:59.557Z] ERROR: Failed 'ERROR: Failed to build image from Dockerfile.windows' at 02/11/2020 23:25:46
[2020-02-11T23:25:59.557Z] At D:\gopath\src\github.com\docker\docker\hack\ci\windows.ps1:483 char:12
[2020-02-11T23:25:59.557Z] +            Throw "ERROR: Failed to build image from Dockerfile.window ...
[2020-02-11T23:25:59.557Z] +            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2020-02-11T23:25:59.557Z] 

@thaJeztah
Copy link
Member Author

Windows docker build failing again for no obvious reason 😞

@StefanScherer
Copy link
Contributor

The windows docker build error seems to be related to yesterday's Patch Tuesday.
With the base image mcr.microsoft.com/windows/servercore:10.0.17763.1039 I cannot build something like this

FROM mcr.microsoft.com/windows/servercore:10.0.17763.1039
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
RUN Write-Host it works!

A docker build . just hangs. If I use 10.0.17763.973 the previous image, it works.

/cc @taylorb-microsoft

This test was disabled in the past, but re-enabled when we upgraded
docker-py to 4.2.0.

The test looks to be still flaky though, so skipping it again:

```
[2020-02-10T23:40:44.429Z] =================================== FAILURES ===================================
[2020-02-10T23:40:44.429Z] __________________ AttachContainerTest.test_attach_no_stream ___________________
[2020-02-10T23:40:44.429Z] tests/integration/api_container_test.py:1250: in test_attach_no_stream
[2020-02-10T23:40:44.429Z]     assert output == 'hello\n'.encode(encoding='ascii')
[2020-02-10T23:40:44.429Z] E   AssertionError: assert b'' == b'hello\n'
[2020-02-10T23:40:44.429Z] E     Right contains more items, first extra item: 104
[2020-02-10T23:40:44.429Z] E     Use -v to get the full diff
[2020-02-10T23:40:44.429Z] ------- generated xml file: /src/bundles/test-docker-py/junit-report.xml -------
````

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah force-pushed the docker_py_skip_flaky branch from 001820c to da6c142 Compare February 12, 2020 17:38
Copy link
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cpuguy83 cpuguy83 merged commit 38ce975 into moby:master Feb 12, 2020
@thaJeztah thaJeztah deleted the docker_py_skip_flaky branch February 12, 2020 21:41
@thaJeztah thaJeztah added this to the 20.03.0 milestone Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants