You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(fakeintake): pin fakeintake image version for e2e tests (#53728)
## What & why
Today e2e tests consume the fakeintake image via a hardcoded `:latest` tag. `:latest` is published only on merge to main, which has two drawbacks:
1. **No PR feedback** — a fakeintake code change is not exercised by e2e on the PR that makes it. CI already builds an immutable `v<sha>` image and sets `FAKEINTAKE_IMAGE_OVERRIDE`, but only 2 suites honored that var; everything else used `:latest`.
2. **Uncontrolled propagation** — merging moves `: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: `VERSION` file (source of truth, starts at `v1`) + `ImageURL()` helper that returns `FAKEINTAKE_IMAGE_OVERRIDE` when set, else `<registry>:<pinned-tag>`.
- **Consumers** — all 4 fakeintake image defaults (aws/azure/gcp scenarios + local docker component) now resolve through `version.ImageURL(...)`, so the override is honored **globally**. The two ad-hoc env reads were simplified away.
- **Publish** — `publish_fakeintake_pinned` publishes `fakeintake:<VERSION>` on main. `publish_fakeintake` (`v<sha>`) and `publish_fakeintake_latest` are unchanged (`:latest` still published for external consumers; no test references it).
- **Enforcement** — `dda inv fakeintake.check-version-bump` requires a **strictly-increasing** VERSION when `test/fakeintake/**` changes, run in the merge queue so two concurrent same-value bumps force a re-bump (no clobbered/mutable tags).
- Docs updated in both AGENTS.md files.
## Developer workflow
Change fakeintake code → bump `test/fakeintake/version/VERSION` in 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.go` on all changed Go packages, `linter.python`, and `linter.gitlab-ci` all pass locally.
## Open items to confirm on CI
- **GCP registry coverage** — the pinned job uses `IMG_REGISTRIES: public` (same as the `:latest` job that already reaches `registry.datadoghq.com`, gcp's registry), so the pinned tag should land there too. The `dd-pkg` registry-group mapping lives outside this repo — worth confirming against a real CI run.
- **Immutable publish** — `dd-pkg publish-image` has no fail-on-overwrite flag; immutability rests on the strictly-increasing merge-queue check instead (noted in a job comment).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: kevin.fairise <kevin.fairise@datadoghq.com>
0 commit comments