Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
d665ab8
feat(airlock): add native process driver for non-containerized tests
thieman May 21, 2026
67f1776
feat(panoramic): add native_macos runtime for integration tests
thieman May 21, 2026
edca625
test(integration): enable basic-startup on native_macos runtime
thieman May 21, 2026
5c6d5df
build: add test-integration-macos make target for native macOS tests
thieman May 21, 2026
7539f27
docs: add macOS native integration tests implementation plan
thieman May 21, 2026
a64af8f
fix(panoramic): native runner provisions per-test datadog.yaml
thieman May 21, 2026
8069d79
feat(panoramic): add --runtime filter to the run subcommand
thieman May 26, 2026
4080ede
feat(panoramic): populate identity port_mappings in native runner + e…
thieman May 26, 2026
2766c2d
feat(panoramic): support converged tests in native_macos runtime
thieman May 26, 2026
257a7e1
test(integration): enable 3 converged tests on native_macos runtime
thieman May 26, 2026
c365aaa
fix(panoramic): set DD_AUTH_TOKEN_FILE_PATH on the Core Agent too
thieman May 26, 2026
68cd7c6
feat(panoramic): add native code path to file_contains + propagate AP…
thieman May 26, 2026
d44faf2
test(integration): enable 5 more converged tests on native_macos
thieman May 26, 2026
0ac30a7
feat(panoramic): observe real native process exits + add runtime-awar…
thieman May 26, 2026
1d27828
test(integration): enable 3 more tests on native_macos via adp_exits_…
thieman May 26, 2026
e308a66
ci: wire up native_macos integration tests on the macOS runners
thieman May 26, 2026
44fd6e6
chore(docs): fix vale lint errors
thieman May 26, 2026
20b3498
refactor(panoramic): drop dead native path on process_exits_with; sma…
thieman May 27, 2026
4ad4a11
refactor(airlock): always put spawned processes in their own group
thieman May 27, 2026
8ba72a3
refactor(panoramic): extract shared run_assertion_steps used by both …
thieman May 27, 2026
6e6d0c2
refactor(airlock): drop unused NativeProcess surface
thieman May 27, 2026
10fef72
build: drop local-dev convenience target test-integration-macos
thieman May 27, 2026
33fa96f
chore(docs): add native_macos to vale vocabulary
thieman May 27, 2026
5b517fe
docs: refresh stale comments in native runner / native process module
thieman May 27, 2026
c7f5fe8
refactor(panoramic): scope runtime at the CLI level, drop per-test ex…
thieman May 27, 2026
9d56103
ci: mark macOS jobs as interruptible
thieman May 27, 2026
d768cfc
refactor(panoramic): tighten runtime semantics from review feedback
thieman May 27, 2026
b776568
build: verify Datadog Agent version in provision-macos-test-env
thieman May 27, 2026
6712fcf
refactor: rename native/native_macos to mac/unix/host_process
thieman May 27, 2026
b56532f
build: install Datadog Agent into /tmp sandbox; centralize test port …
thieman May 28, 2026
686ac82
chore(docs): fix vale lint errors in unix_runner.rs
thieman May 28, 2026
68fe1e4
ci: stop pkilling /opt/datadog-agent in macOS e2e before_script
thieman May 28, 2026
3466d68
build: strip xattrs after pkg extraction in provision-macos-test-env
thieman May 28, 2026
b6b153e
ci: opt the pipeline into interruptible auto-cancel on new commits
thieman May 28, 2026
2dd590d
build: fix shell syntax error in provision-macos-test-env
thieman May 28, 2026
637d8ca
build: add diagnostics to bootstrap step on macOS provision
thieman May 28, 2026
a478503
build: set DD_AUTH_TOKEN_FILE_PATH explicitly in macOS bootstrap
thieman May 28, 2026
b57a22a
build: simplify after CI confirmed which mitigations were necessary
thieman May 28, 2026
8d83c4c
feat(panoramic): unix_runner writes captured stdout/stderr to disk
thieman May 28, 2026
c84babe
ci: sweep stranded agent-data-plane processes from prior runs
thieman May 28, 2026
c2423c8
ci: move macOS arm64 jobs to the shared virtualized Tart runner pool
thieman May 28, 2026
fe5e9a4
refactor: simplification pass on the macos integration changes
thieman May 28, 2026
60efe1c
refactor(panoramic): hoist 'env' out of 'container' into a top-level …
thieman May 28, 2026
56fa0e7
chore(docs): fix em-dash spacing in env field docstring
thieman May 28, 2026
c780fd0
build: run check-docs in the pre-commit hook
thieman May 28, 2026
9ab4324
refactor(panoramic): move port-isolation env helper out of unix_runner
thieman May 28, 2026
f213245
build: seed empty datadog.yaml before bootstrap Agent runs
thieman May 28, 2026
964d00b
fix(panoramic): make PanoramicLogSink::push_line synchronous
thieman May 29, 2026
13314a0
ci: collect host-level diagnostics into the integration-logs artifact
thieman May 29, 2026
591af05
fix(panoramic): seed IPC credentials for standalone mac tests
thieman May 29, 2026
98ac521
fix(panoramic): keep mac ADP log files in test state dirs
thieman May 29, 2026
ea9119e
test(panoramic): split ADP log path tests by runtime
thieman May 29, 2026
afa587d
fix(panoramic): clean up mac test state directories
thieman May 29, 2026
a1f12f0
fix(panoramic): always run Core Agent in mac integration tests
thieman May 29, 2026
4f644c5
fix(panoramic): disable Core Agent DogStatsD when ADP owns it
thieman May 29, 2026
17bb8e3
Merge remote-tracking branch 'origin/main' into thieman/macos-integra…
thieman Jun 1, 2026
09379a5
test(panoramic): adapt adp config no-warn case for mac runtime
thieman Jun 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ make check-fmt
make check-clippy
make check-licenses
make check-deny
make check-docs
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Driveby but this should have been in here already

make generate-api-docs

echo "[*] Pre-commit checks passed."
26 changes: 25 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ stages:
#
# This mostly controls how we tag our ADP container images and set various bits of metadata.
workflow:
# Auto-cancel any interruptible jobs from a previous pipeline when a new commit lands on the
# same ref. The default ('conservative') only cancels the pipeline if no non-interruptible
# job has started yet — since our Linux jobs are non-interruptible and start immediately,
# that mode effectively never cancels anything. 'interruptible' cancels just the jobs marked
# interruptible: true (currently the macOS unit + integration jobs, which run on scarce
# bare-metal runner capacity); non-interruptible jobs continue to completion as before.
# https://docs.gitlab.com/ci/yaml/#workflowauto_cancelon_new_commit
auto_cancel:
on_new_commit: interruptible
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made Mac jobs specifically interruptible and added this definition to the workflow so they'll get canceled when new commits get pushed. Our Mac capacity is constrained, we only have 3 concurrent AMD64 runners across the project.

rules:
- if: $CI_COMMIT_TAG == null
variables:
Expand Down Expand Up @@ -151,8 +160,23 @@ default:
KUBERNETES_MEMORY_REQUEST: "8Gi"
KUBERNETES_MEMORY_LIMIT: "12Gi"

# Shared mixins for macOS runner jobs.
#
# arm64 jobs use the shared virtualized macOS Tart runner pool (`macos:tart`). Each job runs
# in a fresh VM, which gives clean isolation between pipelines, decouples the host toolchain,
# and lets two jobs share a single `mac2.metal` host. amd64 still uses the dedicated bare-metal
# pool (`macos:sonoma-amd64`); migrating it requires equivalent infra that isn't yet in place.
#
# `interruptible: true` is set here so every macOS job inherits it. macOS runner capacity in
# the GitLab fleet is finite; auto-cancelling superseded pipelines (for example, after a quick
# fixup push to an open PR) frees the runner immediately instead of holding the slot for the
# duration of the now-stale run. See:
# https://docs.gitlab.com/ci/yaml/#interruptible
.macos-amd64-test-job:
tags: ["macos:sonoma-amd64", "specific:true"]
interruptible: true

.macos-arm64-test-job:
tags: ["macos:sonoma-arm64", "specific:true"]
tags: ["macos:tart"]
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/ci-platform-machine-images/tart-vm:saluki-sonoma-latest
interruptible: true
56 changes: 56 additions & 0 deletions .gitlab/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,59 @@ test-integration:
- docker pull ${SALUKI_IMAGE_REPO_BASE}/bundled-agent-adp:${CI_COMMIT_SHA}
- docker tag ${SALUKI_IMAGE_REPO_BASE}/bundled-agent-adp:${CI_COMMIT_SHA} saluki-images/datadog-agent:testing-devel
- make test-integration-quick

