diff --git a/.gitlab/binary_build/system_probe.yml b/.gitlab/binary_build/system_probe.yml
index a12defc7cdb53..5d897fb7f5f3e 100644
--- a/.gitlab/binary_build/system_probe.yml
+++ b/.gitlab/binary_build/system_probe.yml
@@ -12,7 +12,7 @@
- find "$CI_BUILDS_DIR" ! -path '*DataDog/datadog-agent*' -delete || true # Allow failure, we can't remove parent folders of datadog-agent
script:
- inv check-go-version
- - inv -e system-probe.build --strip-object-files --no-bundle
+ - inv -e system-probe.build --strip-object-files
# fail if references to glibc >= 2.18
- objdump -p $CI_PROJECT_DIR/$SYSTEM_PROBE_BINARIES_DIR/system-probe | egrep 'GLIBC_2\.(1[8-9]|[2-9][0-9])' && exit 1
- inv -e system-probe.save-build-outputs $CI_PROJECT_DIR/sysprobe-build-outputs.tar.xz
diff --git a/.run/Build process-agent.run.xml b/.run/Build process-agent.run.xml
index 83f150ffea675..86a692091e442 100644
--- a/.run/Build process-agent.run.xml
+++ b/.run/Build process-agent.run.xml
@@ -12,7 +12,7 @@
-
+
diff --git a/.run/Build system-probe.run.xml b/.run/Build system-probe.run.xml
index 66fbc5e8112f0..253f0746744ff 100644
--- a/.run/Build system-probe.run.xml
+++ b/.run/Build system-probe.run.xml
@@ -13,7 +13,7 @@
-
+
diff --git a/docs/dev/agent_build.md b/docs/dev/agent_build.md
index fa05758d550f7..1896724f75403 100644
--- a/docs/dev/agent_build.md
+++ b/docs/dev/agent_build.md
@@ -52,7 +52,7 @@ Also note that the trace agent needs to be built and run separately. For more in
We use `pkg-config` to make compilers and linkers aware of Python. The required .pc files are
provided automatically when building python through omnibus.
-By default, the Agent combines multiple functionalities into a single binary to reduce
+As an option, the Agent can combine multiple functionalities into a single binary to reduce
the space used on disk. The `DD_BUNDLED_AGENT` environment variable is used to select
which functionality to enable. For instance, if set to `process-agent`, it will act as the process Agent.
If the environment variable is not defined, the process name is used as a fallback.
@@ -76,22 +76,6 @@ To disable bundling entirely:
deva agent.build --bundle agent
```
-One binary per Agent can still be built by using its own invoke task and passing the
-`--no-bundle` argument:
-- The 'main' Agent: https://github.com/DataDog/datadog-agent/blob/main/tasks/agent.py
-- The process Agent: https://github.com/DataDog/datadog-agent/blob/main/tasks/process_agent.py
-- The trace Agent: https://github.com/DataDog/datadog-agent/blob/main/tasks/trace_agent.py
-- The cluster Agent: https://github.com/DataDog/datadog-agent/blob/main/tasks/cluster_agent.py
-- The security Agent: https://github.com/DataDog/datadog-agent/blob/main/tasks/security_agent.py
-- The system probe: https://github.com/DataDog/datadog-agent/blob/main/tasks/system_probe.py
-
-So to build the process Agent as a standalone self contained executable:
-
-```
-deva process-agent.build --no-bundle
-```
-
-
## Testing Agent changes in containerized environments
Building an Agent Docker image from scratch through an embedded build is a slow process.
diff --git a/omnibus/config/software/datadog-agent.rb b/omnibus/config/software/datadog-agent.rb
index ee030c17aacca..ccf7da2ae1dfb 100644
--- a/omnibus/config/software/datadog-agent.rb
+++ b/omnibus/config/software/datadog-agent.rb
@@ -134,7 +134,7 @@
# Process agent
if not bundled_agents.include? "process-agent"
- command "invoke -e process-agent.build --install-path=#{install_dir} --major-version #{major_version_arg} --flavor #{flavor_arg} --no-bundle", :env => env
+ command "invoke -e process-agent.build --install-path=#{install_dir} --major-version #{major_version_arg} --flavor #{flavor_arg}", :env => env
end
if windows_target?
@@ -150,7 +150,7 @@
if windows_target?
command "invoke -e system-probe.build", env: env
elsif linux_target?
- command "invoke -e system-probe.build-sysprobe-binary --install-path=#{install_dir} --no-bundle", env: env
+ command "invoke -e system-probe.build-sysprobe-binary --install-path=#{install_dir}", env: env
end
end
@@ -173,7 +173,7 @@
secagent_support = (not heroku_target?) and (not windows_target? or (ENV['WINDOWS_DDPROCMON_DRIVER'] and not ENV['WINDOWS_DDPROCMON_DRIVER'].empty?))
if secagent_support
if not bundled_agents.include? "security-agent"
- command "invoke -e security-agent.build --install-path=#{install_dir} --major-version #{major_version_arg} --no-bundle", :env => env
+ command "invoke -e security-agent.build --install-path=#{install_dir} --major-version #{major_version_arg}", :env => env
end
if windows_target?
copy 'bin/security-agent/security-agent.exe', "#{install_dir}/bin/agent"
diff --git a/pkg/fleet/internal/oci/download.go b/pkg/fleet/internal/oci/download.go
index dbddf682494d5..dc8dbf3dc8726 100644
--- a/pkg/fleet/internal/oci/download.go
+++ b/pkg/fleet/internal/oci/download.go
@@ -10,11 +10,14 @@ import (
"context"
"errors"
"fmt"
+ "net"
"net/http"
"net/url"
+ "os"
"runtime"
"strconv"
"strings"
+ "syscall"
"time"
"github.com/awslabs/amazon-ecr-credential-helper/ecr-login"
@@ -320,10 +323,10 @@ func (d *DownloadedPackage) ExtractLayers(mediaType types.MediaType, dir string)
err = tar.Extract(uncompressedLayer, dir, layerMaxSize)
uncompressedLayer.Close()
if err != nil {
- if !isStreamResetError(err) {
+ if !isStreamResetError(err) && !isConnectionResetByPeerError(err) {
return fmt.Errorf("could not extract layer: %w", err)
}
- log.Warnf("stream error while extracting layer, retrying")
+ log.Warnf("network error while extracting layer, retrying")
// Clean up the directory before retrying to avoid partial extraction
err = tar.Clean(dir)
if err != nil {
@@ -381,6 +384,18 @@ func isStreamResetError(err error) bool {
return false
}
+// isConnectionResetByPeer returns true if the error is a connection reset by peer error
+func isConnectionResetByPeerError(err error) bool {
+ if netErr, ok := err.(*net.OpError); ok {
+ if syscallErr, ok := netErr.Err.(*os.SyscallError); ok {
+ if errno, ok := syscallErr.Err.(syscall.Errno); ok {
+ return errno == syscall.ECONNRESET
+ }
+ }
+ }
+ return false
+}
+
type usernamePasswordKeychain struct {
username string
password string
diff --git a/pkg/security/tests/activity_dumps_common.go b/pkg/security/tests/activity_dumps_common.go
index 0de24f7165c10..0115e6765b265 100644
--- a/pkg/security/tests/activity_dumps_common.go
+++ b/pkg/security/tests/activity_dumps_common.go
@@ -27,7 +27,6 @@ const (
)
var (
- testActivityDumpDuration = time.Minute * 10
testActivityDumpLoadControllerPeriod = time.Second * 10
)
diff --git a/pkg/security/tests/main_test.go b/pkg/security/tests/main_test.go
index 01c46181fc453..c9be26e73f733 100644
--- a/pkg/security/tests/main_test.go
+++ b/pkg/security/tests/main_test.go
@@ -34,6 +34,8 @@ func TestMain(m *testing.M) {
}
var (
+ commonCfgDir string
+
logLevelStr string
logPatterns stringSlice
logTags stringSlice
diff --git a/pkg/security/tests/module_tester.go b/pkg/security/tests/module_tester.go
index 62f9a99fac628..13c316a16b7b1 100644
--- a/pkg/security/tests/module_tester.go
+++ b/pkg/security/tests/module_tester.go
@@ -56,14 +56,19 @@ const (
Skip
)
const (
- getEventTimeout = 10 * time.Second
- filelessExecutionFilenamePrefix = "memfd:"
+ getEventTimeout = 10 * time.Second
)
var (
errSkipEvent = errors.New("skip event")
)
+const (
+ testActivityDumpDuration = time.Minute * 10
+)
+
+var testMod *testModule
+
func (s *stringSlice) String() string {
return strings.Join(*s, " ")
}
@@ -517,6 +522,29 @@ func (tm *testModule) Create(filename string) (string, unsafe.Pointer, error) {
return testFile, testPtr, err
}
+// NewTimeoutError returns a new timeout error with the metrics collected during the test
+func (tm *testModule) NewTimeoutError() ErrTimeout {
+ var msg strings.Builder
+
+ msg.WriteString("timeout, details: ")
+ tm.writePlatformSpecificTimeoutError(&msg)
+
+ events := tm.ruleEngine.StopEventCollector()
+ if len(events) != 0 {
+ msg.WriteString("\nevents evaluated:\n")
+
+ for _, event := range events {
+ msg.WriteString(fmt.Sprintf("%s (eval=%v) {\n", event.Type, event.EvalResult))
+ for field, value := range event.Fields {
+ msg.WriteString(fmt.Sprintf("\t%s=%v,\n", field, value))
+ }
+ msg.WriteString("}\n")
+ }
+ }
+
+ return ErrTimeout{msg.String()}
+}
+
func (tm *testModule) WaitSignal(tb testing.TB, action func() error, cb onRuleHandler) {
tb.Helper()
@@ -886,3 +914,18 @@ func jsonPathValidation(testMod *testModule, data []byte, fnc func(testMod *test
fnc(testMod, obj)
}
+
+type onRuleHandler func(*model.Event, *rules.Rule)
+type onProbeEventHandler func(*model.Event)
+type onCustomSendEventHandler func(*rules.Rule, *events.CustomEvent)
+type onSendEventHandler func(*rules.Rule, *model.Event)
+type onDiscarderPushedHandler func(event eval.Event, field eval.Field, eventType eval.EventType) bool
+
+type eventHandlers struct {
+ sync.RWMutex
+ onRuleMatch onRuleHandler
+ onProbeEvent onProbeEventHandler
+ onCustomSendEvent onCustomSendEventHandler
+ onSendEvent onSendEventHandler
+ onDiscarderPushed onDiscarderPushedHandler
+}
diff --git a/pkg/security/tests/module_tester_linux.go b/pkg/security/tests/module_tester_linux.go
index 86939f3db10cc..b26b8315308eb 100644
--- a/pkg/security/tests/module_tester_linux.go
+++ b/pkg/security/tests/module_tester_linux.go
@@ -38,14 +38,12 @@ import (
"github.com/DataDog/datadog-agent/pkg/eventmonitor"
secconfig "github.com/DataDog/datadog-agent/pkg/security/config"
"github.com/DataDog/datadog-agent/pkg/security/ebpf/kernel"
- "github.com/DataDog/datadog-agent/pkg/security/events"
"github.com/DataDog/datadog-agent/pkg/security/module"
sprobe "github.com/DataDog/datadog-agent/pkg/security/probe"
"github.com/DataDog/datadog-agent/pkg/security/proto/api"
cgroupModel "github.com/DataDog/datadog-agent/pkg/security/resolvers/cgroup/model"
rulesmodule "github.com/DataDog/datadog-agent/pkg/security/rules"
"github.com/DataDog/datadog-agent/pkg/security/rules/bundled"
- "github.com/DataDog/datadog-agent/pkg/security/secl/compiler/eval"
"github.com/DataDog/datadog-agent/pkg/security/secl/model"
"github.com/DataDog/datadog-agent/pkg/security/secl/rules"
activity_tree "github.com/DataDog/datadog-agent/pkg/security/security_profile/activity_tree"
@@ -62,6 +60,10 @@ var (
logger seelog.LoggerInterface
)
+const (
+ filelessExecutionFilenamePrefix = "memfd:"
+)
+
const testConfig = `---
log_level: DEBUG
system_probe_config:
@@ -229,24 +231,6 @@ type testModule struct {
msgSender *fakeMsgSender
}
-var testMod *testModule
-var commonCfgDir string
-
-type onRuleHandler func(*model.Event, *rules.Rule)
-type onProbeEventHandler func(*model.Event)
-type onCustomSendEventHandler func(*rules.Rule, *events.CustomEvent)
-type onSendEventHandler func(*rules.Rule, *model.Event)
-type onDiscarderPushedHandler func(event eval.Event, field eval.Field, eventType eval.EventType) bool
-
-type eventHandlers struct {
- sync.RWMutex
- onRuleMatch onRuleHandler
- onProbeEvent onProbeEventHandler
- onCustomSendEvent onCustomSendEventHandler
- onSendEvent onSendEventHandler
- onDiscarderPushed onDiscarderPushedHandler
-}
-
//nolint:deadcode,unused
func getInode(tb testing.TB, path string) uint64 {
fileInfo, err := os.Lstat(path)
@@ -1620,28 +1604,9 @@ func (tm *testModule) GetADSelector(dumpID *activityDumpIdentifier) (*cgroupMode
return &selector, err
}
-// NewTimeoutError returns a new timeout error with the metrics collected during the test
-func (tm *testModule) NewTimeoutError() ErrTimeout {
- var msg strings.Builder
-
- msg.WriteString("timeout, details: ")
- msg.WriteString(GetEBPFStatusMetrics(tm.probe))
- msg.WriteString(spew.Sdump(ebpftelemetry.GetProbeStats()))
-
- events := tm.ruleEngine.StopEventCollector()
- if len(events) != 0 {
- msg.WriteString("\nevents evaluated:\n")
-
- for _, event := range events {
- msg.WriteString(fmt.Sprintf("%s (eval=%v) {\n", event.Type, event.EvalResult))
- for field, value := range event.Fields {
- msg.WriteString(fmt.Sprintf("\t%s=%v,\n", field, value))
- }
- msg.WriteString("}\n")
- }
- }
-
- return ErrTimeout{msg.String()}
+func (tm *testModule) writePlatformSpecificTimeoutError(b *strings.Builder) {
+ b.WriteString(GetEBPFStatusMetrics(tm.probe))
+ b.WriteString(spew.Sdump(ebpftelemetry.GetProbeStats()))
}
func (tm *testModule) WaitSignals(tb testing.TB, action func() error, cbs ...func(event *model.Event, rule *rules.Rule) error) {
diff --git a/pkg/security/tests/module_tester_windows.go b/pkg/security/tests/module_tester_windows.go
index d6775ea22c6dd..daa73104be27a 100644
--- a/pkg/security/tests/module_tester_windows.go
+++ b/pkg/security/tests/module_tester_windows.go
@@ -14,28 +14,20 @@ import (
"strings"
"sync"
"testing"
- "time"
"github.com/hashicorp/go-multierror"
"github.com/DataDog/datadog-agent/pkg/eventmonitor"
secconfig "github.com/DataDog/datadog-agent/pkg/security/config"
- "github.com/DataDog/datadog-agent/pkg/security/events"
"github.com/DataDog/datadog-agent/pkg/security/module"
sprobe "github.com/DataDog/datadog-agent/pkg/security/probe"
rulesmodule "github.com/DataDog/datadog-agent/pkg/security/rules"
- "github.com/DataDog/datadog-agent/pkg/security/secl/compiler/eval"
"github.com/DataDog/datadog-agent/pkg/security/secl/model"
"github.com/DataDog/datadog-agent/pkg/security/secl/rules"
"github.com/DataDog/datadog-agent/pkg/security/tests/statsdclient"
"github.com/DataDog/datadog-agent/pkg/util/log"
)
-var (
- testActivityDumpDuration = time.Second * 30
- testActivityDumpLoadControllerPeriod = time.Second * 10
-)
-
const testConfig = `---
log_level: DEBUG
@@ -43,8 +35,6 @@ event_monitoring_config:
remote_tagger: false
custom_sensitive_words:
- "*custom*"
- network:
- enabled: true
flush_discarder_window: 0
{{if .DisableFilters}}
enable_kernel_filters: false
@@ -55,8 +45,6 @@ event_monitoring_config:
{{if .DisableDiscarders}}
enable_discarders: false
{{end}}
- erpc_dentry_resolution_enabled: {{ .ErpcDentryResolutionEnabled }}
- map_dentry_resolution_enabled: {{ .MapDentryResolutionEnabled }}
envs_with_value:
{{range .EnvsWithValue}}
- {{.}}
@@ -75,49 +63,6 @@ runtime_security_config:
sbom:
enabled: {{ .SBOMEnabled }}
fim_enabled: {{ .FIMEnabled }}
- activity_dump:
- enabled: {{ .EnableActivityDump }}
-{{if .EnableActivityDump}}
- rate_limiter: {{ .ActivityDumpRateLimiter }}
- tag_rules:
- enabled: {{ .ActivityDumpTagRules }}
- dump_duration: {{ .ActivityDumpDuration }}
- {{if .ActivityDumpLoadControllerPeriod }}
- load_controller_period: {{ .ActivityDumpLoadControllerPeriod }}
- {{end}}
- {{if .ActivityDumpCleanupPeriod }}
- cleanup_period: {{ .ActivityDumpCleanupPeriod }}
- {{end}}
- {{if .ActivityDumpLoadControllerTimeout }}
- min_timeout: {{ .ActivityDumpLoadControllerTimeout }}
- {{end}}
- traced_cgroups_count: {{ .ActivityDumpTracedCgroupsCount }}
- cgroup_differentiate_args: {{ .ActivityDumpCgroupDifferentiateArgs }}
- auto_suppression:
- enabled: {{ .ActivityDumpAutoSuppressionEnabled }}
- traced_event_types: {{range .ActivityDumpTracedEventTypes}}
- - {{.}}
- {{end}}
- local_storage:
- output_directory: {{ .ActivityDumpLocalStorageDirectory }}
- compression: {{ .ActivityDumpLocalStorageCompression }}
- formats: {{range .ActivityDumpLocalStorageFormats}}
- - {{.}}
- {{end}}
-{{end}}
- security_profile:
- enabled: {{ .EnableSecurityProfile }}
-{{if .EnableSecurityProfile}}
- dir: {{ .SecurityProfileDir }}
- watch_dir: {{ .SecurityProfileWatchDir }}
- anomaly_detection:
- enabled: true
- default_minimum_stable_period: {{.AnomalyDetectionDefaultMinimumStablePeriod}}
- minimum_stable_period:
- exec: {{.AnomalyDetectionMinimumStablePeriodExec}}
- dns: {{.AnomalyDetectionMinimumStablePeriodDNS}}
- workload_warmup_period: {{.AnomalyDetectionWarmupPeriod}}
-{{end}}
self_test:
enabled: false
@@ -132,8 +77,6 @@ runtime_security_config:
{{range .LogTags}}
- {{.}}
{{end}}
- ebpfless:
- enabled: {{.EBPFLessEnabled}}
enforcement:
exclude_binaries:
- {{ .EnforcementExcludeBinary }}
@@ -148,21 +91,6 @@ runtime_security_config:
period: {{.EnforcementDisarmerExecutablePeriod}}
`
-type onRuleHandler func(*model.Event, *rules.Rule)
-type onProbeEventHandler func(*model.Event)
-type onCustomSendEventHandler func(*rules.Rule, *events.CustomEvent)
-type onSendEventHandler func(*rules.Rule, *model.Event)
-type onDiscarderPushedHandler func(event eval.Event, field eval.Field, eventType eval.EventType) bool
-
-type eventHandlers struct {
- sync.RWMutex
- onRuleMatch onRuleHandler
- onProbeEvent onProbeEventHandler
- onCustomSendEvent onCustomSendEventHandler
- onSendEvent onSendEventHandler
- onDiscarderPushed onDiscarderPushedHandler
-}
-
type testModule struct {
sync.RWMutex
secconfig *secconfig.Config
@@ -179,9 +107,6 @@ type testModule struct {
ruleEngine *rulesmodule.RuleEngine
}
-var testMod *testModule
-var commonCfgDir string
-
func newTestModule(t testing.TB, macroDefs []*rules.MacroDefinition, ruleDefs []*rules.RuleDefinition, fopts ...optFunc) (*testModule, error) {
var opts tmOpts
@@ -300,24 +225,5 @@ func (tm *testModule) Close() {
tm.eventMonitor.Close()
}
-// NewTimeoutError returns a new timeout error with the metrics collected during the test
-func (tm *testModule) NewTimeoutError() ErrTimeout {
- var msg strings.Builder
-
- msg.WriteString("timeout, details: ")
-
- events := tm.ruleEngine.StopEventCollector()
- if len(events) != 0 {
- msg.WriteString("\nevents evaluated:\n")
-
- for _, event := range events {
- msg.WriteString(fmt.Sprintf("%s (eval=%v) {\n", event.Type, event.EvalResult))
- for field, value := range event.Fields {
- msg.WriteString(fmt.Sprintf("\t%s=%v,\n", field, value))
- }
- msg.WriteString("}\n")
- }
- }
-
- return ErrTimeout{msg.String()}
+func (tm *testModule) writePlatformSpecificTimeoutError(b *strings.Builder) {
}
diff --git a/tasks/agent.py b/tasks/agent.py
index e8ca235e145b9..ea0a77da5a501 100644
--- a/tasks/agent.py
+++ b/tasks/agent.py
@@ -37,12 +37,6 @@
BIN_PATH = os.path.join(BIN_DIR, "agent")
AGENT_TAG = "datadog/agent:master"
-BUNDLED_AGENTS = {
- # system-probe requires a working compilation environment for eBPF so we do not
- # enable it by default but we enable it in the released artifacts.
- AgentFlavor.base: ["process-agent", "trace-agent", "security-agent"],
-}
-
if sys.platform == "win32":
# Our `ridk enable` toolchain puts Ruby's bin dir at the front of the PATH
# This dir contains `aws.rb` which will execute if we just call `aws`,
@@ -192,7 +186,7 @@ def build(
out="cmd/agent/rsrc.syso",
)
else:
- bundled_agents += bundle or BUNDLED_AGENTS.get(flavor, [])
+ bundled_agents += bundle or []
if flavor.is_iot():
# Iot mode overrides whatever passed through `--build-exclude` and `--build-include`
diff --git a/tasks/kmt.py b/tasks/kmt.py
index f41420fac79e7..12b0ac2ba1953 100644
--- a/tasks/kmt.py
+++ b/tasks/kmt.py
@@ -1326,7 +1326,7 @@ def build(
build_task = "build-sysprobe-binary" if component == "system-probe" else "build"
cc.exec(
- f"cd {CONTAINER_AGENT_PATH} && git config --global --add safe.directory {CONTAINER_AGENT_PATH} && inv {inv_echo} {component}.{build_task} --no-bundle --arch={arch_obj.name}",
+ f"cd {CONTAINER_AGENT_PATH} && git config --global --add safe.directory {CONTAINER_AGENT_PATH} && inv {inv_echo} {component}.{build_task} --arch={arch_obj.name}",
)
cc.exec(f"tar cf {CONTAINER_AGENT_PATH}/kmt-deps/{stack}/build-embedded-dir.tar {EMBEDDED_SHARE_DIR}")
diff --git a/tasks/process_agent.py b/tasks/process_agent.py
index bc1ac4ed1d60a..6c3481d9c5213 100644
--- a/tasks/process_agent.py
+++ b/tasks/process_agent.py
@@ -6,7 +6,6 @@
from invoke import task
from invoke.exceptions import Exit
-from tasks.agent import build as agent_build
from tasks.build_tags import filter_incompatible_tags, get_build_tags, get_default_build_tags
from tasks.flavor import AgentFlavor
from tasks.libs.common.utils import REPO_PATH, bin_name, get_build_flags
@@ -28,21 +27,10 @@ def build(
incremental_build=False,
major_version='7',
go_mod="mod",
- bundle=True,
):
"""
Build the process agent
"""
- if bundle and sys.platform != "win32":
- return agent_build(
- ctx,
- race=race,
- build_include=build_include,
- build_exclude=build_exclude,
- flavor=flavor,
- major_version=major_version,
- go_mod=go_mod,
- )
flavor = AgentFlavor[flavor]
if flavor.is_ot():
diff --git a/tasks/security_agent.py b/tasks/security_agent.py
index fa0ddd867471d..9283d9ec1e1ff 100644
--- a/tasks/security_agent.py
+++ b/tasks/security_agent.py
@@ -13,7 +13,6 @@
from invoke.exceptions import Exit
from invoke.tasks import task
-from tasks.agent import build as agent_build
from tasks.agent import generate_config
from tasks.build_tags import get_default_build_tags
from tasks.go import run_golangci_lint
@@ -60,18 +59,10 @@ def build(
go_mod="mod",
skip_assets=False,
static=False,
- bundle=True,
):
"""
Build the security agent
"""
- if bundle and sys.platform != "win32":
- return agent_build(
- ctx,
- install_path=install_path,
- race=race,
- go_mod=go_mod,
- )
ldflags, gcflags, env = get_build_flags(ctx, major_version=major_version, static=static, install_path=install_path)
diff --git a/tasks/system_probe.py b/tasks/system_probe.py
index 2225b234951f7..2517cc71a2edd 100644
--- a/tasks/system_probe.py
+++ b/tasks/system_probe.py
@@ -19,10 +19,7 @@
from invoke.exceptions import Exit
from invoke.tasks import task
-from tasks.agent import BUNDLED_AGENTS
-from tasks.agent import build as agent_build
from tasks.build_tags import UNIT_TEST_TAGS, get_default_build_tags
-from tasks.flavor import AgentFlavor
from tasks.libs.build.ninja import NinjaWriter
from tasks.libs.common.color import color_message
from tasks.libs.common.git import get_commit_sha
@@ -685,7 +682,6 @@ def build(
strip_object_files=False,
strip_binary=False,
with_unit_test=False,
- bundle=True,
ebpf_compiler='clang',
static=False,
):
@@ -712,7 +708,6 @@ def build(
race=race,
incremental_build=incremental_build,
strip_binary=strip_binary,
- bundle=bundle,
arch=arch,
static=static,
)
@@ -740,19 +735,8 @@ def build_sysprobe_binary(
install_path=None,
bundle_ebpf=False,
strip_binary=False,
- bundle=True,
static=False,
) -> None:
- if bundle and not is_windows:
- return agent_build(
- ctx,
- race=race,
- major_version=major_version,
- go_mod=go_mod,
- bundle_ebpf=bundle_ebpf,
- bundle=BUNDLED_AGENTS[AgentFlavor.base] + ["system-probe"],
- )
-
arch_obj = Arch.from_str(arch)
ldflags, gcflags, env = get_build_flags(
diff --git a/tasks/trace_agent.py b/tasks/trace_agent.py
index c3718e53e4145..812116eeb3c32 100644
--- a/tasks/trace_agent.py
+++ b/tasks/trace_agent.py
@@ -3,7 +3,6 @@
from invoke import Exit, task
-from tasks.agent import build as agent_build
from tasks.build_tags import filter_incompatible_tags, get_build_tags, get_default_build_tags
from tasks.flavor import AgentFlavor
from tasks.libs.common.utils import REPO_PATH, bin_name, get_build_flags
@@ -23,23 +22,11 @@ def build(
install_path=None,
major_version='7',
go_mod="mod",
- bundle=False,
):
"""
Build the trace agent.
"""
- if bundle:
- return agent_build(
- ctx,
- race=race,
- build_include=build_include,
- build_exclude=build_exclude,
- flavor=flavor,
- major_version=major_version,
- go_mod=go_mod,
- )
-
flavor = AgentFlavor[flavor]
if flavor.is_ot():
flavor = AgentFlavor.base