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

Removes cluster node status reporting from agent #2190

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

0xavi0
Copy link
Contributor

@0xavi0 0xavi0 commented Feb 29, 2024

Removes cluster node status reporting from agent and adds a basic unit test for the clusterstatus Ticker

Refers to: #1973

@0xavi0 0xavi0 self-assigned this Feb 29, 2024
@0xavi0 0xavi0 requested a review from a team as a code owner February 29, 2024 12:23
baseTime = metav1.Now()
ctx, cancel = context.WithCancel(context.TODO())
clusterClient.EXPECT().Patch(clusterNamespace, clusterName, types.MergePatchType, gomock.Any(), "status").
DoAndReturn(func(namespace, name string, pt types.PatchType, data []byte, subresources ...string) (result fleet.Cluster, err error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You declare the result here but don't actually use it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

indeed, changed.

@0xavi0 0xavi0 force-pushed the 1973-remove-node-clusterstatus-agent branch 2 times, most recently from 984a8ae to 0e45d69 Compare February 29, 2024 16:58
@0xavi0 0xavi0 requested a review from bigkevmcd February 29, 2024 17:42
return *cluster, nil
}).AnyTimes()
Ticker(ctx, agentNamespace, clusterNamespace, clusterName, time.Second*1, nodeClient, clusterClient)
})
Copy link
Member

Choose a reason for hiding this comment

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

nit: I'd always put newlines in between the blocks, but 🤷

Suggested change
})
})

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, it's more readable that way. New lines added.

@0xavi0 0xavi0 force-pushed the 1973-remove-node-clusterstatus-agent branch 2 times, most recently from eb1e041 to 1a58ae8 Compare March 1, 2024 13:11
@0xavi0 0xavi0 requested a review from manno March 1, 2024 13:32
@0xavi0 0xavi0 force-pushed the 1973-remove-node-clusterstatus-agent branch from 1a58ae8 to d4d298e Compare March 4, 2024 09:50
@0xavi0 0xavi0 requested a review from weyfonk March 4, 2024 09:55
@0xavi0 0xavi0 force-pushed the 1973-remove-node-clusterstatus-agent branch from d4d298e to ff4ed76 Compare March 4, 2024 10:16
Removes cluster node status reporting from agent and adds a basic unit test for the `clusterstatus Ticker`

Refers to: rancher#1973

Signed-off-by: Xavi Garcia <xavi.garcia@suse.com>
@0xavi0 0xavi0 force-pushed the 1973-remove-node-clusterstatus-agent branch from ff4ed76 to aa041a4 Compare March 4, 2024 12:53
@0xavi0 0xavi0 merged commit 05316c4 into rancher:master Mar 4, 2024
9 checks passed
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.

4 participants