weaveworks / pipeline-controller

This repository contains the Pipeline CRD and associated controller for Weave GitOps Enterprise.
1 stars 4 forks source link

Add rate limiting to promotion webhook #32

Closed makkes closed 1 year ago

yitsushi commented 1 year ago

Reopening because:

It seems all commits were happy about the tests, but it can fail

?       github.com/weaveworks/pipeline-controller   [no test files]
--- FAIL: TestReconcile (2.59s)
    pipeline_controller_test.go:80: 
        Expected
            <[]controllers.testEvent | len:0, cap:0>: []
        not to be empty
    --- FAIL: TestReconcile/sets_reconciliation_succeeded_condition_without_clusterRef (0.01s)
panic: runtime error: index out of range [0] with length 0 [recovered]
    panic: runtime error: index out of range [0] with length 0

goroutine 612 [running]:
testing.tRunner.func1.2({0x16a8fc0, 0xc0006b6f78})
    /opt/hostedtoolcache/go/1.19.4/x64/src/testing/testing.go:1396 +0x24e
testing.tRunner.func1()
    /opt/hostedtoolcache/go/1.19.4/x64/src/testing/testing.go:1399 +0x39f
panic({0x16a8fc0, 0xc0006b6f78})
    /opt/hostedtoolcache/go/1.19.4/x64/src/runtime/panic.go:884 +0x212
github.com/weaveworks/pipeline-controller/controllers.TestReconcile.func3(0xc000313901?)
    /home/runner/work/pipeline-controller/pipeline-controller/controllers/pipeline_controller_test.go:81 +0x569
testing.tRunner(0xc00071c680, 0xc000389f40)
    /opt/hostedtoolcache/go/1.19.4/x64/src/testing/testing.go:1446 +0x10b
created by testing.(*T).Run
    /opt/hostedtoolcache/go/1.19.4/x64/src/testing/testing.go:1493 +0x35f

First run: https://github.com/weaveworks/pipeline-controller/actions/runs/3766385257/jobs/6402830164 Rerun: https://github.com/weaveworks/pipeline-controller/actions/runs/3766385257

So it's green, but not always.