Skip to content

fix flaky TestPlatformMetrics test - #659

Merged
Dmitry Berkovich (dberkov) merged 2 commits into
agent-substrate:mainfrom
LiorLieberman:fix-flaky-test
Jul 31, 2026
Merged

Dmitry Berkovich (dberkov) merged 2 commits into
agent-substrate:mainfrom
LiorLieberman:fix-flaky-test

Conversation

@LiorLieberman

Copy link
Copy Markdown
Collaborator

Cut the OTel metric export interval to 10s in the kind stack, plumbing OTEL_METRIC_EXPORT_INTERVAL from ate-controller through to the ateom worker pods it creates. ateom registers no instruments of its own, so it stays invisible to the collector until its first export tick - which consumed ~50s of TestPlatformMetricsEmitted's 120s budget and made the suite flaky on loaded CI runners.

also removes a dead service_name= in CollectorHasService, since the Prometheus exporter only ever emits that resource attribute as the job label.

It's a good idea to open an issue first for discussion.

  • Tests pass
  • Appropriate changes to documentation are included in the PR

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ah, opened #661 for the same flake before spotting this one, sorry! Same approach in both, so happy to close mine. One thing worth pulling in from #661: in the failed run both export ticks actually fired and failed (first one used the whole 30s default export timeout, second died on a DNS timeout), so interval alone still leaves workers at ~1 attempt per 30s during a blip. Can you also set + propagate OTEL_METRIC_EXPORT_TIMEOUT=10000 the same way? Then this covers everything.

The CollectorHasService cleanup looks right too, the kind collector has no resource_to_telemetry_conversion so service_name= never matches.

@EItanya

Copy link
Copy Markdown
Collaborator

LGTM, but will wait for Krisztian F (@krisztianfekete) to give an approval

@LiorLieberman

Copy link
Copy Markdown
Collaborator Author

Thanks! Krisztian F (@krisztianfekete) just added - can you take a look?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, LGTM!

@dberkov
Dmitry Berkovich (dberkov) merged commit 1b329c9 into agent-substrate:main Jul 31, 2026
11 checks passed
@LiorLieberman Lior Lieberman (LiorLieberman) linked an issue Aug 1, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

E2E test flake: TestPlatformMetricsEmitted

4 participants