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

implement autoupdate_agent_rollout reconciler #48241

Merged
merged 5 commits into from
Nov 13, 2024

Conversation

hugoShaka
Copy link
Contributor

@hugoShaka hugoShaka commented Oct 31, 2024

This PR does the first implementation of the autoupdate agent rollout reconciler.
The code is not used yet, once this PR is merged I will add a controller that will run every minute in the auth server and calls the reconciler.

Sorry for the large PR (but it's 75% tests I swear 😅 ), I thought it made no sense to send tryReconcile() without also sending Reconcile()

@hugoShaka hugoShaka added the no-changelog Indicates that a PR does not require a changelog entry label Oct 31, 2024
lib/autoupdate/rolloutcontroller/client_test.go Outdated Show resolved Hide resolved

func (h *createUpdateHandler[T]) handle(_ context.Context, object T) (T, error) {
if len(h.expect) == 0 {
require.Fail(h.t, "not expecting more calls")
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this guaranteed to be executed in the goroutine running the test? The require helpers will fail the test and then goexit, which won't actually stop the test if it's a goroutine calling the helpers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently yes, and I don't plan to write multi-goroutine tests if possible. Single-routine tests are easier to await and debug. I'm losing a lot of time because of the async reconciliation in the operator tests and prefer to do everything synchronously + use require.

@hugoShaka hugoShaka force-pushed the hugo/autoupdate-service-conditional-update branch from 21b0779 to b4e12e5 Compare November 4, 2024 14:59
Base automatically changed from hugo/autoupdate-service-conditional-update to master November 4, 2024 18:54
@hugoShaka hugoShaka force-pushed the hugo/initial-proxy-agent-update-implementation branch from 31e966f to 54f3875 Compare November 4, 2024 20:46
@hugoShaka hugoShaka force-pushed the hugo/initial-proxy-agent-update-implementation branch from 97a479d to 3bcb41e Compare November 13, 2024 22:25
@hugoShaka hugoShaka enabled auto-merge November 13, 2024 22:25
@hugoShaka hugoShaka added this pull request to the merge queue Nov 13, 2024
Merged via the queue into master with commit ba943d2 Nov 13, 2024
39 checks passed
@hugoShaka hugoShaka deleted the hugo/initial-proxy-agent-update-implementation branch November 13, 2024 23:01
@public-teleport-github-review-bot

@hugoShaka See the table below for backport results.

Branch Result
branch/v17 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/branch/v17 no-changelog Indicates that a PR does not require a changelog entry size/lg
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants