Skip to content

Fix flaky e2e test - #13470

Merged
fuweid merged 1 commit into
containerd:mainfrom
mxpv:time
May 23, 2026
Merged

fuweid merged 1 commit into
containerd:mainfrom
mxpv:time

Conversation

@mxpv

@mxpv mxpv commented May 22, 2026 •

Copy link
Copy Markdown
Member

Recent CI tests fail with (1, 2):

 [FAILED] Failed after 15.072s.
  Expected
      <string>: Summary
  to match fields: {
  .Pods[summary-test-3062::stats-busybox-0].Containers[busybox-container].CPU:
  	Expected
  	    <string>: CPUStats
  	to match fields: {
  	.UsageNanoCores:
  		Expected
  		    <uint64>: 1001557809
  		to be <=
  		    <float64>: 1e+09
  	}
  	
  }

This PR removes RPC latency from the equation, which should fix/mitigate flakiness.

Copilot AI review requested due to automatic review settings May 22, 2026 18:27
@github-project-automation github-project-automation Bot moved this to Needs Triage in Pull Request Review May 22, 2026
@mxpv
mxpv marked this pull request as ready for review May 22, 2026 18:27

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.

Pull request overview

This PR addresses a flaky CRI e2e stats assertion by ensuring CPU usage samples in the Linux StatsCollector are timestamped with the task metrics’ own collection time, improving the accuracy of UsageNanoCores rate calculations derived from historical samples.

Changes:

  • Use types.Metric.timestamp from the Tasks Metrics RPC response when recording container CPU samples, instead of time.Now() at the collector.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-project-automation github-project-automation Bot moved this from Needs Triage to Review In Progress in Pull Request Review May 22, 2026
@fuweid
fuweid added this pull request to the merge queue May 22, 2026

@mikebrow mikebrow 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.

LGTM

Merged via the queue into containerd:main with commit 125377b May 23, 2026
50 checks passed
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Pull Request Review May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants