-
Notifications
You must be signed in to change notification settings - Fork 132
[AGENTONB-2760] use UUID instead of HostName in metadata payload #2468
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not directly related to this PR, but we have a potential data race in
A safe approach could be: copy under lock, unlock, then mutate the local copy and marshal omf.mutex.RLock()
// Copy metadata while holding the lock, to avoid data races.
operatorMetadata := omf.OperatorMetadata
if omf.OperatorMetadata.ResourceCounts != nil {
operatorMetadata.ResourceCounts = make(map[string]int, len(omf.OperatorMetadata.ResourceCounts))
maps.Copy(operatorMetadata.ResourceCounts, omf.OperatorMetadata.ResourceCounts)
}
omf.mutex.RUnlock()
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. addressed in a separate PR: #2481 |
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.
Does this require schema or writer change?
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.
No, the
dd-gobackend creates a schema resource based on theHelmMetadataPayloadobjectHelmMetadata(datadog_operator_helm_metadata) and the schema matches that struct.