-
Notifications
You must be signed in to change notification settings - Fork 114
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
Passing the base platform name to the nodemanager #3612
Conversation
@@ -250,7 +250,7 @@ func (ccr *ChefClientRun) initializeNodeInfo() (sharedNodeInfo NodeInfo, err err | |||
UptimeSeconds: int64(uptimeSeconds), | |||
OrganizationName: ccr.OrganizationName, | |||
Environment: ccr.NodePayload.ChefEnvironment, | |||
Platform: getPlatformWithVersion(ccr.NodePayload), | |||
Platform: ccr.PlatformWithVersion(), |
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.
This is cleaning up the way we grab the platform.
@@ -30,6 +30,7 @@ type ChefRun struct { | |||
NodeRun backend.Run | |||
NodeAttribute backend.NodeAttribute | |||
BulkableRequests []elastic.BulkableRequest | |||
Platform string |
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.
Added the raw platform to the message that is passed along in the pipeline.
@@ -80,6 +80,9 @@ func ChefRunTransmogrify(in <-chan message.ChefRun, out chan<- message.ChefRun, | |||
continue | |||
} | |||
|
|||
// Needed for the nodemanager because the platform field is combined with the version. | |||
msg.Platform = ccr.Platform() |
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.
This is the only place we have access to the raw platform. So, we set the pipeline msg platform here.
@@ -82,7 +84,7 @@ func gatherInfoForNode(node backend.Node) (*manager.NodeMetadata, error) { | |||
return &manager.NodeMetadata{ | |||
Uuid: node.EntityUuid, | |||
Name: node.NodeName, | |||
PlatformName: node.PlatformFamily, | |||
PlatformName: msg.Platform, |
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.
Then at this point, we can set the platform from the pipeline message.
Signed-off-by: Lance Finfrock <[email protected]>
dc916e8
to
c170e34
Compare
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.
yes! this is great, thank you!
Signed-off-by: Lance Finfrock <[email protected]>
…sort options (#3596) * send platform family and version from ingest -> nodemanager Signed-off-by: Victoria Jeffrey <[email protected]> * send all report tags (including env) to nodemanager Signed-off-by: Victoria Jeffrey <[email protected]> * allow sorting by state for nodes Signed-off-by: Victoria Jeffrey <[email protected]> * test updates Signed-off-by: Victoria Jeffrey <[email protected]> * test for sorting nodes Signed-off-by: Victoria Jeffrey <[email protected]> * fix unit test Signed-off-by: Victoria Jeffrey <[email protected]> * use lowercase environment Signed-off-by: Victoria Jeffrey <[email protected]> * argh one more test fix Signed-off-by: Victoria Jeffrey <[email protected]> * Passing the base platform name to the nodemanager (#3612) Signed-off-by: Lance Finfrock <[email protected]> * unit test fix Signed-off-by: Victoria Jeffrey <[email protected]> Co-authored-by: Lance Finfrock <[email protected]>
Before:

After:
