Skip to content

Temporarily disable flaky part of TestClientCache#38798

Merged
gzdunek merged 1 commit intomasterfrom
gzdunek/disable-flaky-connect-cache-test
Feb 29, 2024
Merged

Temporarily disable flaky part of TestClientCache#38798
gzdunek merged 1 commit intomasterfrom
gzdunek/disable-flaky-connect-cache-test

Conversation

@gzdunek
Copy link
Copy Markdown
Contributor

@gzdunek gzdunek commented Feb 29, 2024

Temporary workaround for #38778

Unfortunately, I think the underlying problem is not that easy to solve (and I have tomorrow off). I wouldn't like to block other PRs.

@github-actions
Copy link
Copy Markdown
Contributor

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

@gzdunek gzdunek added the no-changelog Indicates that a PR does not require a changelog entry label Feb 29, 2024
Comment on lines +419 to +421
//fourthCallForClient, err := daemonService.GetCachedClient(ctx, cluster.URI)
//require.NoError(t, err)
//require.NotEqual(t, thirdCallForClient, fourthCallForClient)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would a require.EventuallyWithT allow us to assert that things eventually got to the desired state?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Now it fails every time, it's weird

	require.EventuallyWithT(t, func(t *assert.CollectT) {
		fourthCallForClient, err := daemonService.GetCachedClient(ctx, cluster.URI)
		assert.NoError(t, err)
		assert.NotEqual(t, thirdCallForClient, fourthCallForClient)
	}, time.Second*2, time.Millisecond*100)
     	Error:      	Condition never satisfied

@gzdunek gzdunek added this pull request to the merge queue Feb 29, 2024
Merged via the queue into master with commit 7067a88 Feb 29, 2024
@gzdunek gzdunek deleted the gzdunek/disable-flaky-connect-cache-test branch February 29, 2024 19:25
gzdunek added a commit that referenced this pull request Mar 6, 2024
github-merge-queue Bot pushed a commit that referenced this pull request Mar 7, 2024
* Cache remote clients in Connect  (#38201)

* Add remote client cache

* Add an integration test

* Close all clients when stopping the service

* Move RemoteClientCache to the place where it is used

* Do not check client cert in `Get`

* Fix code style issues

* Prevent potential race condition when removing a cached client

* Test concurrent calls to `Get`

* Add TODO

* `remoteclientcache` -> `clientcache`

* Reduce the `err` scope

* Move `Config` closer to `New` and docs

* Fix lint

* Improve logging and error handling

* Add missing comments

* `Close` -> `Clear`

* Improve the test

* Remove mentions about "remote" client

* Pass `cfg` directly to `Cache`

* `InvalidateForRootCluster` -> `ClearForRootCluster`

* Add docs for the interface

* `ClearForRootCluster` -> `ClearForRoot`

* Add config validation

* Log multiple fields at once

* Improve setting logger

* Use cached remote clients in Connect (#38202)

* Replace all simple `c.clusterClient.ConnectToProxy()` calls

* Use cached proxy client to create gateways

* Use cached proxy client to assume roles

* Invalidate clients when logging in and out

* Gracefully handle expired cert error returned by the server

* Drop `GetRootClusterURI` in headless auth watcher since URIs are already root URIs

* Simplify error check

* Make `auth.ClientI` parameter naming more consistent, use `root` prefix when needed

* Reduce error scope where possible

* Clear cached clients before passwordless login

* Use `fakeClientCache` without pointers

* Move separate `proxyClient` parameter to `CreateGatewayParams` in the gateways code

* Replace checking error string with `client.ErrClientCredentialsHaveExpired`

(cherry picked from commit 39f9951)

* Temporarily disable flaky part of `TestClientCache` (#38798)

(cherry picked from commit 7067a88)

* Make calls to the auth server concurrently (#38955)

* Make calls to the auth server concurrently

* Enhance the comment about preferences upsert

* Summarize how `userpreferences.Update` works

(cherry picked from commit ddc45a4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Indicates that a PR does not require a changelog entry size/sm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants