Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
36be27a
chore: add integration tests around Serverless ASM
RomainMuller Oct 23, 2023
1bb5c16
record new cases in the build scripts
RomainMuller Oct 23, 2023
daf14fb
update snapshots + some tuning
RomainMuller Oct 23, 2023
9ac55b1
improve normalization procedure
RomainMuller Oct 24, 2023
f3b3406
linter fix
RomainMuller Oct 24, 2023
4118cc7
better isolate integration test suites (improved specificity of pass/…
RomainMuller Oct 24, 2023
1574db9
improved doc in run.sh
RomainMuller Oct 24, 2023
6b31944
print out selected test suite when one has been selected...
RomainMuller Oct 24, 2023
5a35b8e
wait for 2 reports to have been emitted
RomainMuller Oct 24, 2023
74d2418
output raw logs on test failure
RomainMuller Oct 24, 2023
f4aac42
update default node layer version to latest
RomainMuller Oct 24, 2023
dd95ef5
add necessary node configuration, duh
RomainMuller Oct 24, 2023
e6f87e3
scope down except block
RomainMuller Oct 25, 2023
49464fc
reduce breaking changes
RomainMuller Oct 30, 2023
8a43602
Merge remote-tracking branch 'origin/main' into romain.marcadier/apps…
RomainMuller Oct 30, 2023
e453f72
improve prefix check
RomainMuller Oct 30, 2023
fbd5da4
re-normalize existing snapshots
RomainMuller Oct 30, 2023
46a9d1f
remove editor-inserted semicolons
RomainMuller Oct 31, 2023
d8a41c7
sort imports in python file
RomainMuller Oct 31, 2023
e8a2acc
Merge remote-tracking branch 'origin/main' into romain.marcadier/apps…
RomainMuller Oct 31, 2023
1a0df31
flat_map --> flatmap
RomainMuller Oct 31, 2023
273e07d
no raw log output, just print location
RomainMuller Oct 31, 2023
b2b7a5b
pin + update snapshots
RomainMuller Oct 31, 2023
f8d754c
update snapshots
RomainMuller Oct 31, 2023
293034e
remove tracer hostname from traces normalization
RomainMuller Oct 31, 2023
1339f0e
Merge remote-tracking branch 'origin/main' into romain.marcadier/apps…
RomainMuller Nov 3, 2023
151758e
Merge remote-tracking branch 'origin/main' into romain.marcadier/apps…
RomainMuller Nov 6, 2023
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
Prev Previous commit
Next Next commit
better isolate integration test suites (improved specificity of pass/…
…fail/flake signal)
  • Loading branch information
RomainMuller committed Oct 24, 2023
commit 4118cc7f13fade7f8ba086460c1925092c26b13c
18 changes: 13 additions & 5 deletions .github/workflows/serverless-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
architecture: [amd64, arm64]
suite: [metric, log, trace, appsec]
name: ${{ matrix.suite }} on ${{ matrix.architecture }}
steps:
- name: Checkout datadog-agent repository
uses: actions/checkout@v3
Expand All @@ -26,7 +29,7 @@ jobs:
node-version: 14

- name: Install Serverless Framework
run: sudo yarn global add serverless@^3.7.9 --prefix /usr/local
run: sudo yarn global add serverless@^3.36.0 --prefix /usr/local

- name: Checkout the datadog-lambda-extension repository
uses: actions/checkout@v3
Expand All @@ -44,6 +47,12 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Create raw logs directory
id: rawlogs
run: |-
DIR=$(mktemp -d)
echo "dir=${DIR}" >> $GITHUB_OUTPUT

- name: Run tests if AWS credentials are available
id: test
uses: nick-fields/retry@v2
Expand All @@ -54,15 +63,14 @@ jobs:
timeout_minutes: 45
max_attempts: 2
command: |
export RAWLOGS_DIR=$(mktemp -d)
echo "rawlogs=$RAWLOGS_DIR" >> $GITHUB_OUTPUT
RAWLOGS_DIR="${{ steps.rawlogs.outputs.dir }}/${{ matrix.architecture }}}"
cd go/src/github.com/DataDog/datadog-agent
ARCHITECTURE=${{ matrix.architecture }} RAWLOGS_DIR=$RAWLOGS_DIR \
./test/integration/serverless/run.sh
./test/integration/serverless/run.sh ${{ matrix.suite }}

- name: Archive raw logs
if: always()
uses: actions/upload-artifact@v3
with:
name: rawlogs
path: ${{ steps.test.outputs.rawlogs }}
path: ${{ steps.rawlogs.outputs.dir }}
25 changes: 24 additions & 1 deletion test/integration/serverless/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,28 @@ appsec_functions=(
"appsec-csharp"
)

all_functions=("${metric_functions[@]}" "${log_functions[@]}" "${trace_functions[@]}" "${appsec_functions[@]}")
declare -a all_functions # This is an array
if [ $# == 1 ]; then
case $1 in
metric)
all_functions=("${metric_functions[@]}")
;;
log)
all_functions=("${log_functions[@]}")
;;
trace)
all_functions=("${trace_functions[@]}")
;;
appsec)
all_functions=("${appsec_functions[@]}")
;;
*)
echo "Unknown test suite: $1 (valid names are: metric, log, trace, appsec)"
;;
esac
else
all_functions=("${metric_functions[@]}" "${log_functions[@]}" "${trace_functions[@]}" "${appsec_functions[@]}")
fi

# Add a function to this list to skip checking its results
# This should only be used temporarily while we investigate and fix the test
Expand Down Expand Up @@ -218,6 +239,8 @@ failed_functions=()

if [ -z $RAWLOGS_DIR ]; then
RAWLOGS_DIR=$(mktemp -d)
else
mkdir -p $RAWLOGS_DIR
fi
echo "Raw logs will be written to ${RAWLOGS_DIR}"

Expand Down