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
Use the new inventoryagent component in the status page #20269
Conversation
Go Package Import DifferencesBaseline: 44d37c7
|
a76278e
to
308b18f
Compare
1eb280f
to
784683a
Compare
308b18f
to
4095859
Compare
|
No documentation impact. Removing documentation team from reviewers. |
784683a
to
bac9fcb
Compare
4095859
to
3c729ef
Compare
a9f7193
to
a1d8138
Compare
3c729ef
to
adba1fb
Compare
Bloop Bleep... Dogbot HereRegression Detector ResultsRun ID: 7493ba06-befa-4b9c-8676-5e7c4a215931 ExplanationA regression test is an integrated performance test for Because a target's optimization goal performance in each experiment will vary somewhat each time it is run, we can only estimate mean differences in optimization goal relative to the baseline target. We express these differences as a percentage change relative to the baseline target, denoted "Δ mean %". These estimates are made to a precision that balances accuracy and cost control. We represent this precision as a 90.00% confidence interval denoted "Δ mean % CI": there is a 90.00% chance that the true value of "Δ mean %" is in that interval. We decide whether a change in performance is a "regression" -- a change worth investigating further -- if both of the following two criteria are true:
The table below, if present, lists those experiments that have experienced a statistically significant change in mean optimization goal performance between baseline and comparison SHAs with 90.00% confidence OR have been detected as newly erratic. Negative values of "Δ mean %" mean that baseline is faster, whereas positive values of "Δ mean %" mean that comparison is faster. Results that do not exhibit more than a ±5.00% change in their mean optimization goal are discarded. An experiment is erratic if its coefficient of variation is greater than 0.1. The abbreviated table will be omitted if no interesting change is observed. No interesting changes in experiment optimization goals with confidence ≥ 90.00% and |Δ mean %| ≥ 5.00%. Fine details of change detection per experiment.
|
a1d8138
to
fa82ca7
Compare
adba1fb
to
bce7cbb
Compare
| inventoryagent.Module, | ||
| // inventoryagent require a serializer. Since we're not actually sending the payload to | ||
| // the backend a nil will work. | ||
| fx.Provide(func() serializer.MetricSerializer { |
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.
If another component needs a real serializer the code will panic.
Ideally, can inventoryagent be split into components so that the component you need for flare doesn't use the serializer?
Otherwise, can you return Optional[serializer.MetricSerializer] and use that inside inventory (As serializer is optional) so that another component that would need a MetricSerializer will not crash? What do you think?
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.
As decided during our daily, I'll afdress this in another PR 👍
| func (ia *inventoryagent) Get() map[string]interface{} { | ||
| data := map[string]interface{}{} | ||
| for k, v := range ia.data { | ||
| data[k] = v |
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.
Is it OK if this function shallow copies ia.data because v can be a map[string]interface{} which is a reference?
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, we explicitly call this out in the Set method docstring.
| } | ||
| checks := s["runnerStats"].(map[string]interface{})["Checks"].(map[string]interface{}) | ||
| stats := make(map[string]interface{}) | ||
| stats = getRunnerStats(stats) |
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.
Can you explain why you call getRunnerStats instead of GetStatus(false)?
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 part only uses the runner part of the stats, so instead of requesting everything and needing to retrieve the metadata we only request what we need. This way we don't need to pass a ref to the inventory metadata payload.
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.
Actually, on one of the PR I have that extracts the render functions to a separate status subpackage, we can get rid of GetCheckStatusJSON and GetCheckStatus
| @@ -157,7 +156,8 @@ func GetCheckStatus(c check.Check, cs *checkstats.Stats) ([]byte, error) { | |||
|
|
|||
| // GetDCAStatus grabs the status from expvar and puts it into a map | |||
| func GetDCAStatus(verbose bool) (map[string]interface{}, error) { | |||
| stats, err := getCommonStatus() | |||
| // inventory is not enabled for the clusteragent/DCA so we pass nil to getCommonStatus | |||
| stats, err := getCommonStatus(nil) | |||
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.
I think it will be great to use Optional[Component] instead of nil. The benefit of using Optional[Component] is that you can assume every component is not nil. It can be tricky to know if a component can be nil or not.
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.
After discussing this we will fix this in another PR to not block the fix.
a97658a
to
10b657d
Compare
bce7cbb
to
5175090
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.
LGTM
What does this PR do?
This fix the status page behavior that was broken when inventoryagent was migrated to component (and metadata were no longer displayed in the status page).
This is a followup PR for #20057
Describe how to test/QA your changes
Check that the
statuspage from the CLI, GUI and in the flare contain the samemetadataon Linux and Windows (top section).Reviewer's Checklist
Triagemilestone is set.major_changelabel if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.changelog/no-changeloglabel has been applied.qa/skip-qalabel is not applied.team/..label has been applied, indicating the team(s) that should QA this change.need-change/operatorandneed-change/helmlabels have been applied.k8s/<min-version>label, indicating the lowest Kubernetes version compatible with this feature.