Skip to content
This repository was archived by the owner on Feb 19, 2026. It is now read-only.
This repository was archived by the owner on Feb 19, 2026. It is now read-only.

Add a script/task to wrap how vaccine tests are run #13

Description

@marcotc

Currently, it's hard to run vaccine for local testing because it involves copying the majority of CI's commands

- run: mkdir $GITHUB_WORKSPACE/records
- run: |
docker run -d \
--name catadog \
-v $GITHUB_WORKSPACE/records:/records \
-p 8128:8128 \
ghcr.io/datadog/catadog:latest \
"-h 0.0.0.0 --mock :Sink --no-forward --record /records"
- run: curl -I --retry 12 -f --retry-all-errors --retry-delay 5 -s http://localhost:8128/catadog
# Prepare vaccine
- name: Prepare vaccine volume
run: |
docker create \
--name init \
-v vaccine:/datadog-init/package \
ghcr.io/datadog/dd-trace-rb/dd-lib-ruby-init:${{ inputs.commit_sha || 'latest_snapshot' }}
- run: |
docker build \
--tag patient:${{ matrix.engine.name }}-${{ matrix.engine.version }} \
--file src/${{ matrix.engine.name }}/${{ matrix.engine.version }}/Dockerfile \
src
- name: Inject vaccine
run: |
docker run -d \
--name inoculation \
--network host \
-v vaccine:/vaccine \
-e RUBYOPT=-r/vaccine/host_inject \
-e DD_TRACE_DEBUG=true \
-e DD_INSTRUMENTATION_TELEMETRY_ENABLED=false \
-e DD_AGENT_HOST=localhost \
-e DD_TRACE_AGENT_PORT=8128 \
-e DD_CRASHTRACKING_ENABLED=true \
-p 3000:3000 \
patient:${{ matrix.engine.name }}-${{ matrix.engine.version }} \
"${{ matrix.command }} -b 0.0.0.0"
- name: Generate traces
run: curl -v --retry 12 -f --retry-all-errors --retry-delay 5 -s -o /dev/null http://localhost:3000
- name: Inspect injection logs
if: always()
run: docker logs inoculation
- name: Crash puma server
run: sleep 2 && docker exec inoculation bash -c "pgrep -f puma | xargs kill -SEGV" || true
- run: sleep 2 && ls -al $GITHUB_WORKSPACE/records
- run: docker logs inoculation
- if: ${{ matrix.engine.validate }}
name: Validate crash report
run: RECORDS_DIR=$GITHUB_WORKSPACE/records bundle exec rspec

tweaking them a bit, and running them individually locally.

To make things easier, I think we should wrap the commands run in CI in a single command, and let that command be run with the necessary parameter, either in CI or locally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions