Working plan for the upstream merge from DataDog Agent 7.71.2 to 7.78.2. This is the concrete, version-specific companion to UPSTREAM_MERGE.md, which contains the durable process documentation. Read that first.
- Current fork main:
stackstate-7.71.2 - Target DataDog version:
7.78.2 - DataDog clone (for fetching pristine upstream):
/home/louis/go/src/github.com/DataDog/datadog-agent, currently behindorigin/mainby ~1300 commits, has only theorigin → github.com:DataDog/datadog-agentremote - StackState GitLab remote (to be added in the DataDog clone):
stackstate → git@gitlab.com:stackvista/agent/stackstate-agent.git
- In the DataDog clone, fast-forwarded
mainand fetched tags (c22c35f45a4, ~1300 commits caught up). - Confirmed
origin/7.78.xexists and inspected the tip — 8 commits past the7.78.2tag, includes 7.78.3-rc.1/rc.2 release.json bumps. Decision: take the branch tip (option C) to inherit the OTel CVE backport and other stability fixes; the RC release.json bumps are inert metadata. - Added
stackstateremote in the DataDog clone (git@gitlab.com:stackvista/agent/stackstate-agent.git) and fetched. - Integrations repo on
stackstate-7.71.2; will branch off when Python dep work is needed.
Following the recipe in UPSTREAM_MERGE.md "Pre-merge: branch setup".
- Pushed
origin/7.78.xtip asbase-7.78.2(commit6e93cda2cb0, 8 commits past the7.78.2tag — includes a CVE-2026-39883 OTel SDK backport, CWS retry queue fix, Windows code-signing cert thumbprint update, autoscaling burstable-mode backport, 7.78.3-rc.1/rc.2 release.json bumps, and an installer logging fix):cd /home/louis/go/src/github.com/DataDog/datadog-agent git push stackstate origin/7.78.x:refs/heads/base-7.78.2 - Fetched
base-7.78.2into the StackState fork and confirmed tip6e93cda2cb. - Pushed
common-ancestor-7.71.2-7.78.2at commit20c9c848e4("dyninst/irgen: include type information for interface implementors", 2025-09-05). Sits onorigin/mainand on every DD release branch from7.71.xthrough7.78.x— i.e., the natural fork point of7.71.xfrom main. - Pushed
backport-7.71.2-common-ancestor-7.78.2at commiteafccba808. Replayed 1028 changes (648 M + 372 A + 6 D + 2 R) fromstackstate-7.71.2onto the common ancestor. Mechanism:Invariant verified:git checkout -b backport-7.71.2-common-ancestor-7.78.2 origin/common-ancestor-7.71.2-7.78.2 git diff --name-status origin/base-7.71.2..origin/stackstate-7.71.2 \ | awk -F'\t' '$1 ~ /^[AM]$/ {print $2} $1 ~ /^R/ {print $3}' > /tmp/sts-checkout.txt git diff --name-status origin/base-7.71.2..origin/stackstate-7.71.2 \ | awk -F'\t' '$1=="D" {print $2} $1 ~ /^R/ {print $2}' > /tmp/sts-rm.txt xargs -a /tmp/sts-checkout.txt -d '\n' git checkout origin/stackstate-7.71.2 -- xargs -a /tmp/sts-rm.txt -d '\n' git rm git commit -m "All StackState changes replayed on top of common-ancestor-7.71.2-7.78.2" git push -u origin backport-7.71.2-common-ancestor-7.78.2
xargs -a /tmp/sts-checkout.txt -d '\n' git diff backport-... origin/stackstate-7.71.2 --produces zero diff lines (all checked-out files are byte-identical tostackstate-7.71.2). - Open the merge branch and resolve conflicts.
- Local-only branch
merged-7.71.2-to-7.78.2already exists, checked out atbase-7.78.2tip; never pushed, no merge committed. - First merge attempt (
git merge --no-commit --no-ff) was aborted after capturing conflict topology — see "Conflict topology" below. - Next session: re-run the merge, work through conflicts, commit, push.
git checkout merged-7.71.2-to-7.78.2 # local branch should still exist git merge origin/backport-7.71.2-common-ancestor-7.78.2 # ... long conflict-resolution session ... git push -u origin merged-7.71.2-to-7.78.2
- Local-only branch
- (Optional) Stand up a compare copy at
/home/louis/go/src/github.com/StackVista/stackstate-agent-compareonce the initial merge commit lands; check it out at that commit so you can diff fix-ups against the raw merge point.
First merge attempt produced 363 conflicts plus ~211 auto-merges to spot-check:
| Status | Count | Meaning |
|---|---|---|
| UU | 340 | Content conflict — hunk-level merge needed |
| DU | 22 | DD deleted upstream, STS still has changes — per-file decision |
| UD | 1 | STS deleted, DD modified — keep STS deletion |
| A | 372 | New STS files, no conflict |
| M | 211 | Auto-merged successfully — needs spot-check in heavy-STS files |
| D | 5 | Clean deletes |
| R | 2 | Renames preserved |
UU conflicts by top-level directory (heaviest first):
| Directory | UU count | Notes |
|---|---|---|
pkg/collector/ |
99 | STS's check-handler / topology customization — bulk of careful merge work goes here |
comp/otelcol/ |
34 | DD restructured otelcol heavily between 7.71 and 7.78 |
comp/core/ |
32 | DD continued component-architecture refactor |
pkg/util/ |
28 | DD utility churn |
pkg/config/ |
17 | STS overrides + DD config refactor |
pkg/logs/ |
13 | |
omnibus/config/ |
13 | Build system |
pkg/opentelemetry-mapping-go/ |
11 | |
pkg/serverless/ |
7 | DD likely refactored serverless heavily — see DU list too |
pkg/security/ |
6 |
Modify/delete (DU) — 22 files, decisions to make:
pkg/serverless/*(5 files) — DD restructured serverless. Likely drop STS mods wholesale; STS doesn't surface serverless features.omnibus/config/software/{file.rb,freetds.rb,libtool.rb,pip3.rb}— DD dropped these build deps. Investigate whether STS still needs them; if not, drop.comp/otelcol/otlp/components/.../go.{mod,sum},pkg/trace/stats/oteltest/go.sum,test/integration/serverless/src/go.{mod,sum}(5 files) — DD restructured Go modules; STS files need to follow the new layout.comp/{core/remoteagentregistry,metadata/inventoryotel,metadata/softwareinventory,trace/config}/.../*_test.goandcomponent_mock.go(5 files) — DD removed/renamed components STS had test mods for. Drop the test files.comp/otelcol/otlp/map_provider_serverless_test.go,omnibus/config/software/datadog-cf-finalize.rb— single removals; case-by-case.
Update/delete (UD) — 1 file:
Dockerfiles/agent/s6-services/trace/run— STS deleted s6 services entirely; keep the deletion.
Conflict lists captured to (volatile, may not survive reboot):
/tmp/merge-7.71.2-to-7.78.2-conflicts.txt(363 entries)/tmp/merge-7.71.2-to-7.78.2-modify-delete.txt(22)/tmp/merge-7.71.2-to-7.78.2-update-delete.txt(1)/tmp/merge-7.71.2-to-7.78.2-automerged.txt(211)
If these are gone by next session, regenerate by checking out merged-7.71.2-to-7.78.2, running git merge --no-commit --no-ff origin/backport-7.71.2-common-ancestor-7.78.2, capturing with git diff --name-only --diff-filter=U and git status --short | awk '$1=="DU"' etc., then git merge --abort.
Exit criteria for Phase 1: merged-7.71.2-to-7.78.2 pushed, all merge conflicts resolved (compilation may still be broken — that's Phase 2).
- Get the agent compiling on
merged-7.71.2-to-7.78.2(or on feature branches off it). Expect this to surface dependency renames, removed packages, signature changes. - Update
fix_branding.shfor any newdatadoghq.comreferences introduced upstream — see UPSTREAM_MERGE.md "Branding" section for the patterns that need reverts vs. what gets caught automatically. - Run
branded_unit_testsandunbranded_unit_testson x86 and ARM until green.
Exit criteria for Phase 2: all four CI test jobs (branded_unit_tests x86/ARM, unbranded_unit_tests x86/ARM) green.
Walk every item in UPSTREAM_MERGE.md "StackState-Specific Code That Can Be Lost During Merge". Expect at least some of these to need re-application; upstream merges silently drop // sts begin/end blocks when surrounding code shifts.
-
kube_cluster_nametagger tag (comp/core/tagger/collectors/workloadmeta_extract.go) -
DefaultCompressorKindzstd → zlib (must be infix_branding.sh, notstackstate()) - StackState defaults in
stackstate()(pkg/config/setup/config.go) - Resources metadata provider disabled (
fx.Supply(resourcesimpl.Disabled())incmd/agent/subcommands/run/command.go) -
use_v2_api.seriesforced tofalse -
EventContextfield in event payloads (pkg/serializer/internal/metrics/events.go) - Connectivity checker disabled by default
- RTLoader C++ branding in
fix_branding.sh -
forwarder_max_concurrent_requestsdefaults to1 -
pkg/logs/client/http/worker_pool_test.go—driveUntilhelper andabsDurationutility still present, tests still call them - Grep for
SendMetadata\|SendProcessesMetadata\|SendHostMetadata\|SendAgentchecksMetadatato find any new metadata payload call sites added upstream that may need the sameinternalHostname-or-disable treatment
- If this merge bumped the embedded Python (
omnibus/config/software/python3.rbdefault_version), bump thestackstate-agent-integrationsCI runner image + venv to the same version and rebuild/publish it — see UPSTREAM_MERGE.md "Integrations repo: CI runner image (embedded Python bump)". Otherwise integration checks test on a different Python than the agent ships (cf. STAC-25137). - Build container images via the agent CI pipeline.
- Trigger beest pipeline against the new images. Use the
AGENT_BRANCH_UNDER_TESTmechanism (see beest README). - Investigate any failures; loop back to Phase 2/3 fixes as needed.
Exit criteria for Phase 4: beest pipeline green.
- Deploy the new agent images to a sandbox cluster (via agent-promoter sandbox flow — see memory: agent-promoter / sandbox-testing-ticket).
- Verify in StackState UI:
- Container CPU/memory columns populated (confirms
kube_cluster_nametag flowing). - Topology components/relations being created and updated.
- No
DuplicateSnapshotItemorComponentForRelationMissingerrors in receiver logs.
- Container CPU/memory columns populated (confirms
- Check receiver logs for
400responses on/intake/(would indicate a metadata payload regression — Phase 3 item).
Exit criteria for Phase 5: sandbox cluster shows healthy topology + metric enrichment for ≥24h with no receiver-side errors traceable to the new agent.
Following UPSTREAM_MERGE.md "Cutover: switching the fork's main branch" — four repos in coordinated lockstep.
- stackstate-agent (this repo):
- Create branch
stackstate-7.78.2frommerged-7.71.2-to-7.78.2. - Set
stackstate-7.78.2as GitLab default branch. - Add to protected branches (optionally remove
stackstate-7.71.2after grace period).
- Create branch
- agent-promoter (
stackvista/devops/agent-promoter):- Update third arg of
AgentOps(...)atmain.py:103fromstackstate-7.71.2tostackstate-7.78.2. - Update
.github/copilot-instructions.mdif it references the branch name.
- Update third arg of
- helm-charts (
stackvista/devops/helm-charts), chartstable/suse-observability-agent:- Bump
Chart.yamlappVersionto3.78.2(convention:<STS-major>.<DD-minor>.<DD-patch>). - Audit
templates/_container-agent.yamlandtemplates/checks-agent-deployment.yamlfor env vars deprecated in DD 7.72-7.78. - Confirm
nodes/statsRBAC entry still intemplates/node-agent-clusterrole.yaml. - Leave image tags in
values.yamlalone — the next agent-promoter nightly will rewrite them.
- Bump
- beest (
stackvista/integrations/beest): find-and-replacestackstate-7.71.2→stackstate-7.78.2in:-
.gitlab-ci-rancher-tests.yml -
.gitlab-ci-suse-observability-cli-tests.yml -
.gitlab-ci-agent-x86-tests.yml -
.gitlab-ci-agent-arm-tests.yml -
.gitlab-ci-suse-observability-ui-inspection.yml -
Makefile:21(GIT_BRANCH ?= ...fallback) -
helpers/resolve-agent-hashes.sh:48(AGENT_DEFAULT_BRANCHfallback) and the comment on line 47 -
README.md:143(AGENT_BRANCH_UNDER_TESTexample)
-
Cutover sequencing:
- Day 1: Merge agent default-branch change AND beest CI changes.
- Day 1 (after #1 confirmed): Merge agent-promoter change. The next overnight run will start writing tags from
stackstate-7.78.2. - Whenever convenient: Merge helm-charts
appVersionbump.
Do not merge the agent-promoter change before the agent default branch flips, or the next nightly will fail to find commits to promote.
- After the first successful nightly run from
stackstate-7.78.2, verify the new tag landed inagent-promoter/config.ymland in the helm-chartsvalues.yaml. - Update memory with anything surprising or non-obvious from this merge cycle that future merges should know about. Record in
~/.claude/projects/-home-louis-go-src-github-com-StackVista-stackstate-agent/memory/. - Update
UPSTREAM_MERGE.mdwith any newly discovered patterns (new STS-specific code blocks, new branding edge cases, new deprecated env vars). - If this plan file (
MERGE_PLAN_7.71.2_TO_7.78.2.md) was committed, delete it — the durable lessons should now live inUPSTREAM_MERGE.mdand memory.