Skip to content

fix flaky test TestApprovedMetrics - #22390

Merged
aelnahas merged 2 commits into
elastic:mainfrom
aelnahas:flaky-test/TestApprovedMetrics
Nov 6, 2026
Merged

aelnahas merged 2 commits into
elastic:mainfrom
aelnahas:flaky-test/TestApprovedMetrics

Conversation

@aelnahas

@aelnahas aelnahas commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Motivation/summary

commit attempts a fix on TestApprovedMetrics by filtering out server aggregates to focus on agent metrics.

Checklist

  • Not a user facing change

For functional changes, consider:

  • Is it observable through the addition of either logging or metrics?
  • Is its use being published in telemetry to enable product improvement?
  • Have system tests been added to avoid regression?

How to test these changes

Related issues

fixes: #21608

commit attempts a fix on TestApprovedMetrics by filtering out
server aggregates to focus on agent metrics.

fixes: elastic#21608
@aelnahas
aelnahas requested a review from a team as a code owner November 5, 2026 23:27
Copilot AI balanced review requested due to automatic review settings November 5, 2026 23:27
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@mergify

mergify Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

This pull request does not have a backport label. Could you fix it @aelnahas? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-8.19 is the label to automatically backport to the 8.19 branch.
  • backport-9./d is the label to automatically backport to the 9./d branch. /d is the digit.
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues block the change to exclude server-aggregated metrics from the agent-metric approval comparison.

No open issues 🎉

What changed in this PR

This PR addresses the TestApprovedMetrics flakiness reported in #21608 by excluding server-aggregated metrics from the agent-metric approval comparison.

Changes:

  • Replaces the transaction-only exclusion with a filter excluding documents that contain metricset.interval.
  • Updates the comment to describe the broader exclusion of server aggregates.
File Description
systemtest/​metrics_test.go Broadens the approval-test filter to exclude server-aggregated metrics.

Review effort: Balanced

@carsonip carsonip left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

there seems to be an extra

`

in metricsets.ndjson. Do you mind overloading your PR to fix that as well?

Copilot AI balanced review requested due to automatic review settings November 6, 2026 13:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the change excluding server-aggregated metrics from approval checks and correcting the intake fixture.

No open issues 🎉

Review effort: Balanced

@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

💚 Build Succeeded

History

@carsonip carsonip added the backport-active-all Automated backport with mergify to all the active branches label Nov 6, 2026
@mergify

mergify Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@aelnahas
aelnahas added this pull request to the merge queue Nov 6, 2026
Merged via the queue into elastic:main with commit 906852a Nov 6, 2026
33 checks passed
@aelnahas
aelnahas deleted the flaky-test/TestApprovedMetrics branch November 6, 2026 13:41
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

@Mergifyio backport 9.6 9.5 9.4 8.19

@mergify

mergify Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

backport 9.6 9.5 9.4 8.19

✅ Backports have been created

Details

mergify Bot added a commit that referenced this pull request Nov 6, 2026
* fix flaky test TestApprovedMetrics

commit attempts a fix on TestApprovedMetrics by filtering out
server aggregates to focus on agent metrics.

fixes: #21608

* remove additional tick in metricset.json

(cherry picked from commit 906852a)

Co-authored-by: Ahmed ElNahas <ahmed.elnahas@elastic.co>
mergify Bot added a commit that referenced this pull request Nov 6, 2026
* fix flaky test TestApprovedMetrics

commit attempts a fix on TestApprovedMetrics by filtering out
server aggregates to focus on agent metrics.

fixes: #21608

* remove additional tick in metricset.json

(cherry picked from commit 906852a)

Co-authored-by: Ahmed ElNahas <ahmed.elnahas@elastic.co>
mergify Bot added a commit that referenced this pull request Nov 6, 2026
* fix flaky test TestApprovedMetrics

commit attempts a fix on TestApprovedMetrics by filtering out
server aggregates to focus on agent metrics.

fixes: #21608

* remove additional tick in metricset.json

(cherry picked from commit 906852a)

Co-authored-by: Ahmed ElNahas <ahmed.elnahas@elastic.co>
mergify Bot added a commit that referenced this pull request Nov 6, 2026
* fix flaky test TestApprovedMetrics

commit attempts a fix on TestApprovedMetrics by filtering out
server aggregates to focus on agent metrics.

fixes: #21608

* remove additional tick in metricset.json

(cherry picked from commit 906852a)

Co-authored-by: Ahmed ElNahas <ahmed.elnahas@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-active-all Automated backport with mergify to all the active branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

systemtest: Flaky TestApprovedMetrics

3 participants