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

Add support for Management Plane Health Request #910

Merged
merged 14 commits into from
Nov 7, 2024
Merged

Conversation

RRashmit
Copy link

@RRashmit RRashmit commented Oct 23, 2024

Proposed changes

This PR adds the health responses to mpi when it receives an mpi request for health status.
Tested the api:
image

Flow of request & response

image

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • I have run make install-tools and have attached any dependency changes to this pull request
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • If applicable, I have updated any relevant documentation (README.md)
  • If applicable, I have tested my cross-platform changes on Ubuntu 22, Redhat 8, SUSE 15 and FreeBSD 13

@github-actions github-actions bot added the chore Pull requests for routine tasks label Oct 23, 2024
@RRashmit RRashmit marked this pull request as ready for review October 24, 2024 09:15
@RRashmit RRashmit requested a review from a team as a code owner October 24, 2024 09:15
@RRashmit RRashmit self-assigned this Oct 25, 2024
internal/bus/topics.go Outdated Show resolved Hide resolved
Comment on lines 24 to 25
DataplaneHealthTopic = "dataplane-health"
DataplaneHealthProcessTopic = "dataplane-health-process"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
DataplaneHealthTopic = "dataplane-health"
DataplaneHealthProcessTopic = "dataplane-health-process"
DataplaneHealthRequestTopic = "dataplane-health-request"
DataplaneHealthResponseTopic = "dataplane-health-response"

Maybe request & response might be better names for the topics?

isApplyRequest: true,
},
{
name: "Test 3: Config Health Request",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
name: "Test 3: Config Health Request",
name: "Test 3: Health Request",

Request: &mpi.ManagementPlaneRequest_ConfigUploadRequest{
ConfigUploadRequest: &mpi.ConfigUploadRequest{},
tests := []struct {
mpiRequest *mpi.ManagementPlaneRequest
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
mpiRequest *mpi.ManagementPlaneRequest
managementPlaneRequest *mpi.ManagementPlaneRequest


assert.Equal(t, mpi.CommandResponse_COMMAND_STATUS_OK, responses[0].GetCommandResponse().GetStatus())
assert.Equal(t, mpi.CommandResponse_COMMAND_STATUS_OK, responses[1].GetCommandResponse().GetStatus())
assert.Contains(t, allMessages, "Successfully sent the health status update")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably better to check the message for each response

Copy link
Collaborator

@dhurley dhurley left a comment

Choose a reason for hiding this comment

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

Could you update the PR title to something like this maybe?

Add support for Management Plane Health Request

@@ -15,4 +15,5 @@ const (
FeatureMetricsInstance = "metrics-instance"
FeatureFileWatcher = "file-watcher"
FeatureAgentAPI = "agent-api"
FeatureDataplaneHealth = "dataplane-health"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't think you need to add this feature. The constant isn't being used anywhere.

Copy link
Author

Choose a reason for hiding this comment

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

Thought, I'd removed it, added it initially.

@RRashmit RRashmit changed the title Health responses to mpi Add support for Management Plane Health Request Nov 6, 2024
@RRashmit RRashmit added the v3.x Issues and Pull Requests related to the major version v3 label Nov 6, 2024
@RRashmit RRashmit merged commit 455f314 into v3 Nov 7, 2024
20 checks passed
@RRashmit RRashmit deleted the health-responses branch November 7, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Pull requests for routine tasks v3.x Issues and Pull Requests related to the major version v3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants