Skip to content

Commit 392f43d

Browse files
authored
Merge branch 'master' into inspect-container-panic
2 parents 555c85f + 859dd37 commit 392f43d

File tree

5 files changed

+10
-16
lines changed

5 files changed

+10
-16
lines changed

executor/context_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func TestExecutor_FromContext(t *testing.T) {
5555
want Engine
5656
}{
5757
{
58-
// nolint: staticcheck // ignore using string with context value
58+
// nolint: staticcheck,revive // ignore using string with context value
5959
context: context.WithValue(context.Background(), key, _engine),
6060
want: _engine,
6161
},
@@ -64,7 +64,7 @@ func TestExecutor_FromContext(t *testing.T) {
6464
want: nil,
6565
},
6666
{
67-
// nolint: staticcheck // ignore using string with context value
67+
// nolint: staticcheck,revive // ignore using string with context value
6868
context: context.WithValue(context.Background(), key, "foo"),
6969
want: nil,
7070
},
@@ -173,7 +173,7 @@ func TestExecutor_WithContext(t *testing.T) {
173173
t.Errorf("unable to create linux engine: %v", err)
174174
}
175175

176-
// nolint: staticcheck // ignore using string with context value
176+
// nolint: staticcheck,revive // ignore using string with context value
177177
want := context.WithValue(context.Background(), key, _engine)
178178

179179
// run test

mock/docker/docker.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const Version = "v1.40"
2323

2424
// New returns a client that is capable of handling
2525
// Docker client calls and returning stub responses.
26+
// nolint:revive // ignore unexported type as it is intentional
2627
func New() (*mock, error) {
2728
return &mock{
2829
ConfigService: ConfigService{},

runtime/context_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func TestRuntime_FromContext(t *testing.T) {
2929
want Engine
3030
}{
3131
{
32-
// nolint: staticcheck // ignore using string with context value
32+
// nolint: staticcheck,revive // ignore using string with context value
3333
context: context.WithValue(context.Background(), key, _engine),
3434
want: _engine,
3535
},
@@ -38,7 +38,7 @@ func TestRuntime_FromContext(t *testing.T) {
3838
want: nil,
3939
},
4040
{
41-
// nolint: staticcheck // ignore using string with context value
41+
// nolint: staticcheck,revive // ignore using string with context value
4242
context: context.WithValue(context.Background(), key, "foo"),
4343
want: nil,
4444
},
@@ -109,7 +109,7 @@ func TestRuntime_WithContext(t *testing.T) {
109109
t.Errorf("unable to create runtime engine: %v", err)
110110
}
111111

112-
// nolint: staticcheck // ignore using string with context value
112+
// nolint: staticcheck,revive // ignore using string with context value
113113
want := context.WithValue(context.Background(), key, _engine)
114114

115115
// run test

runtime/kubernetes/build.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
func (c *client) InspectBuild(ctx context.Context, b *pipeline.Build) ([]byte, error) {
2424
c.Logger.Tracef("inspecting build pod for pipeline %s", b.ID)
2525

26-
output := []byte(fmt.Sprintf("> Inspecting pod for pipeline %s", b.ID))
26+
output := []byte(fmt.Sprintf("> Inspecting pod for pipeline %s\n", b.ID))
2727

2828
// TODO: The environment gets populated in AssembleBuild, after InspectBuild runs.
2929
// But, we should make sure that secrets can't be leaked here anyway.

runtime/kubernetes/container.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -259,15 +259,8 @@ func (c *client) TailContainer(ctx context.Context, ctn *pipeline.Container) (io
259259
//
260260
// https://pkg.go.dev/k8s.io/api/core/v1?tab=doc#PodLogOptions
261261
opts := &v1.PodLogOptions{
262-
Container: ctn.ID,
263-
Follow: true,
264-
// steps can exit quickly, and might be gone before
265-
// log tailing has started, so we need to request
266-
// logs for previously exited containers as well.
267-
// Pods get deleted after job completion, and names for
268-
// pod+container don't get reused. So, previous
269-
// should only retrieve logs for the current build step.
270-
Previous: true,
262+
Container: ctn.ID,
263+
Follow: true,
271264
Timestamps: false,
272265
}
273266

0 commit comments

Comments
 (0)