From 643c43a24e537f713d051b0f33b97dc8d53ec651 Mon Sep 17 00:00:00 2001 From: Kevin Fairise <132568982+KevinFairise2@users.noreply.github.com> Date: Thu, 5 Dec 2024 23:20:38 +0100 Subject: [PATCH 1/5] Mark TestPodParser test as flaky (#31811) --- .../collectors/util/kubernetes_resource_parsers/pod_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/comp/core/workloadmeta/collectors/util/kubernetes_resource_parsers/pod_test.go b/comp/core/workloadmeta/collectors/util/kubernetes_resource_parsers/pod_test.go index a90d0a2028357..2f5e8e0c941a0 100644 --- a/comp/core/workloadmeta/collectors/util/kubernetes_resource_parsers/pod_test.go +++ b/comp/core/workloadmeta/collectors/util/kubernetes_resource_parsers/pod_test.go @@ -16,9 +16,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" workloadmeta "github.com/DataDog/datadog-agent/comp/core/workloadmeta/def" + "github.com/DataDog/datadog-agent/pkg/util/testutil/flake" ) func TestPodParser_Parse(t *testing.T) { + flake.Mark(t) filterAnnotations := []string{"ignoreAnnotation"} parser, err := NewPodParser(filterAnnotations) From e03dff2a8a79262d4bd5ed8e926ee97c9e38043c Mon Sep 17 00:00:00 2001 From: Kevin Fairise <132568982+KevinFairise2@users.noreply.github.com> Date: Thu, 5 Dec 2024 23:38:01 +0100 Subject: [PATCH 2/5] Do not print Ansible logs (#31814) --- test/new-e2e/tests/installer/unix/all_packages_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/new-e2e/tests/installer/unix/all_packages_test.go b/test/new-e2e/tests/installer/unix/all_packages_test.go index f213a0fda8394..82f3d6bf44c12 100644 --- a/test/new-e2e/tests/installer/unix/all_packages_test.go +++ b/test/new-e2e/tests/installer/unix/all_packages_test.go @@ -217,7 +217,7 @@ func (s *packageBaseSuite) RunInstallScript(params ...string) { playbookPath := s.writeAnsiblePlaybook(env, params...) // Run the playbook - s.Env().RemoteHost.MustExecute(fmt.Sprintf("%sansible-playbook -vvv %s", ansiblePrefix, playbookPath)) + s.Env().RemoteHost.MustExecute(fmt.Sprintf("%sansible-playbook %s > /dev/null 2> /dev/null", ansiblePrefix, playbookPath)) // touch install files for compatibility s.Env().RemoteHost.MustExecute("touch /tmp/datadog-installer-stdout.log") From a1a230f012e306c2e0e9f49af3f888e1582a92fe Mon Sep 17 00:00:00 2001 From: Stuart Geipel Date: Thu, 5 Dec 2024 17:44:46 -0500 Subject: [PATCH 3/5] [ebpfless] Fix TestTCPRemoveEntries (#31816) --- pkg/network/tracer/tracer_linux_test.go | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/pkg/network/tracer/tracer_linux_test.go b/pkg/network/tracer/tracer_linux_test.go index 74e00cb3588a4..5897839fb2c41 100644 --- a/pkg/network/tracer/tracer_linux_test.go +++ b/pkg/network/tracer/tracer_linux_test.go @@ -108,13 +108,19 @@ func (s *TracerSuite) TestTCPRemoveEntries() { require.NoError(t, err) defer c2.Close() - conn, ok := findConnection(c2.LocalAddr(), c2.RemoteAddr(), getConnections(t, tr)) - require.True(t, ok) - assert.Equal(t, clientMessageSize, int(conn.Monotonic.SentBytes)) - assert.Equal(t, 0, int(conn.Monotonic.RecvBytes)) - assert.Equal(t, 0, int(conn.Monotonic.Retransmits)) - assert.Equal(t, os.Getpid(), int(conn.Pid)) - assert.Equal(t, addrPort(server.Address()), int(conn.DPort)) + assert.EventuallyWithT(t, func(ct *assert.CollectT) { + conn, ok := findConnection(c2.LocalAddr(), c2.RemoteAddr(), getConnections(t, tr)) + if !assert.True(ct, ok) { + return + } + assert.Equal(ct, clientMessageSize, int(conn.Monotonic.SentBytes)) + assert.Equal(ct, 0, int(conn.Monotonic.RecvBytes)) + assert.Equal(ct, 0, int(conn.Monotonic.Retransmits)) + if !tr.config.EnableEbpfless { + assert.Equal(ct, os.Getpid(), int(conn.Pid)) + } + assert.Equal(ct, addrPort(server.Address()), int(conn.DPort)) + }, 3*time.Second, 100*time.Millisecond) // Make sure the first connection got cleaned up assert.Eventually(t, func() bool { From 60bad3775521ad4b6311808c014ad3eb03011dc3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 07:21:03 +0000 Subject: [PATCH 4/5] CWS: sync BTFHub constants (#31820) Co-authored-by: --- .../probe/constantfetch/btfhub/constants.json | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pkg/security/probe/constantfetch/btfhub/constants.json b/pkg/security/probe/constantfetch/btfhub/constants.json index 00d66492a9624..c8e007fa9ae5c 100644 --- a/pkg/security/probe/constantfetch/btfhub/constants.json +++ b/pkg/security/probe/constantfetch/btfhub/constants.json @@ -18337,6 +18337,13 @@ "uname_release": "4.14.35-2047.541.4.1.el7uek.aarch64", "cindex": 89 }, + { + "distrib": "ol", + "version": "7", + "arch": "arm64", + "uname_release": "4.14.35-2047.542.2.el7uek.aarch64", + "cindex": 89 + }, { "distrib": "ol", "version": "7", @@ -20948,6 +20955,13 @@ "uname_release": "4.1.12-124.91.3.el7uek.x86_64", "cindex": 94 }, + { + "distrib": "ol", + "version": "7", + "arch": "x86_64", + "uname_release": "4.1.12-124.92.3.el7uek.x86_64", + "cindex": 94 + }, { "distrib": "ol", "version": "7", @@ -23874,6 +23888,13 @@ "uname_release": "4.14.35-2047.543.2.el7uek.x86_64", "cindex": 96 }, + { + "distrib": "ol", + "version": "7", + "arch": "x86_64", + "uname_release": "4.14.35-2047.543.3.el7uek.x86_64", + "cindex": 96 + }, { "distrib": "ol", "version": "7", From e46622ae56f719d6ad8ef4b87ec1f4b3416d9864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= Date: Fri, 6 Dec 2024 08:39:11 +0100 Subject: [PATCH 5/5] Replace --incremental-build by their --rebuild equivalent (#31573) Co-authored-by: clarkb7 --- omnibus/config/software/datadog-agent.rb | 8 ++++---- omnibus/config/software/datadog-dogstatsd.rb | 2 +- omnibus/config/software/datadog-iot-agent.rb | 4 ++-- omnibus/config/software/installer.rb | 4 ++-- tasks/cws_instrumentation.py | 4 ++-- tasks/process_agent.py | 4 ++-- tasks/security_agent.py | 4 ++-- tasks/system_probe.py | 8 ++++---- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/omnibus/config/software/datadog-agent.rb b/omnibus/config/software/datadog-agent.rb index eaa141eab49e3..ecfe7cb0d4c7c 100644 --- a/omnibus/config/software/datadog-agent.rb +++ b/omnibus/config/software/datadog-agent.rb @@ -89,8 +89,8 @@ command "inv -e rtloader.clean" command "inv -e rtloader.make --install-prefix \"#{windows_safe_path(python_2_embedded)}\" --cmake-options \"-G \\\"Unix Makefiles\\\" \\\"-DPython3_EXECUTABLE=#{windows_safe_path(python_3_embedded)}\\python.exe\"\"", :env => env command "mv rtloader/bin/*.dll #{install_dir}/bin/agent/" - command "inv -e agent.build --exclude-rtloader --major-version #{major_version_arg} --rebuild --no-development --install-path=#{install_dir} --embedded-path=#{install_dir}/embedded #{do_windows_sysprobe} --flavor #{flavor_arg}", env: env - command "inv -e systray.build --major-version #{major_version_arg} --rebuild", env: env + command "inv -e agent.build --exclude-rtloader --major-version #{major_version_arg} --no-development --install-path=#{install_dir} --embedded-path=#{install_dir}/embedded #{do_windows_sysprobe} --flavor #{flavor_arg}", env: env + command "inv -e systray.build --major-version #{major_version_arg}", env: env else command "inv -e rtloader.clean" command "inv -e rtloader.make --install-prefix \"#{install_dir}/embedded\" --cmake-options '-DCMAKE_CXX_FLAGS:=\"-D_GLIBCXX_USE_CXX11_ABI=0\" -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_FIND_FRAMEWORK:STRING=NEVER -DPython3_EXECUTABLE=#{install_dir}/embedded/bin/python3'", :env => env @@ -100,10 +100,10 @@ if linux_target? include_sds = "--include-sds" # we only support SDS on Linux targets for now end - command "inv -e agent.build --exclude-rtloader #{include_sds} --major-version #{major_version_arg} --rebuild --no-development --install-path=#{install_dir} --embedded-path=#{install_dir}/embedded --flavor #{flavor_arg}", env: env + command "inv -e agent.build --exclude-rtloader #{include_sds} --major-version #{major_version_arg} --no-development --install-path=#{install_dir} --embedded-path=#{install_dir}/embedded --flavor #{flavor_arg}", env: env if heroku_target? - command "inv -e agent.build --exclude-rtloader --major-version #{major_version_arg} --rebuild --no-development --install-path=#{install_dir} --embedded-path=#{install_dir}/embedded --flavor #{flavor_arg} --agent-bin=bin/agent/core-agent", env: env + command "inv -e agent.build --exclude-rtloader --major-version #{major_version_arg} --no-development --install-path=#{install_dir} --embedded-path=#{install_dir}/embedded --flavor #{flavor_arg} --agent-bin=bin/agent/core-agent", env: env end end diff --git a/omnibus/config/software/datadog-dogstatsd.rb b/omnibus/config/software/datadog-dogstatsd.rb index f212a799078ad..f22a68ec7ec13 100644 --- a/omnibus/config/software/datadog-dogstatsd.rb +++ b/omnibus/config/software/datadog-dogstatsd.rb @@ -33,7 +33,7 @@ end # we assume the go deps are already installed before running omnibus - command "invoke dogstatsd.build --rebuild --major-version #{major_version_arg}", env: env + command "invoke dogstatsd.build --major-version #{major_version_arg}", env: env mkdir "#{install_dir}/etc/datadog-dogstatsd" unless windows_target? diff --git a/omnibus/config/software/datadog-iot-agent.rb b/omnibus/config/software/datadog-iot-agent.rb index afabbd0835188..b528cb485c49b 100644 --- a/omnibus/config/software/datadog-iot-agent.rb +++ b/omnibus/config/software/datadog-iot-agent.rb @@ -39,7 +39,7 @@ end if linux_target? - command "invoke agent.build --flavor iot --rebuild --no-development --major-version #{major_version_arg}", env: env + command "invoke agent.build --flavor iot --no-development --major-version #{major_version_arg}", env: env mkdir "#{install_dir}/bin" mkdir "#{install_dir}/run/" @@ -61,7 +61,7 @@ mkdir conf_dir mkdir "#{install_dir}/bin/agent" - command "inv agent.build --flavor iot --rebuild --no-development --major-version #{major_version_arg}", env: env + command "inv agent.build --flavor iot --no-development --major-version #{major_version_arg}", env: env # move around bin and config files move 'bin/agent/dist/datadog.yaml', "#{conf_dir}/datadog.yaml.example" diff --git a/omnibus/config/software/installer.rb b/omnibus/config/software/installer.rb index 99708622641fb..38b612d2510eb 100644 --- a/omnibus/config/software/installer.rb +++ b/omnibus/config/software/installer.rb @@ -32,11 +32,11 @@ env = with_embedded_path(env) if linux_target? - command "invoke installer.build --rebuild --no-cgo --run-path=/opt/datadog-packages/run --install-path=#{install_dir}", env: env + command "invoke installer.build --no-cgo --run-path=/opt/datadog-packages/run --install-path=#{install_dir}", env: env mkdir "#{install_dir}/bin" copy 'bin/installer', "#{install_dir}/bin/" elsif windows_target? - command "inv -e installer.build --rebuild --install-path=#{install_dir}", env: env + command "inv -e installer.build --install-path=#{install_dir}", env: env copy 'bin/installer/installer.exe', "#{install_dir}/datadog-installer.exe" end diff --git a/tasks/cws_instrumentation.py b/tasks/cws_instrumentation.py index c2cb17b40530c..748c6b64784c3 100644 --- a/tasks/cws_instrumentation.py +++ b/tasks/cws_instrumentation.py @@ -28,7 +28,7 @@ def build( ctx, build_tags=None, race=False, - incremental_build=True, + rebuild=False, major_version='7', go_mod="readonly", static=False, @@ -59,7 +59,7 @@ def build( build_tags.append("osusergo") race_opt = "-race" if race else "" - build_type = "" if incremental_build else "-a" + build_type = "-a" if rebuild else "" go_build_tags = " ".join(build_tags) agent_bin = BIN_PATH diff --git a/tasks/process_agent.py b/tasks/process_agent.py index 50d716e1a1831..42beed0d770f3 100644 --- a/tasks/process_agent.py +++ b/tasks/process_agent.py @@ -24,7 +24,7 @@ def build( build_exclude=None, install_path=None, flavor=AgentFlavor.base.name, - incremental_build=False, + rebuild=False, major_version='7', go_mod="readonly", ): @@ -80,7 +80,7 @@ def build( args = { "go_mod": go_mod, "race_opt": "-race" if race else "", - "build_type": "" if incremental_build else "-a", + "build_type": "-a" if rebuild else "", "go_build_tags": " ".join(build_tags), "agent_bin": BIN_PATH, "gcflags": gcflags, diff --git a/tasks/security_agent.py b/tasks/security_agent.py index 725c0d6d0a583..fe1def0e39b8c 100644 --- a/tasks/security_agent.py +++ b/tasks/security_agent.py @@ -52,7 +52,7 @@ def build( ctx, build_tags, race=False, - incremental_build=True, + rebuild=False, install_path=None, major_version='7', go_mod="readonly", @@ -100,7 +100,7 @@ def build( args = { "go_mod": go_mod, "race_opt": "-race" if race else "", - "build_type": "" if incremental_build else "-a", + "build_type": "-a" if rebuild else "", "go_build_tags": " ".join(build_tags), "agent_bin": BIN_PATH, "gcflags": gcflags, diff --git a/tasks/system_probe.py b/tasks/system_probe.py index c14c0541f8eaf..7478f31c415fc 100644 --- a/tasks/system_probe.py +++ b/tasks/system_probe.py @@ -676,7 +676,7 @@ def get_libpcap_cgo_flags(ctx, install_path: str = None): def build( ctx, race=False, - incremental_build=True, + rebuild=False, major_version='7', go_mod="readonly", arch: str = CURRENT_ARCH, @@ -711,7 +711,7 @@ def build( bundle_ebpf=bundle_ebpf, go_mod=go_mod, race=race, - incremental_build=incremental_build, + rebuild=rebuild, strip_binary=strip_binary, arch=arch, static=static, @@ -733,7 +733,7 @@ def clean( def build_sysprobe_binary( ctx, race=False, - incremental_build=True, + rebuild=False, major_version='7', go_mod="readonly", arch: str = CURRENT_ARCH, @@ -784,7 +784,7 @@ def build_sysprobe_binary( args = { "go_mod": go_mod, "race_opt": " -race" if race else "", - "build_type": "" if incremental_build else " -a", + "build_type": " -a" if rebuild else "", "go_build_tags": " ".join(build_tags), "agent_bin": binary, "gcflags": gcflags,