Correctly configure the garden backend in integration tests #8979
+24
−10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed by this PR
Unblocks #8893
We needed to call
runtime.WithRequestTimeout()
in order to correctly configure the createContainer lock with a non-zero timeout. It's actually amazing that all the other tests in here also weren't failing in a similar manner.I figured this out by putting
fmt.Println
statements everywhere and printing out the configured timeout. In the lock, I was seeing that it was configured with a0s
timeout. I eventually realized that we were setting the timeout on the containerd client, but not on the Garden client (which contains the containerd client), and we create the lock with the timeout from the Garden client, not the containerd client. oops!We configure the garden client correctly in the actual code, which is why no user has ever had an issue with creating containers like we were seeing in this test suite.
Also took the time to ensure all the tests that made custom backends were setup in the same way.
Notes to reviewer
N/A
Release Note