feat(fakeintake): pin fakeintake image version for e2e tests#53728
feat(fakeintake): pin fakeintake image version for e2e tests#53728KevinFairise2 wants to merge 12 commits into
Conversation
Replace the hardcoded `:latest` fakeintake image tag consumed by e2e tests with a pinned version, so fakeintake changes are exercised on the PR that makes them and branches no longer pick up a new fakeintake all at once. - Add test/fakeintake/version package (VERSION file + ImageURL helper that honors FAKEINTAKE_IMAGE_OVERRIDE globally). - Route all fakeintake image defaults (aws/azure/gcp scenarios + local docker component) through version.ImageURL. - Publish the pinned tag on main (publish_fakeintake_pinned). - Enforce a strictly-increasing VERSION bump when test/fakeintake/** changes, validated in the merge queue (dda inv fakeintake.check-version-bump). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@autotest review |
Gitlab CI Configuration ChangesChanges Summary
ℹ️ Diff available in the job log. |
There was a problem hiding this comment.
The PR correctly centralizes fakeintake image pinning and removes all hardcoded :latest references from e2e consumers. However, the check_version_bump task will crash on the first PR introducing VERSION because it attempts git show main:test/fakeintake/version/VERSION without handling the file-not-found case.
📊 Validated against 5 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit 4792e66 · What is Autotest? · Any feedback? Reach out in #autotest
|
🎯 Code Coverage (details) 🔗 Commit SHA: ccef2b1 | Docs | Datadog PR Page | Give us feedback! |
Files inventory check summaryFile checks results against ancestor 1b4d4a01: Results for datadog-agent_7.83.0~devel.git.178.ccef2b1.pipeline.125318131-1_amd64.deb:No change detected |
… rule Move the FAKEINTAKE_IMAGE_OVERRIDE injection into .on_e2e_main_release_or_rc, the base rule inherited by every e2e job through its team rule. On any fakeintake PR the whole e2e suite now runs against the freshly built v<sha> image, so no e2e job (including mixed-area PRs) can miss the override. - .needs_new_e2e_template: wait for publish_fakeintake (PR v<sha>) and publish_fakeintake_pinned (main pinned tag), both optional. - .on_fakeintake_changes: reverted to plain gating (build/publish/check only). - Remove now-redundant fakeintake override handling from privateactionrunner and .on_e2e_or_fakeintake_changes_or_manual; fix duplicate needs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Static quality checks✅ Please find below the results from static quality gates 33 successful checks with minimal change (< 2 KiB)
|
Regression DetectorRegression Detector ResultsMetrics dashboard Baseline: 1b4d4a0 Optimization Goals: ✅ No significant changes detected
|
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ➖ | quality_gate_idle | memory utilization | +0.67 | [+0.62, +0.72] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_idle_all_features | memory utilization | +0.09 | [+0.02, +0.15] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_logs | % cpu utilization | -0.00 | [-0.96, +0.96] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_security_no_fs_load | memory utilization | -0.15 | [-0.24, -0.06] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_security_idle | memory utilization | -0.25 | [-0.31, -0.19] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_security_mean_fs_load | memory utilization | -0.32 | [-0.36, -0.28] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_metrics_logs | memory utilization | -0.47 | [-0.72, -0.22] | 1 | Logs bounds checks dashboard |
Bounds Checks: ❌ Failed
| perf | experiment | bounds_check_name | replicates_passed | observed_value | links |
|---|---|---|---|---|---|
| ✅ | quality_gate_idle | intake_connections | 10/10 | 3 ≤ 4 | bounds checks dashboard |
| ✅ | quality_gate_idle | memory_usage | 10/10 | 147.95MiB ≤ 154MiB | bounds checks dashboard |
| ✅ | quality_gate_idle | total_bytes_received | 10/10 | 733.25KiB ≤ 819.20KiB | bounds checks dashboard |
| ✅ | quality_gate_idle_all_features | intake_connections | 10/10 | 3 ≤ 4 | bounds checks dashboard |
| ❌ | quality_gate_idle_all_features | memory_usage | 8/10 | 497.86MiB > 495MiB | bounds checks dashboard |
| ✅ | quality_gate_idle_all_features | total_bytes_received | 10/10 | 1.12MiB ≤ 1.25MiB | bounds checks dashboard |
| ✅ | quality_gate_logs | intake_connections | 10/10 | 4 ≤ 6 | bounds checks dashboard |
| ✅ | quality_gate_logs | memory_usage | 10/10 | 182.24MiB ≤ 195MiB | bounds checks dashboard |
| ✅ | quality_gate_logs | missed_bytes | 10/10 | 0B = 0B | bounds checks dashboard |
| ✅ | quality_gate_logs | total_bytes_received | 10/10 | 263.82MiB ≤ 292MiB | bounds checks dashboard |
| ✅ | quality_gate_metrics_logs | cpu_usage | 10/10 | 375.99 ≤ 2000 | bounds checks dashboard |
| ✅ | quality_gate_metrics_logs | intake_connections | 10/10 | 4 ≤ 6 | bounds checks dashboard |
| ✅ | quality_gate_metrics_logs | memory_usage | 10/10 | 396.87MiB ≤ 430MiB | bounds checks dashboard |
| ✅ | quality_gate_metrics_logs | missed_bytes | 10/10 | 0B = 0B | bounds checks dashboard |
| ✅ | quality_gate_metrics_logs | total_bytes_received | 10/10 | 0.93GiB ≤ 1.04GiB | bounds checks dashboard |
| ✅ | quality_gate_security_idle | cpu_usage | 10/10 | 36.22 ≤ 100 | bounds checks dashboard |
| ✅ | quality_gate_security_idle | memory_usage | 10/10 | 300.20MiB ≤ 330MiB | bounds checks dashboard |
| ✅ | quality_gate_security_mean_fs_load | cpu_usage | 10/10 | 63.63 ≤ 200 | bounds checks dashboard |
| ✅ | quality_gate_security_mean_fs_load | memory_usage | 10/10 | 276.08MiB ≤ 310MiB | bounds checks dashboard |
| ✅ | quality_gate_security_no_fs_load | cpu_usage | 10/10 | 23.33 ≤ 100 | bounds checks dashboard |
| ✅ | quality_gate_security_no_fs_load | memory_usage | 10/10 | 283.22MiB ≤ 320MiB | bounds checks dashboard |
Explanation
Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%
Performance changes are noted in the perf column of each table:
- ✅ = significantly better comparison variant performance
- ❌ = significantly worse comparison variant performance
- ➖ = no significant change in performance
A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".
For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.
-
Its configuration does not mark it "erratic".
Replicate Execution Details
We run multiple replicates for each experiment/variant. However, we allow replicates to be automatically retried if there are any failures, up to 8 times, at which point the replicate is marked dead and we are unable to run analysis for the entire experiment. We call each of these attempts at running replicates a replicate execution. This section lists all replicate executions that failed due to the target crashing or being oom killed.
Note: In the below tables we bucket failures by experiment, variant, and failure type. For each of these buckets we list out the replicate indexes that failed with an annotation signifying how many times said replicate failed with the given failure mode. In the below example the baseline variant of the experiment named experiment_with_failures had two replicates that failed by oom kills. Replicate 0, which failed 8 executions, and replicate 1 which failed 6 executions, all with the same failure mode.
| Experiment | Variant | Replicates | Failure | Logs | Debug Dashboard |
|---|---|---|---|---|---|
| experiment_with_failures | baseline | 0 (x8) 1 (x6) | Oom killed | Debug Dashboard |
The debug dashboard links will take you to a debugging dashboard specifically designed to investigate replicate execution failures.
❌ Retried Profiling Replicate Execution Failures (ddprof)
Note: Profiling replicas may still be executing. See the debug dashboard for up to date status.
| Experiment | Variant | Replicates | Failure | Debug Dashboard |
|---|---|---|---|---|
| quality_gate_idle | baseline | 10 | Oom killed | Debug Dashboard |
| quality_gate_idle_all_features | baseline | 10 | Oom killed | Debug Dashboard |
| quality_gate_idle_all_features | comparison | 10 | Oom killed | Debug Dashboard |
| quality_gate_logs | baseline | 10 | Oom killed | Debug Dashboard |
| quality_gate_logs | comparison | 10 | Oom killed | Debug Dashboard |
| quality_gate_metrics_logs | baseline | 10 | Oom killed | Debug Dashboard |
| quality_gate_metrics_logs | comparison | 10 | Oom killed | Debug Dashboard |
| quality_gate_security_idle | comparison | 10 | Oom killed | Debug Dashboard |
| quality_gate_security_mean_fs_load | comparison | 10 | Crashed (exit code: 134) | Debug Dashboard |
| quality_gate_security_no_fs_load | baseline | 10 | Oom killed | Debug Dashboard |
| quality_gate_security_no_fs_load | comparison | 10 | Crashed (exit code: 134) | Debug Dashboard |
CI Pass/Fail Decision
❌ Failed. Some Quality Gates were violated.
- quality_gate_security_mean_fs_load, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
- quality_gate_security_mean_fs_load, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_metrics_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_metrics_logs, bounds check missed_bytes: 10/10 replicas passed. Gate passed.
- quality_gate_metrics_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
- quality_gate_metrics_logs, bounds check total_bytes_received: 10/10 replicas passed. Gate passed.
- quality_gate_metrics_logs, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
- quality_gate_idle_all_features, bounds check intake_connections: 10/10 replicas passed. Gate passed.
- quality_gate_idle_all_features, bounds check total_bytes_received: 10/10 replicas passed. Gate passed.
- quality_gate_idle_all_features, bounds check memory_usage: 8/10 replicas passed. Failed 2 which is > 0. Gate FAILED.
- quality_gate_security_no_fs_load, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_security_no_fs_load, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
- quality_gate_security_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_security_idle, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
- quality_gate_idle, bounds check total_bytes_received: 10/10 replicas passed. Gate passed.
- quality_gate_idle, bounds check intake_connections: 10/10 replicas passed. Gate passed.
- quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
- quality_gate_logs, bounds check total_bytes_received: 10/10 replicas passed. Gate passed.
- quality_gate_logs, bounds check missed_bytes: 10/10 replicas passed. Gate passed.
… e2e jobs The pinned tag is a release artifact, so publish_fakeintake_pinned now runs from main only (gated on the VERSION file changing) — never from feature branches. Every e2e job that deploys a fakeintake waits for the publish via a shared .needs_fakeintake_publish anchor (referenced by .needs_new_e2e_template and by the manual-needs -init jobs that provision fakeintake). Documents the known cross-pipeline publish window (a PR rebasing onto a just-bumped main before main finishes publishing vN) as a rare, self-healing limitation — intentionally accepted over a merge-queue publish. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
check_version_bump crashed when the VERSION file did not exist on the base branch (git show exits non-zero) — which is exactly the bootstrap PR that introduces the pinning scheme, and any baseline reset. This blocked the first merge before v1 could be published. Use warn=True and treat a missing base file as version 0, so the initial bump (v1+) passes. Addresses PR review (autotest P0 / codex P1). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
/trigger-ci |
|
View all feedbacks in Devflow UI.
Branch If you need support, contact us on Slack #ci-infra-support!
POST https://gitlab.ddbuild.io/api/v4/projects/DataDog/datadog-agent/pipeline: 400 {message: {base: [ DetailsIf you need support, contact us on Slack #ci-infra-support with those details! |
YAML anchors are file-local, so `<<: *if_main_branch` (defined in .gitlab-ci.yml) is unresolvable in the separate .gitlab/deploy/dev_container_deploy/fakeintake.yml include — GitLab rejected the pipeline with "An alias referenced an unknown anchor: if_main_branch". The merged gitlab-ci linter concatenates files so it missed this; verified now with a standalone YAML parse. Inline the condition (if: $CI_COMMIT_BRANCH == "main") instead. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…wners Two CI failures on this PR: 1. fakeintake_check_version_bump crashed with "unknown revision 'main...HEAD'" — CI does shallow clones without the base ref, so raw `git diff main...HEAD` fails. Use get_common_ancestor (fetches the ref) + get_changed_files, the same helpers get_file_modifications relies on, and resolve the base VERSION from the merge-base commit. 2. test_and_lint_gitlab_configuration failed jobowners-exist: the new fakeintake_check_version_bump and publish_fakeintake_pinned jobs had no non-default owner. Add them to .gitlab/JOBOWNERS (@DataDog/agent-devx, matching CODEOWNERS for fakeintake paths). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The published image is `go build cmd/server/main.go`, so only server/, aggregator/ and api/ (plus go.mod/go.sum/Dockerfile) actually change it. Changes to client/, cmd/client/ or docs/ don't, and shouldn't trigger a rebuild, republish or VERSION bump. - Add .fakeintake_server_paths and point the rebuild/publish/version-check jobs and the e2e image override at it (was the broad test/fakeintake/**). - Keep e2e coverage for non-server changes: a client/CLI change still runs e2e, but against the pinned image (no override, no rebuild). - check_version_bump now requires a bump only for server-file changes (_is_server_file), kept in sync with .fakeintake_server_paths. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The image override is now the default resolution path everywhere, so drop the leftover "already honors FAKEINTAKE_IMAGE_OVERRIDE" comments from the two test files (it's only documented in AGENTS.md now). Read the override through the e2e runner parameter store like every other E2E_* value instead of reading the env var directly: - Add parameters.FakeintakeImageOverride -> E2E_FAKEINTAKE_IMAGE_OVERRIDE. - Move the override lookup into components/datadog/fakeintake.ImageURL (the test/fakeintake/version module can't import the runner). version now only exposes the pinned Tag. - Point scenarios params + docker component at fakeintake.ImageURL; CI sets E2E_FAKEINTAKE_IMAGE_OVERRIDE. - Regenerate BUILD.bazel; update docs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Embed the VERSION file directly into a string variable and trim in the initializer, dropping the embed.FS + readTag() indirection. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6419852081
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Address PR review: - P2: the e2e override rule sat after .if_run_all_e2e_tests / main / release / rc in .on_e2e_main_release_or_rc. Since rules are first-match-wins, a fakeintake-server PR run with RUN_E2E_TESTS=on matched the run-all case first and created jobs without E2E_FAKEINTAKE_IMAGE_OVERRIDE. Move the server-change override rule ahead of those cases. - P1: publish_fakeintake_pinned used changes:compare_to $COMPARE_TO_BRANCH which defaults to main, so on the main pipeline it was a main-vs-main diff that never matched — the pinned tag was never published. Drop compare_to so it diffs against the previous commit (the merge), matching .on_fakeintake_changes_on_main. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Trim the multi-line explanatory comments added for the pinning work down to a couple of lines each (rules ordering, pinned publish, needs anchor, server-path detection, ImageURL) — same information, less noise. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
What & why
Today e2e tests consume the fakeintake image via a hardcoded
:latesttag.:latestis published only on merge to main, which has two drawbacks:v<sha>image and setsFAKEINTAKE_IMAGE_OVERRIDE, but only 2 suites honored that var; everything else used:latest.:latest, so every branch instantly picks up the new fakeintake; a breaking change hits everywhere at once with no reproducibility.This PR pins the fakeintake version: fakeintake changes are exercised on the PR, and branches use a fixed tag — picking up a new fakeintake only when they rebase onto a main that bumped the pin.
Changes
test/fakeintake/version/— new package:VERSIONfile (source of truth, starts atv1) +ImageURL()helper that returnsFAKEINTAKE_IMAGE_OVERRIDEwhen set, else<registry>:<pinned-tag>.version.ImageURL(...), so the override is honored globally. The two ad-hoc env reads were simplified away.publish_fakeintake_pinnedpublishesfakeintake:<VERSION>on main.publish_fakeintake(v<sha>) andpublish_fakeintake_latestare unchanged (:lateststill published for external consumers; no test references it).dda inv fakeintake.check-version-bumprequires a strictly-increasing VERSION whentest/fakeintake/**changes, run in the merge queue so two concurrent same-value bumps force a re-bump (no clobbered/mutable tags).Developer workflow
Change fakeintake code → bump
test/fakeintake/version/VERSIONin the same PR. Your PR's e2e runs your built image (via the override); on merge the pinned tag is published; other branches adopt it on rebase (visible as a VERSION bump in their diff).Verification
dda inv fakeintake.build, version unit tests (4/4),dda inv linter.goon all changed Go packages,linter.python, andlinter.gitlab-ciall pass locally.Open items to confirm on CI
IMG_REGISTRIES: public(same as the:latestjob that already reachesregistry.datadoghq.com, gcp's registry), so the pinned tag should land there too. Thedd-pkgregistry-group mapping lives outside this repo — worth confirming against a real CI run.dd-pkg publish-imagehas no fail-on-overwrite flag; immutability rests on the strictly-increasing merge-queue check instead (noted in a job comment).🤖 Generated with Claude Code