# Runs the subset of integration tests that have opted in to the `mac` runtime
# directly on a bare-metal macOS runner. No Docker, no virtualization: panoramic spawns ADP
# (and the Core Agent for converged tests) as real macOS processes against a per-test temp
# state directory. The Datadog Agent is installed into a sandbox under /tmp/saluki-dda by
# the Makefile target (idempotent: re-uses the install across runs if the pinned version is
# already present). The sandbox install never touches /opt/datadog-agent, so any system
# install on the runner is left alone.
.test-integration-macos-base:
stage: e2e
needs: []
retry: 2
timeout: 30m
artifacts:
expire_in: 1 week
paths:
- integration-logs/
when: always
variables:
PANORAMIC_LOG_DIR: integration-logs
before_script:
# Defensive: clean up any leftover Agent/ADP processes from prior runs on this shared
# runner. All test-Agent ports are shifted out of the canonical range (see
# panoramic::test_env::port_isolation_env), so we don't need to touch a system
# install at /opt/datadog-agent. We do need to sweep:
# - our own Core Agent sandbox under /tmp/saluki-dda (trace-agent / process-agent
# children that survived a non-graceful job termination still hold our shifted ports)
# - any stranded agent-data-plane process from a prior pipeline (built into
# $CI_PROJECT_DIR/target/release/, holds UDP 58125 / TCP 5100–5102 etc. across runs)
- sudo pkill -9 -f /tmp/saluki-dda/ || true
- sudo pkill -9 -f /target/release/agent-data-plane || true
script:
- make test-integration-macos-ci
after_script:
# Collect host-level diagnostics into the artifact so we have something to debug from
# when something fails outside panoramic's per-test log capture (bootstrap-Agent failures,
# system state, stranded processes from this run). Runs whether the test step passed or
# failed.
- mkdir -p integration-logs/host-diag
- sw_vers > integration-logs/host-diag/sw_vers.txt 2>&1 || true
- uname -a > integration-logs/host-diag/uname.txt 2>&1 || true
- mount > integration-logs/host-diag/mount.txt 2>&1 || true
- df -h > integration-logs/host-diag/df.txt 2>&1 || true
- ps -axo pid,ppid,user,command > integration-logs/host-diag/ps.txt 2>&1 || true
- cp /tmp/saluki-agent-bootstrap.log integration-logs/host-diag/saluki-agent-bootstrap.log 2>/dev/null || true
- ls -la /tmp/saluki-dda/datadog-agent/etc/ > integration-logs/host-diag/sandbox-etc.txt 2>&1 || true

test-integration-macos-arm64:
extends:
- .macos-arm64-test-job
- .test-integration-macos-base

test-integration-macos-amd64:
extends:
- .macos-amd64-test-job
- .test-integration-macos-base
1 change: 1 addition & 0 deletions .vale/styles/config/vocabularies/technical/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,4 @@ libtest
mpmc
dhat
profiler
launchd
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

96 changes: 96 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ export ADP_APP_BUILD_TIME := $(APP_BUILD_TIME)
# ADP-specific settings used when running.
export ADP_STANDALONE_IPC_CERT_FILE := /tmp/adp-ipc-cert.pem

# macOS integration-test settings.
MACOS_TEST_AGENT_VERSION ?= 7.78.0
MACOS_TEST_AGENT_DMG_DIR ?= /tmp/saluki-dda-dmg-cache
MACOS_TEST_AGENT_DMG_URL ?= https://s3.amazonaws.com/dd-agent/datadog-agent-$(MACOS_TEST_AGENT_VERSION)-1.$(shell uname -m).dmg
MACOS_TEST_AGENT_INSTALL_DIR ?= /tmp/saluki-dda/datadog-agent

# General build settings used for tooling, etc.
export GO_BUILD_IMAGE ?= golang:1.23-bullseye
export GO_APP_IMAGE ?= ubuntu:24.04
Expand Down Expand Up @@ -569,6 +575,96 @@ list-integration-tests: build-panoramic
list-integration-tests: ## Lists available ADP integration tests
@target/release/panoramic list -d $(shell pwd)/test/integration/cases

