Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade controller-runtime to v0.16 #496

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

davidebianchi
Copy link
Contributor

What this PR does / why we need it:

Upgrade controller-runtime to version 16.

Fixes #473

Signed-off-by: Davide Bianchi <bianchidavide12@gmail.com>
Signed-off-by: Davide Bianchi <bianchidavide12@gmail.com>
@@ -289,7 +289,8 @@ func TestStepDeleteExistingLabelMatch(t *testing.T) {
}), podSpec)

step := Step{
Logger: testutils.NewTestLogger(t, ""),
Logger: testutils.NewTestLogger(t, ""),
Timeout: 60,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidebianchi I'm curious why this timeout field setting was needed? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the upgrade, this test will timeout. Adding this setting, it works correctly (without sensible increase in testing time).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I wonder what changed. Have we been not enforcing a timeout (which I assume was 0 by default) before? 🤔

Copy link
Contributor Author

@davidebianchi davidebianchi Dec 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmh maybe it is related with this function change: https://github.com/kudobuilder/kuttl/pull/496/files#diff-f83daba5f9026600aa38b2b1e5a0c585535dc3355457e4762c50bdb0f6b0febdR160 (the PollImmediate function is deprecated). It could be that with 0, the context goes now immediately in timeout.
Maybe we could change the implementation to use PollUntilContextCancel if timeout is 0. What do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I think I know why. Previously this Get would run with an unbounded (TODO) context. Now it runs with a context with a 0 timeout.

I think the current code is fine, the real default timeout is not 0 in kuttl anyway.

@porridge porridge merged commit 005d211 into kudobuilder:main Nov 27, 2023
4 checks passed
@davidebianchi davidebianchi deleted the upgrade-controller-runtime branch November 27, 2023 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update to controller-runtime v0.16+
2 participants