-
Notifications
You must be signed in to change notification settings - Fork 76
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
Conversation
internal/bus/topics.go
Outdated
DataplaneHealthTopic = "dataplane-health" | ||
DataplaneHealthProcessTopic = "dataplane-health-process" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: "Test 3: Config Health Request", | |
name: "Test 3: Health Request", |
Request: &mpi.ManagementPlaneRequest_ConfigUploadRequest{ | ||
ConfigUploadRequest: &mpi.ConfigUploadRequest{}, | ||
tests := []struct { | ||
mpiRequest *mpi.ManagementPlaneRequest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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") |
There was a problem hiding this comment.
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
There was a problem hiding this 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
pkg/config/features.go
Outdated
@@ -15,4 +15,5 @@ const ( | |||
FeatureMetricsInstance = "metrics-instance" | |||
FeatureFileWatcher = "file-watcher" | |||
FeatureAgentAPI = "agent-api" | |||
FeatureDataplaneHealth = "dataplane-health" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Proposed changes
This PR adds the health responses to mpi when it receives an mpi request for health status.
Tested the api:
Flow of request & response
Checklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTING
documentmake install-tools
and have attached any dependency changes to this pull requestREADME.md
)