Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to go 1.22 #2136

Merged
merged 1 commit into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- main
env:
CARGO_TERM_COLOR: always
GO_VERSION: '1.21'
GO_VERSION: '1.22'
ACTION_MSRV_TOOLCHAIN: 1.75.0
NIX_VERSION: '2.21.0'
jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

env:
CARGO_TERM_COLOR: always
GO_VERSION: '1.21'
GO_VERSION: '1.22'
ACTION_MSRV_TOOLCHAIN: 1.75.0

jobs:
Expand Down
2 changes: 1 addition & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
dependencies:
- name: go
version: 1.21
version: 1.22
refPaths:
- path: go.mod
match: go
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/containers/conmon-rs

go 1.21
go 1.22

require (
capnproto.org/go/capnp/v3 v3.0.0-alpha.25
Expand Down
9 changes: 7 additions & 2 deletions pkg/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,11 @@ var _ = Describe("JSONLogger", func() {
for _, terminal := range []bool{true, false} {
It(testName("should log in JSON format", terminal), func() {
tr = newTestRunner()
tr.createRuntimeConfigWithProcessArgs(terminal, []string{"invalid"}, nil)
tr.createRuntimeConfigWithProcessArgs(
terminal,
[]string{"/busybox", "sh", "-c", "echo hello && echo world"},
nil,
)

sut = tr.configGivenEnv()
_, err := sut.CreateContainer(context.Background(), &client.CreateContainerConfig{
Expand All @@ -707,7 +711,8 @@ var _ = Describe("JSONLogger", func() {
Path: tr.logPath(),
}},
})
Expect(err).To(HaveOccurred())
Expect(err).NotTo(HaveOccurred())
tr.startContainer(sut)
Comment on lines +714 to +715
Copy link
Collaborator

Choose a reason for hiding this comment

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

it's not clear to me why this switched

Copy link
Member Author

Choose a reason for hiding this comment

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

I changed the container above to actually be valid. Fun fact is that the for loop for _, terminal := range []bool{true, false} { in go 1.21 (ginkgo related?) does not work for true, but it works in go 1.22.


logContent, err := os.ReadFile(tr.logPath())
Expect(err).NotTo(HaveOccurred())
Expand Down
Loading