.PHONY: build-adp-host
build-adp-host: check-rust-build-tools
build-adp-host: ## Builds the agent-data-plane binary for the current host (release profile)
@echo "[*] Building agent-data-plane (release, host target)..."
@APP_FULL_NAME="$(ADP_APP_FULL_NAME)" \
APP_SHORT_NAME="$(ADP_APP_SHORT_NAME)" \
APP_IDENTIFIER="$(ADP_APP_IDENTIFIER)" \
APP_GIT_HASH="$(ADP_APP_GIT_HASH)" \
APP_VERSION="$(ADP_APP_VERSION)" \
APP_BUILD_DATE="$(ADP_APP_BUILD_DATE)" \
cargo build --release --bin agent-data-plane

.PHONY: test-integration-macos-run
test-integration-macos-run: ## Runs the macOS host-process integration tests using already-built binaries (assumes target/release/{panoramic,agent-data-plane} exist). Defaults to all `mac`-runtime-eligible tests; narrow with CASE=<name>.
@echo "[*] Running macOS host-process integration tests..."
@ADP_BINARY_PATH="$(CURDIR)/target/release/agent-data-plane" \
CORE_AGENT_BINARY_PATH="$(MACOS_TEST_AGENT_INSTALL_DIR)/bin/agent/agent" \
target/release/panoramic run -d "$(CURDIR)/test/integration/cases" \
$(if $(CASE),-t $(CASE)) --no-tui -p 1 \
$(if $(PANORAMIC_LOG_DIR),-l $(PANORAMIC_LOG_DIR))

