Skip to content

[release/1.2 backport] update Go 1.12 and travis/appveyor changes#3342

Merged
estesp merged 4 commits intocontainerd:release/1.2from
thaJeztah:1.2_backport_travis_and_golang
Jun 17, 2019
Merged

[release/1.2 backport] update Go 1.12 and travis/appveyor changes#3342
estesp merged 4 commits intocontainerd:release/1.2from
thaJeztah:1.2_backport_travis_and_golang

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah commented Jun 14, 2019

[release/1.2 backport] update Go 1.12 and travis/appveyor changes

not included

Travis;

AppVeyor;

# https://github.com/containerd/containerd/pull/3040 Update travis to xenial worker
git cherry-pick -s -S -x 5e8406984480ab81439103e2b95c1234006ddbe6

# https://github.com/containerd/containerd/pull/2896 Add Golang 1.12.5
git cherry-pick -s -S -x 00bc2f5cfd437625c376bd1f14a28249a12e403b
# some conflicts due to missing other commits (see below)
git cherry-pick -s -S -x 543d1e807fbbdbcd998052fa1955c18b0604f56e

# https://github.com/containerd/containerd/pull/3343 AppVeyor: Bump golang 1.12.6
git cherry-pick -s -S -x 67cf9f7f025cff3e928641eca9076dce98db1e47 

