Remove UpdateEnv on some host-based tests - #49271
Conversation
Files inventory check summaryFile checks results against ancestor 5f8e5a2a: Results for datadog-agent_7.79.0~devel.git.612.3c4ec1d.pipeline.108036852-1_amd64.deb:No change detected |
…tion Options like WithLogs, WithTags, WithHostname, and WithIntakeHostname populated ExtraAgentConfig ([]pulumi.StringInput) which cannot be resolved outside a Pulumi context. Add parallel ExtraAgentConfigRaw []string fields to agentparams.Params and kubernetesagentparams.Params so these options work when the agent is configured via SSH or Helm without Pulumi. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add Configure(t, opts...), SetBaseOptions, and SetComponents to RemoteHostAgent so agent config can be written via SSH without re-running Pulumi. Configure merges new options on top of the stored baseline, builds the full datadog.yaml (with fakeintake URLs, API key, and user config), writes it via SSH, and restarts the agent with OS-aware service management (systemctl / initctl / service fallback). Host.Init now wires SetComponents automatically so Configure has access to the host (SSH) and fakeintake (URLs) from the start. SetAgentConfig is kept as a thin shim for backward compatibility but now delegates to Agent.Configure instead of duplicating the logic. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…stWorkload Add KubernetesAgentInstaller interface, Configure(t, opts...), and SetBaseOptions to KubernetesAgent. Configure delegates to the installer's Upgrade method so the agent can be reconfigured mid-test via Helm without re-running Pulumi. Add WithoutDeployTestWorkload() KinD run option for tests that manage workload deployment themselves in SetupSuite rather than relying on the provisioner. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
hostagent.Install / InstallOnHost: installs the Datadog Agent on a remote host via SSH by running the official install script (DD_INSTALL_ONLY=true), then calls Configure to write config and start the agent. Version defaults are read from the runner profile (pipeline ID, major version, channel, flavor). helmagent.Install: installs the agent on a Kubernetes cluster via Helm CLI. Creates the namespace and API key secret, builds a values YAML matching the full Pulumi-path configuration (kubelet TLS settings, EC2 metadata timeout, cluster name, fakeintake URLs), pins the chart to the same version as the Pulumi path, and runs helm upgrade --install. The helmInstaller returned implements KubernetesAgentInstaller so Agent.Configure works for mid-test reconfiguration. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Provisioners are now infrastructure-only: VM + fakeintake (+ docker manager where needed). Custom provisioners set env.Agent = nil so the framework skips resource import for that field. Agent installation moves to SetupSuite via hostagent.Install or helmagent.Install. Mid-test config changes use Agent.Configure instead of UpdateEnv, which avoids re-running Pulumi for config-only changes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ent.Configure Replace UpdateEnv calls for config-only agent changes with Agent.Configure. No infrastructure is re-provisioned — config is written via SSH and the agent is restarted in-place. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace UpdateEnv calls for config-only agent changes with Agent.Configure. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace UpdateEnv calls for config-only agent changes with Agent.Configure. The multi-fakeintake test (forwarder_nss_failover) now installs a bare agent in SetupSuite (no intake config) and applies the intake config inside the test method via Agent.Configure, avoiding a race where BeforeTest's "both intakes empty" check would fail because the agent was already sending to fakeintake1. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…gure Replace UpdateEnv calls for config-only agent changes with Agent.Configure. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add a workloads installer package that deploys standard test workload
applications to a Kubernetes cluster without Pulumi. Each workload is defined
as an embedded YAML Go template that is rendered and applied via kubectl.
Workloads covered:
- nginx: Deployment + ConfigMap + Service + PDB (with autodiscovery annotations)
- redis: Deployment + Service + PDB (with endpoints autodiscovery annotation)
- tracegen: UDS and TCP Deployments
- prometheus: Deployment with prometheus.io/scrape annotation
- dogstatsd: six Deployment variants (UDS-with-CSI, UDS, UDP, origin-detection,
container-name-injected, external-data-only)
- cpustress: stress-ng Deployment
- etcd: Deployment (etcd + config sidecar) + Service
- mutated: three Deployments across two namespaces for admission controller testing
Usage in SetupSuite:
workloads.Deploy(s.T(), s.Env(),
workloads.WithNginx(),
workloads.WithRedis(),
)
Or deploy the full standard set:
workloads.DeployTestWorkload(s.T(), s.Env())
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove scenkind.WithDeployTestWorkload() from the provisioner and call workloads.DeployTestWorkload() in SetupSuite instead. The provisioner now creates infrastructure only (cluster + fakeintake + agent via Helm); workload apps are deployed after provisioning via kubectl apply. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Workload Remove WithDeployTestWorkload() from the provisioner in both suites and call workloads.DeployTestWorkload() in SetupSuite instead. The orchestrator suite gains a SetupSuite() for the first time to host the workload deploy. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The provisioner now creates cluster + fakeintake only (no agent). SetupSuite calls helmagent.Install with the same options that kindvm/run.go was previously injecting via Pulumi: - KinD-specific kubelet/CSI/hostnetwork values - stackid tag derived from cluster name - dual shipping, log level, container helm values, endpoint slices Also populate LinuxClusterChecks.LabelSelectors in helmagent.Install so test helpers that reference cluster-checks-runner pods get the right selector. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Static quality checks✅ Please find below the results from static quality gates Successful checksInfo
On-wire sizes (compressed)
|
|
/trigger-ci |
|
View all feedbacks in Devflow UI.
Started pipeline #112417241 |
|
This pull request has been automatically marked as stale because it has not had activity in the past 15 days. It will be closed in 30 days if no further activity occurs. If this pull request is still relevant, adding a comment or pushing new commits will keep it open. Also, you can always reopen the pull request if you missed the window. Thank you for your contributions! |
|
This pull request was automatically closed because it has been stale for 15 days with no activity. If this pull request is still relevant, please reopen it or create a new pull request with updated information. Thanks! |
What does this PR do?
Motivation
Describe how you validated your changes
Additional Notes