Skip to content
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

fix(TestCPU): Mark as flake in the flakes.yaml #25535

Merged
merged 2 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions flakes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,11 @@
# "test/new-e2e/tests/agent-platform/install-script"
# - "TestInstallScript/test_install_script_on_centos-79_x86_64_datadog-agent_agent_7"

# TODO: https://datadoghq.atlassian.net/browse/CONTINT-4143
test/new-e2e/tests/containers:
- TestEKSSuite/TestCPU/metric___container.cpu.usage{^kube_deployment:stress-ng$,^kube_namespace:workload-cpustress$}
- TestEKSSuite/TestCPU
- TestEKSSuite
Comment on lines +10 to +13
Copy link
Member

Choose a reason for hiding this comment

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

I would have two questions:

  • Is it needed to recursively list all the parents of a flaky test ? Ideally, I’d love to list only the “real flaky” one TestEKSSuite/TestCPU/metric___container.cpu.usage{^kube_deployment:stress-ng$,^kube_namespace:workload-cpustress$} and not all its parents.
    If we accept that a failing sub-test makes its parents fail, should that be taken into account by the framework reading flakes.yaml ?

  • Does flakes.yaml support patterns ?
    TestCPU is executed inside two suites: TestEKSSuite and TestKindSuite.

Suggested change
test/new-e2e/tests/containers:
- TestEKSSuite/TestCPU/metric___container.cpu.usage{^kube_deployment:stress-ng$,^kube_namespace:workload-cpustress$}
- TestEKSSuite/TestCPU
- TestEKSSuite
test/new-e2e/tests/containers:
- Test(EKS|Kind)Suite/TestCPU/metric___container.cpu.usage{^kube_deployment:stress-ng$,^kube_namespace:workload-cpustress$}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As discussed,

  • we must list everything now pending a fix in the testwasher. This should not be needed anymore once this is merged
  • we don't support regex now. It might be an improvement, quoting @KevinFairise2 here for information

chouetz marked this conversation as resolved.
Show resolved Hide resolved
- TestKindSuite/TestCPU/metric___container.cpu.usage{^kube_deployment:stress-ng$,^kube_namespace:workload-cpustress$}
- TestKindSuite/TestCPU
- TestKindSuite
3 changes: 0 additions & 3 deletions test/new-e2e/tests/containers/k8s_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"github.com/DataDog/agent-payload/v5/cyclonedx_v1_4"
"github.com/DataDog/agent-payload/v5/sbom"
"github.com/DataDog/datadog-agent/pkg/util/pointer"
"github.com/DataDog/datadog-agent/pkg/util/testutil/flake"
"github.com/DataDog/datadog-agent/test/fakeintake/aggregator"
fakeintake "github.com/DataDog/datadog-agent/test/fakeintake/client"
"gopkg.in/zorkian/go-datadog-api.v2"
Expand Down Expand Up @@ -449,8 +448,6 @@ func (suite *k8sSuite) TestRedis() {

func (suite *k8sSuite) TestCPU() {
chouetz marked this conversation as resolved.
Show resolved Hide resolved
// TODO: https://datadoghq.atlassian.net/browse/CONTINT-4143
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we keep a code comment here to notify that it's flaky ?

flake.Mark(suite.T())

// Test CPU metrics
suite.testMetric(&testMetricArgs{
Filter: testMetricFilterArgs{
Expand Down
Loading