Skip to content

T-17121: Bump node-agent from v1.28.3 to v1.30.0 #156

T-17121: Bump node-agent from v1.28.3 to v1.30.0

T-17121: Bump node-agent from v1.28.3 to v1.30.0 #156

name: Run Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
# The diff is expected to be:
# 8a9,10
# > security_opt:
# > - seccomp=collector-seccomp.json
# if there are more lines, it's likely drift and shouldn't be released
docker-compose-match:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: check diff between docker-compose.yml and docker-compose.seccomp.yml
run: |
DIFF_LINES=$(diff docker-compose.yml docker-compose.seccomp.yml | wc -l)
if [ "$DIFF_LINES" -ne 3 ]; then
echo "ERROR: Expected exactly 3 lines of diff, but got $DIFF_LINES lines"
echo "Diff output:"
diff docker-compose.yml docker-compose.seccomp.yml
exit 1
fi
echo "✓ Diff is exactly 3 lines as expected"
- name: check ebpf section matches between docker-compose.yml and swarm/docker-compose.swarm-ebpf.yml
run: |
# Extract ebpf service from docker-compose.yml, excluding build: and depends_on: sections
# These sections are not applicable in the swarm ebpf file
# Also exclude INSTALLED_AS= line as it's intentionally different (docker vs swarm)
awk '
BEGIN { in_ebpf = 0; skip_block = 0; block_indent = 0 }
/^ ebpf:$/ { in_ebpf = 1; next }
in_ebpf == 1 {
# Skip build: and depends_on: blocks (4 spaces = service property level)
if (/^ build:/ || /^ depends_on:/) {
skip_block = 1
block_indent = 4
next
}
if (skip_block == 1) {
# Check if current line has more indentation than the block start
if (/^ /) {
next
} else {
skip_block = 0
}
}
# Skip INSTALLED_AS line (intentionally different between docker and swarm)
if (/INSTALLED_AS=/) { next }
if (skip_block == 0) {
print
}
}
' docker-compose.yml > /tmp/ebpf-main.yml
# Extract ebpf service from swarm file (skip header comments and services: line)
# Also exclude INSTALLED_AS= line as it's intentionally different (docker vs swarm)
awk '
BEGIN { in_ebpf = 0 }
/^ ebpf:$/ { in_ebpf = 1; next }
/INSTALLED_AS=/ { next }
in_ebpf == 1 { print }
' swarm/docker-compose.swarm-ebpf.yml > /tmp/ebpf-swarm.yml
# Compare the extracted sections
echo "=== docker-compose.yml ebpf section (excluding build/depends_on) ==="
cat /tmp/ebpf-main.yml
echo ""
echo "=== swarm/docker-compose.swarm-ebpf.yml ebpf section ==="
cat /tmp/ebpf-swarm.yml
echo ""
if ! diff -q /tmp/ebpf-main.yml /tmp/ebpf-swarm.yml > /dev/null; then
echo "ERROR: ebpf sections do not match!"
echo ""
echo "=== Differences ==="
diff /tmp/ebpf-main.yml /tmp/ebpf-swarm.yml || true
exit 1
fi
echo "✓ ebpf sections match between docker-compose.yml and swarm/docker-compose.swarm-ebpf.yml"