Skip to content

Commit dbd09c9

Browse files
authored
Remove unused outputChan (#691)
1 parent 0ef2b53 commit dbd09c9

File tree

3 files changed

+0
-7
lines changed

3 files changed

+0
-7
lines changed

pkg/build/gcb/executor.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ func (e *Executor) Start(ctx context.Context, input rebuild.Input, opts build.Op
107107
id: buildID,
108108
executor: e,
109109
output: pipe,
110-
outputChan: make(chan string, 100),
111110
resultChan: make(chan build.Result, 1),
112111
cancelPolicy: opts.CancelPolicy,
113112
status: build.BuildStateStarting,
@@ -166,7 +165,6 @@ func (e *Executor) Close(ctx context.Context) error {
166165

167166
// executeBuild runs the actual build process using Cloud Build
168167
func (e *Executor) executeBuild(ctx context.Context, handle *gcbHandle, cloudBuild *cloudbuild.Build, input rebuild.Input, opts build.Options, plan *Plan) {
169-
defer close(handle.outputChan)
170168
// Construct BuildInfo to be incrementally set.
171169
buildInfo := rebuild.BuildInfo{
172170
Target: input.Target,

pkg/build/gcb/handle.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ type gcbHandle struct {
1818
executor *Executor
1919
operation *cloudbuild.Operation
2020
output io.ReadWriteCloser // BufferedPipe for streaming output
21-
outputChan chan string
2221
resultChan chan build.Result
2322
cancelPolicy build.CancelPolicy
2423

pkg/build/gcb/handle_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ func TestGCBHandle(t *testing.T) {
3737
id: "test-build-123",
3838
executor: executor,
3939
output: pipe,
40-
outputChan: make(chan string, 100),
4140
resultChan: make(chan build.Result, 1),
4241
cancelPolicy: build.CancelImmediate,
4342
status: build.BuildStateStarting,
@@ -120,7 +119,6 @@ func TestGCBHandleWait(t *testing.T) {
120119
id: "test-build-123",
121120
executor: executor,
122121
output: pipe,
123-
outputChan: make(chan string, 100),
124122
resultChan: make(chan build.Result, 1),
125123
cancelPolicy: build.CancelImmediate,
126124
status: build.BuildStateStarting,
@@ -161,7 +159,6 @@ func TestGCBHandleWaitSuccess(t *testing.T) {
161159
id: "test-build-123",
162160
executor: executor,
163161
output: pipe,
164-
outputChan: make(chan string, 100),
165162
resultChan: make(chan build.Result, 1),
166163
cancelPolicy: build.CancelImmediate,
167164
status: build.BuildStateStarting,
@@ -222,7 +219,6 @@ func TestGCBHandleCancelPolicies(t *testing.T) {
222219
executor: executor,
223220
operation: operation,
224221
output: pipe,
225-
outputChan: make(chan string, 100),
226222
resultChan: make(chan build.Result, 1),
227223
cancelPolicy: tc.cancelPolicy,
228224
status: build.BuildStateRunning,

0 commit comments

Comments
 (0)