Repository navigation
fix(vdev): ensure integration test containers despawn #32259
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Integration Test Suite | |
| # | |
| # This workflow runs the integration tests. If the workflow is triggered in the merge queue, all integration tests | |
| # are run. If the workflow is triggered in a PR commit, then the files changed in the PR are evaluated to determine | |
| # if any integration tests will run. | |
| # | |
| # Release preparation PRs (`prepare-v-*` branches in this repository opened by `vectordotdev-bot[bot]`) run all | |
| # integration and e2e tests on every PR commit, because they are squash-merged directly and never go through the | |
| # merge queue. Manually opened preparation PRs use the `/ci-run-integration-all` and `/ci-run-e2e-all` review commands. | |
| name: Integration Test Suite | |
| on: | |
| workflow_call: | |
| inputs: | |
| run_all: | |
| description: "Run all integration and e2e tests regardless of changed files" | |
| required: false | |
| type: boolean | |
| default: false | |
| coverage: | |
| description: "Collect per-environment integration coverage (requires ci-coverage-tools from coverage.yml)" | |
| required: false | |
| type: boolean | |
| default: false | |
| ref: | |
| description: "Git ref to checkout (defaults to github.sha)" | |
| required: false | |
| type: string | |
| workflow_dispatch: | |
| pull_request: | |
| merge_group: | |
| types: [checks_requested] | |
| concurrency: | |
| # `github.event.number` exists for pull requests, otherwise fall back to SHA for merge queue. | |
| # For workflow_call (e.g. weekly coverage), use run_id so each caller gets its own group. | |
| group: ${{ github.workflow }}-${{ github.event.number || github.event.merge_group.head_sha || github.run_id }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| CONTAINER_TOOL: "docker" | |
| DD_ENV: "ci" | |
| TEST_DATADOG_API_KEY: ${{ secrets.CI_TEST_DATADOG_API_KEY }} | |
| TEST_APPSIGNAL_PUSH_API_KEY: ${{ secrets.TEST_APPSIGNAL_PUSH_API_KEY }} | |
| AXIOM_TOKEN: ${{ secrets.AXIOM_TOKEN }} | |
| RUST_BACKTRACE: full | |
| VECTOR_LOG: vector=debug | |
| VERBOSE: true | |
| CI: true | |
| PROFILE: debug | |
| jobs: | |
| changes: | |
| if: github.event_name == 'merge_group' | |
| uses: ./.github/workflows/changes.yml | |
| with: | |
| source: true | |
| int_tests: true | |
| e2e_tests: true | |
| secrets: inherit | |
| build-test-runner: | |
| # Elevated permission required by build-test-runner.yml to push test runner image to GHCR | |
| permissions: | |
| contents: read | |
| packages: write | |
| needs: changes | |
| if: ${{ | |
| always() && | |
| (github.event_name == 'workflow_dispatch' || | |
| github.event_name == 'workflow_call' || | |
| inputs.run_all == true || | |
| (github.event_name == 'pull_request' && | |
| github.event.pull_request.head.repo.full_name == github.repository && | |
| github.event.pull_request.user.login == 'vectordotdev-bot[bot]' && | |
| startsWith(github.head_ref, 'prepare-v-')) || | |
| (github.event_name == 'merge_group' && | |
| needs.changes.result == 'success' && | |
| (needs.changes.outputs.dependencies == 'true' || | |
| needs.changes.outputs.integration-yml == 'true' || | |
| needs.changes.outputs.int-tests-any == 'true' || | |
| needs.changes.outputs.e2e-tests-any == 'true'))) && | |
| github.repository == 'vectordotdev/vector' | |
| }} | |
| uses: ./.github/workflows/build-test-runner.yml | |
| with: | |
| commit_sha: ${{ inputs.ref || github.sha }} | |
| checkout_ref: ${{ inputs.ref }} | |
| integration-tests: | |
| runs-on: ubuntu-24.04-8core | |
| permissions: | |
| contents: read | |
| id-token: write | |
| needs: | |
| - changes | |
| - build-test-runner | |
| if: &integration_gate >- | |
| always() && !failure() && !cancelled() && | |
| needs.build-test-runner.result == 'success' && | |
| (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch' || | |
| github.event_name == 'workflow_call' || inputs.run_all == true || | |
| (github.event_name == 'pull_request' && | |
| github.event.pull_request.head.repo.full_name == github.repository && | |
| github.event.pull_request.user.login == 'vectordotdev-bot[bot]' && | |
| startsWith(github.head_ref, 'prepare-v-'))) && | |
| github.repository == 'vectordotdev/vector' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| service: | |
| [ | |
| "amqp", | |
| "appsignal", | |
| "axiom", | |
| "aws", | |
| "azure", | |
| "clickhouse", | |
| "databend", | |
| "datadog-agent", | |
| "datadog-logs", | |
| "datadog-metrics", | |
| "datadog-traces", | |
| "dnstap", | |
| "docker-logs", | |
| "doris", | |
| "elasticsearch", | |
| "eventstoredb", | |
| "fluent", | |
| "gcp", | |
| "greptimedb", | |
| "http-client", | |
| "influxdb", | |
| "kafka", | |
| "logstash", | |
| "loki", | |
| "mongodb", | |
| "mqtt", | |
| "nats", | |
| "nginx", | |
| "opensearch", | |
| "opentelemetry", | |
| "postgres", | |
| "prometheus", | |
| "pulsar", | |
| "redis", | |
| "splunk", | |
| "webhdfs" | |
| ] | |
| timeout-minutes: 90 | |
| steps: | |
| - name: Download JSON artifact from changes.yml | |
| uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 | |
| if: github.event_name == 'merge_group' | |
| with: | |
| name: int_tests_changes | |
| - name: Determine if test should run | |
| id: check | |
| # The job gate only admits `pull_request` events for release preparation PRs. | |
| run: | | |
| if [[ "${{ github.event_name }}" == "workflow_dispatch" || \ | |
| "${{ github.event_name }}" == "workflow_call" || \ | |
| "${{ github.event_name }}" == "pull_request" || \ | |
| "${{ inputs.run_all }}" == "true" || \ | |
| "${{ needs.changes.outputs.dependencies }}" == "true" || \ | |
| "${{ needs.changes.outputs.integration-yml }}" == "true" ]]; then | |
| echo "should_run=true" >> "$GITHUB_OUTPUT" | |
| elif [[ "${{ needs.changes.outputs.website_only }}" == "true" ]]; then | |
| echo "should_run=false" >> "$GITHUB_OUTPUT" | |
| elif [[ -f int_tests_changes.json ]]; then | |
| should_run=$(jq -r '."${{ matrix.service }}" // false' int_tests_changes.json) | |
| echo "should_run=${should_run}" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "should_run=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| if: steps.check.outputs.should_run == 'true' | |
| with: | |
| submodules: "recursive" | |
| ref: ${{ inputs.ref || github.sha }} | |
| - uses: ./.github/actions/dd-token | |
| if: steps.check.outputs.should_run == 'true' | |
| - uses: ./.github/actions/setup | |
| if: steps.check.outputs.should_run == 'true' | |
| with: | |
| vdev: ${{ !inputs.coverage }} | |
| mold: false | |
| datadog-ci: true | |
| - name: Download coverage tooling | |
| if: inputs.coverage && steps.check.outputs.should_run == 'true' | |
| uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 | |
| with: | |
| name: ci-coverage-tools | |
| path: ${{ runner.temp }}/coverage-tools | |
| - name: Use workflow coverage tooling | |
| if: inputs.coverage && steps.check.outputs.should_run == 'true' | |
| run: | | |
| chmod +x "$RUNNER_TEMP/coverage-tools/vdev" | |
| echo "$RUNNER_TEMP/coverage-tools" >> "$GITHUB_PATH" | |
| - name: Pull test runner image | |
| if: steps.check.outputs.should_run == 'true' | |
| uses: ./.github/actions/pull-test-runner | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| commit_sha: ${{ inputs.ref || github.sha }} | |
| - name: Run Integration Tests for ${{ matrix.service }} | |
| if: steps.check.outputs.should_run == 'true' | |
| uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0 | |
| with: | |
| timeout_minutes: 30 | |
| max_attempts: 3 | |
| command: vdev integration run ${{ inputs.coverage && '--coverage' || '' }} ${{ matrix.service }} ${{ runner.debug == '1' && '--always-show-logs' || '' }} | |
| - name: Seal integration reports | |
| if: inputs.coverage && steps.check.outputs.should_run == 'true' | |
| env: | |
| COVERAGE_ARTIFACT: coverage-int-${{ matrix.service }} | |
| run: | | |
| vdev build coverage seal \ | |
| --plan "$RUNNER_TEMP/coverage-tools/plan.json" \ | |
| --artifact "$COVERAGE_ARTIFACT" --directory target/coverage | |
| - name: Upload coverage artifact | |
| if: inputs.coverage && steps.check.outputs.should_run == 'true' | |
| uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 | |
| with: | |
| name: coverage-int-${{ matrix.service }} | |
| path: target/coverage/ | |
| if-no-files-found: error | |
| overwrite: true | |
| e2e-tests: | |
| runs-on: ubuntu-24.04-8core | |
| permissions: | |
| contents: read | |
| id-token: write | |
| needs: | |
| - changes | |
| - build-test-runner | |
| if: *integration_gate | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| service: | |
| [ | |
| "datadog-logs", | |
| "datadog-metrics", | |
| "opentelemetry-logs", | |
| "opentelemetry-metrics", | |
| "opentelemetry-metrics-native", | |
| "opentelemetry-traces" | |
| ] | |
| timeout-minutes: 90 | |
| steps: | |
| - name: Download JSON artifact from changes.yml | |
| uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 | |
| if: github.event_name == 'merge_group' | |
| with: | |
| name: e2e_tests_changes | |
| - name: Determine if test should run | |
| id: check | |
| # The job gate only admits `pull_request` events for release preparation PRs. | |
| run: | | |
| if [[ "${{ github.event_name }}" == "workflow_dispatch" || \ | |
| "${{ github.event_name }}" == "workflow_call" || \ | |
| "${{ github.event_name }}" == "pull_request" || \ | |
| "${{ inputs.run_all }}" == "true" || \ | |
| "${{ needs.changes.outputs.dependencies }}" == "true" || \ | |
| "${{ needs.changes.outputs.integration-yml }}" == "true" ]]; then | |
| echo "should_run=true" >> "$GITHUB_OUTPUT" | |
| elif [[ "${{ needs.changes.outputs.website_only }}" == "true" ]]; then | |
| echo "should_run=false" >> "$GITHUB_OUTPUT" | |
| elif [[ -f e2e_tests_changes.json ]]; then | |
| should_run=$(jq -r '."${{ matrix.service }}" // false' e2e_tests_changes.json) | |
| echo "should_run=${should_run}" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "should_run=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| if: steps.check.outputs.should_run == 'true' | |
| with: | |
| submodules: "recursive" | |
| ref: ${{ inputs.ref || github.sha }} | |
| - uses: ./.github/actions/dd-token | |
| if: steps.check.outputs.should_run == 'true' | |
| - uses: ./.github/actions/setup | |
| if: steps.check.outputs.should_run == 'true' | |
| with: | |
| vdev: true | |
| mold: false | |
| datadog-ci: true | |
| - name: Pull test runner image | |
| if: steps.check.outputs.should_run == 'true' | |
| uses: ./.github/actions/pull-test-runner | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| commit_sha: ${{ inputs.ref || github.sha }} | |
| - name: Run E2E Tests for ${{ matrix.service }} | |
| if: steps.check.outputs.should_run == 'true' | |
| uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0 | |
| with: | |
| timeout_minutes: 30 | |
| max_attempts: 3 | |
| command: vdev e2e run ${{ matrix.service }} ${{ runner.debug == '1' && '--always-show-logs' || '' }} | |
| integration-test-suite: | |
| name: Integration Test Suite | |
| runs-on: ubuntu-24.04 | |
| if: always() | |
| needs: | |
| - changes | |
| - build-test-runner | |
| - integration-tests | |
| - e2e-tests | |
| steps: | |
| - run: | | |
| if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then | |
| echo "One or more jobs failed or were cancelled" | |
| exit 1 | |
| else | |
| echo "All jobs completed successfully" | |
| fi |