.PHONY: provision-macos-test-env
provision-macos-test-env: ## Installs the pinned Datadog Agent ($(MACOS_TEST_AGENT_VERSION)) into $(MACOS_TEST_AGENT_INSTALL_DIR) (a sandbox under /tmp) and bootstraps the IPC cert. Idempotent: re-uses the install if it already matches the pinned version.
@echo "[*] Provisioning macOS test environment..."
@if [ "$(shell uname -s)" != "Darwin" ]; then \
echo "provision-macos-test-env only runs on macOS hosts" >&2; exit 1; \
fi
@if [ -x $(MACOS_TEST_AGENT_INSTALL_DIR)/bin/agent/agent ] && \
[ "$$($(MACOS_TEST_AGENT_INSTALL_DIR)/bin/agent/agent version 2>/dev/null | awk '{print $$2}')" = "$(MACOS_TEST_AGENT_VERSION)" ]; then \
echo "[*] Datadog Agent $(MACOS_TEST_AGENT_VERSION) already extracted to $(MACOS_TEST_AGENT_INSTALL_DIR)"; \
else \
echo "[*] Installing Datadog Agent $(MACOS_TEST_AGENT_VERSION) into $(MACOS_TEST_AGENT_INSTALL_DIR)..."; \
mkdir -p $(MACOS_TEST_AGENT_DMG_DIR); \
DMG_PATH=$(MACOS_TEST_AGENT_DMG_DIR)/datadog-agent-$(MACOS_TEST_AGENT_VERSION).dmg; \
if [ ! -f "$$DMG_PATH" ]; then \
curl -fL "$(MACOS_TEST_AGENT_DMG_URL)" -o "$$DMG_PATH"; \
fi; \
MOUNT_DIR=$$(mktemp -d /tmp/saluki-dda-mount-XXXXXX); \
hdiutil attach "$$DMG_PATH" -mountpoint "$$MOUNT_DIR" -nobrowse >/dev/null; \
PKG=$$(find "$$MOUNT_DIR" -name '*.pkg' | head -1); \
EXPAND_DIR=$$(mktemp -d /tmp/saluki-dda-expand-XXXXXX) && rm -rf "$$EXPAND_DIR"; \
pkgutil --expand-full "$$PKG" "$$EXPAND_DIR" >/dev/null; \
hdiutil detach "$$MOUNT_DIR" >/dev/null; \
rmdir "$$MOUNT_DIR" 2>/dev/null || true; \
PAYLOAD_DIR=$$(find "$$EXPAND_DIR" -type d -name Payload | head -1); \
if [ -z "$$PAYLOAD_DIR" ] || [ ! -x "$$PAYLOAD_DIR/bin/agent/agent" ]; then \
echo "ERROR: pkg payload did not contain bin/agent/agent. Expanded layout:" >&2; \
find "$$EXPAND_DIR" -maxdepth 3 -type d >&2; \
exit 1; \
fi; \
rm -rf $(MACOS_TEST_AGENT_INSTALL_DIR); \
mkdir -p $$(dirname $(MACOS_TEST_AGENT_INSTALL_DIR)); \
mv "$$PAYLOAD_DIR" $(MACOS_TEST_AGENT_INSTALL_DIR); \
rm -rf "$$EXPAND_DIR"; \
test -x $(MACOS_TEST_AGENT_INSTALL_DIR)/bin/agent/agent; \
fi
@if [ ! -f $(MACOS_TEST_AGENT_INSTALL_DIR)/etc/ipc_cert.pem ] || [ ! -f $(MACOS_TEST_AGENT_INSTALL_DIR)/etc/auth_token ]; then \
echo "[*] Bootstrapping IPC cert + auth_token by running the Agent briefly..."; \
mkdir -p $(MACOS_TEST_AGENT_INSTALL_DIR)/etc $(MACOS_TEST_AGENT_INSTALL_DIR)/run; \
touch $(MACOS_TEST_AGENT_INSTALL_DIR)/etc/datadog.yaml; \
DD_API_KEY=bootstrap DD_HOSTNAME=bootstrap \
DD_RUN_PATH=$(MACOS_TEST_AGENT_INSTALL_DIR)/run \
DD_AUTH_TOKEN_FILE_PATH=$(MACOS_TEST_AGENT_INSTALL_DIR)/etc/auth_token \
DD_IPC_CERT_FILE_PATH=$(MACOS_TEST_AGENT_INSTALL_DIR)/etc/ipc_cert.pem \
DD_CMD_PORT=55001 DD_GUI_PORT=-1 \
DD_EXPVAR_PORT=55000 DD_APM_RECEIVER_PORT=58126 \
DD_PROCESS_CONFIG_CMD_PORT=56062 DD_AGENT_IPC_PORT=55004 \
DD_DOGSTATSD_PORT=58125 \
$(MACOS_TEST_AGENT_INSTALL_DIR)/bin/agent/agent run -c $(MACOS_TEST_AGENT_INSTALL_DIR)/etc >/tmp/saluki-agent-bootstrap.log 2>&1 & \
AGENT_PID=$$!; \
for i in $$(seq 1 30); do \
sleep 1; \
if [ -f $(MACOS_TEST_AGENT_INSTALL_DIR)/etc/ipc_cert.pem ] && [ -f $(MACOS_TEST_AGENT_INSTALL_DIR)/etc/auth_token ]; then break; fi; \
done; \
kill $$AGENT_PID 2>/dev/null || true; \
wait $$AGENT_PID 2>/dev/null || true; \
if [ ! -f $(MACOS_TEST_AGENT_INSTALL_DIR)/etc/ipc_cert.pem ]; then \
echo "ERROR: bootstrap Agent did not write the IPC cert. Bootstrap log:" >&2; \
cat /tmp/saluki-agent-bootstrap.log >&2 2>/dev/null || true; \
exit 1; \
fi; \
else \
echo "[*] IPC cert already present at $(MACOS_TEST_AGENT_INSTALL_DIR)/etc/ipc_cert.pem"; \
fi
@echo "[*] macOS test environment ready."
@echo "[*] Agent binary: $(MACOS_TEST_AGENT_INSTALL_DIR)/bin/agent/agent"

.PHONY: test-integration-macos-ci
test-integration-macos-ci: build-panoramic build-adp-host provision-macos-test-env test-integration-macos-run ## CI entry point: builds binaries, ensures Agent + cert are provisioned, then runs the `mac`-runtime integration tests

.PHONY: ensure-rust-miri
ensure-rust-miri:
ifeq ($(shell command -v rustup >/dev/null || echo not-found), not-found)
Expand Down
9 changes: 9 additions & 0 deletions bin/correctness/airlock/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,17 @@ home = { workspace = true }
saluki-error = { workspace = true }
tokio = { workspace = true, features = [
"fs",
"io-util",
"macros",
"process",
"rt",
"rt-multi-thread",
] }
tokio-util = { workspace = true }
tracing = { workspace = true }

# Unix process driver uses libc's killpg/SIGTERM/SIGKILL inside #[cfg(unix)] blocks. The wider
# correctness/integration test suite is only operated on Linux/Docker today, so this gate exists
# more as a forward-looking marker than as something a Windows build actually depends on.
[target.'cfg(unix)'.dependencies]
libc = { workspace = true }
1 change: 1 addition & 0 deletions bin/correctness/airlock/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pub mod config;
pub mod docker;
pub mod driver;
pub mod unix;
Loading
Loading