|
Ran
|
Jobs
1
|
Files
595
|
Run time
1min
|
Badge
README BADGES
|
push
github
Add timeouts to the contexts in TestLoadSessionHandle (#6022) ## Summary https://github.com/pomerium/pomerium/pull/6011 wants to bump `google.golang.org/grpc` from v1.77.0 to v1.78.0. [1] That is causing TestLoadSessionHandle in github.com/pomerium/pomerium/proxy to time out after 10 minutes. The tests create new proxies and call ServeHTTP on test requests. That execution gets all the way to [GetDataBrokerRecord in querier.go](https://github.com/pomerium/pomerium/blob/ba0fcffe8/pkg/storage/querier.go#L70-L95), where it stalls out on `res, err := q.Query(ctx, req, grpc.WaitForReady(true))`. What I think is happening is `grpc.WaitForReady(true)` makes `q.Query` wait for the GRPC client to connect to the server. [grpc-go v1.78.0](https://github.com/grpc/grpc-go/releases/tag/v1.78.0) fixes a [bug](https://github.com/grpc/grpc-go/pull/8710) where the client would stay in the IDLE state while trying to connect to the GRPC server. What happens now is the client moves to the TRANSIENT_FAILURE state. The WaitForReady option sees TRANSIENT_FAILURE and waits until that failure fixes itself. By setting a timeout in the context, we pass that context to `q.Query` eventually, the timeout fires, and GetDataBrokerRecord returns, which is what the test expected all along. [1]: I bisected the go.mod file in that branch to figure out which dependency was causing the test to time out. ## Related issues https://github.com/pomerium/pomerium/pull/6011 https://github.com/grpc/grpc-go/pull/8710 ## User Explanation This fixes a bug that was causing a test to fail. The test was relying on a bug in the grpc-go client, which was fixed. ## Checklist - [x] reference any related issues - [x] updated unit tests - [x] add appropriate label (`enhancement`, `bug`, `breaking`, `dependencies`, `ci`) - [x] ready for review
29507 of 55759 relevant lines covered (52.92%)
127.57 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 1 |
75.41 |
0.0% | pkg/storage/postgres/registry.go |
| 4 |
77.13 |
-0.28% | pkg/storage/postgres/backend.go |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 20605804752.1 | 595 |
52.92 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|