conflicts (due to #3205 not included);

Details
diff --cc .appveyor.yml
index 739a8517,2cf40452..00000000
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@@ -13,7 -12,7 +13,11 @@@ environment
    GOPATH: C:\gopath
    CGO_ENABLED: 1
    matrix:
++<<<<<<< HEAD
 +    - GO_VERSION: 1.11
++=======
+     - GO_VERSION: 1.12.5
++>>>>>>> 00bc2f5c... Update to Golang 1.12, and prepare for ppc64le
  
  before_build:
    - choco install -y mingw --version 5.3.0
diff --cc .travis.yml
index ec01c66f,3fc80f6c..00000000
--- a/.travis.yml
+++ b/.travis.yml
@@@ -29,8 -38,8 +38,7 @@@ addons
  
  env:
    - TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v1 TRAVIS_CGO_ENABLED=1
 -  - TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v2 TRAVIS_CGO_ENABLED=1
    - TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runtime.v1.linux TRAVIS_CGO_ENABLED=1
-   - TRAVIS_GOOS=darwin TRAVIS_CGO_ENABLED=0
  
  before_install:
    - uname -r
@@@ -67,20 -76,27 +75,31 @@@ script
    - if [ "$GOOS" = "linux" ]; then make check-protos check-api-descriptors; fi
    - make build
    - make binaries
-   - if [ "$GOOS" = "linux" ]; then sudo make install ; fi
-   - if [ "$GOOS" = "linux" ]; then make coverage ; fi
-   - if [ "$GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH make root-coverage ; fi
-   - if [ "$GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH make integration ; fi
+   - if [ "$TRAVIS_GOOS" = "linux" ]; then sudo make install ; fi
+   - if [ "$TRAVIS_GOOS" = "linux" ]; then make coverage ; fi
+   - if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH make root-coverage ; fi
+   - if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH make integration ; fi
    # Run the integration suite a second time. See discussion in github.com/containerd/containerd/pull/1759
++<<<<<<< HEAD
 +  - if [ "$GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH TESTFLAGS_PARALLEL=1 make integration ; fi
 +  - if [ "$GOOS" = "linux" ]; then
++=======
+   - if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH TESTFLAGS_PARALLEL=1 make integration ; fi
+   - |
+     if [ "$TRAVIS_GOOS" = "linux" ]; then
+       sudo mkdir -p /etc/containerd
+       sudo bash -c "cat > /etc/containerd/config.toml <<EOF
+       [plugins.cri.containerd.default_runtime]
+         runtime_type = \"${TEST_RUNTIME}\"
+     EOF"
++>>>>>>> 00bc2f5c... Update to Golang 1.12, and prepare for ppc64le
        sudo PATH=$PATH containerd -log-level debug &> /tmp/containerd-cri.log &
 -      sudo ctr version
 -      sudo PATH=$PATH GOPATH=$GOPATH critest --runtime-endpoint=/var/run/containerd/containerd.sock --parallel=8
 -      TEST_RC=$?
 -      test $TEST_RC -ne 0 && cat /tmp/containerd-cri.log
 -      sudo pkill containerd
 -      sudo rm -rf /etc/containerd
 -      test $TEST_RC -eq 0 || /bin/false
 +      sudo ctr version ;
 +      sudo PATH=$PATH GOPATH=$GOPATH critest --runtime-endpoint=/var/run/containerd/containerd.sock --parallel=8 ;
 +      TEST_RC=$? ;
 +      test $TEST_RC -ne 0 && cat /tmp/containerd-cri.log ;
 +      sudo pkill containerd ;
 +      test $TEST_RC -eq 0 || /bin/false ;
      fi
  
  after_success:

crosbymichael and others added 3 commits June 14, 2019 15:37
Signed-off-by: Michael Crosby <[email protected]>
(cherry picked from commit 5e84069)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit 00bc2f5)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Pervent travis from timing out because no output was printed;

    No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit 543d1e8)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Comment thread .appveyor.yml
GOPATH: C:\gopath
CGO_ENABLED: 1
matrix:
- GO_VERSION: 1.11
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

If we want to test both against 1.11 and 1.12, I can add this one back

@thaJeztah

This comment has been minimized.

@thaJeztah
Copy link
Copy Markdown
Member Author

@Random-Liu @jhowardmsft pls check if the commits I excluded are not needed (didn't think they were, but double-checking)

@codecov-io
Copy link
Copy Markdown

codecov-io commented Jun 14, 2019

Codecov Report

Merging #3342 into release/1.2 will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##           release/1.2    #3342   +/-   ##
============================================
  Coverage        43.81%   43.81%           
============================================
  Files              101      101           
  Lines            10780    10780           
============================================
  Hits              4723     4723           
  Misses            5321     5321           
  Partials           736      736
Flag Coverage Δ
#linux 47.44% <ø> (ø) ⬆️
#windows 40.93% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 85f6aa5...1b2230e. Read the comment docs.

@crosbymichael
Copy link
Copy Markdown
Member

LGTM

@thaJeztah
Copy link
Copy Markdown
Member Author

the 1.12.6 bump was merged on master; adding that one

go1.12.6 (released 2019/06/11) includes fixes to the compiler, the linker,
the go command, and the crypto/x509, net/http, and os packages. See the
Go 1.12.6 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.12.6

full diff: golang/go@go1.12.5...go1.12.6

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit 67cf9f7)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
Copy link
Copy Markdown
Member Author

Added 👍

@fuweid
Copy link
Copy Markdown
Member

fuweid commented Jun 14, 2019

hi @thaJeztah , I think the backport should be fix thing, not upgrade thing. Since the v1.2.x are using 1.11 for a while, if we upgrade the go version, it maybe impact the downstream using containerd v1.2. just have concerned about this.

anyway, the golang upgrade action is safety. :p

@thaJeztah
Copy link
Copy Markdown
Member Author

Golang has a shorter support period than containerd; once Go 1.13 is released (August), Go 1.11 becomes EOL, so I think it's good to follow Go versions closely where possible

@thaJeztah
Copy link
Copy Markdown
Member Author

Failure on Windows;

    --- FAIL: TestContentClient/CommitErrorState (3.97s)
1430        testsuite.go:101: Cleanup failed: unknown
1431            github.com/containerd/containerd/errdefs.init.ializers
1432            	C:/gopath/src/github.com/containerd/containerd/errdefs/errors.go:39
1433            runtime.main
1434            	C:/go/src/runtime/proc.go:188
1435            runtime.goexit
1436            	C:/go/src/runtime/asm_amd64.s:1337
1437            could not read updatedat: open C:\Program Files\containerd\root-test\io.containerd.content.v1.content\ingest\9101c5f249b4cb38a50dddda86a787c09f31099573c87c525fc50774ac21d05d\updatedat: The process cannot access the file because it is being used by another process.
1438            github.com/containerd/containerd/errdefs.FromGRPC
1439            	C:/gopath/src/github.com/containerd/containerd/errdefs/grpc.go:98
1440            github.com/containerd/containerd/content/proxy.(*proxyContentStore).ListStatuses
1441            	C:/gopath/src/github.com/containerd/containerd/content/proxy/content_store.go:144
1442            github.com/containerd/containerd.newContentStore.func2
1443            	C:/gopath/src/github.com/containerd/containerd/content_test.go:55
1444            github.com/containerd/containerd/content/testsuite.makeTest.func1.1
1445            	C:/gopath/src/github.com/containerd/containerd/content/testsuite/testsuite.go:100
1446            github.com/containerd/containerd/content/testsuite.makeTest.func1
1447            	C:/gopath/src/github.com/containerd/containerd/content/testsuite/testsuite.go:121
1448            testing.tRunner
1449            	C:/go/src/testing/testing.go:865
1450            runtime.goexit
1451            	C:/go/src/runtime/asm_amd64.s:1337
1452=== RUN   TestOCIExport
1453

The process cannot access the file because it is being used by another process.

@jterry75 @jhowardmsft could that be a platform issue? (I know we've seen similar things on moby)

@fuweid
Copy link
Copy Markdown
Member

fuweid commented Jun 14, 2019

@thaJeztah thanks! agree with you

@estesp
Copy link
Copy Markdown
Member

estesp commented Jun 17, 2019

you hit #2835; known issue. I restarted AppVeyor.

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

@estesp estesp merged commit 5ca28c1 into containerd:release/1.2 Jun 17, 2019
@thaJeztah thaJeztah deleted the 1.2_backport_travis_and_golang branch June 17, 2019 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants