Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
robertomonteromiguel committed Nov 20, 2024
2 parents 5fd78dd + dd6a987 commit 52110ad
Show file tree
Hide file tree
Showing 87 changed files with 866 additions and 1,075 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/utils/build/docker/cpp/ @DataDog/dd-trace-cpp @DataDog/system-tests-core
/utils/build/docker/dotnet*/ @DataDog/apm-dotnet @DataDog/asm-dotnet @DataDog/system-tests-core
/utils/build/docker/golang*/ @DataDog/apm-go @DataDog/system-tests-core
/utils/build/docker/golang*/ @DataDog/dd-trace-go-guild @DataDog/system-tests-core
/utils/build/docker/java*/ @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
/utils/build/docker/java_otel/ @DataDog/opentelemetry @DataDog/system-tests-core
/utils/build/docker/nodejs*/ @DataDog/apm-js @DataDog/asm-js @DataDog/system-tests-core
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/compute-workflow-parameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ on:
parametric_scenarios:
description: ""
value: ${{ jobs.main.outputs.parametric_scenarios }}
dockerssi_scenarios:
description: ""
value: ${{ jobs.main.outputs.dockerssi_scenarios }}
dockerssi_weblogs:
description: ""
value: ${{ jobs.main.outputs.dockerssi_weblogs }}
_experimental_parametric_job_matrix:
description: ""
value: ${{ jobs.main.outputs._experimental_parametric_job_matrix }}
Expand All @@ -70,8 +64,6 @@ jobs:
opentelemetry_scenarios: ${{ steps.main.outputs.opentelemetry_scenarios }}
opentelemetry_weblogs: ${{ steps.main.outputs.opentelemetry_weblogs }}
parametric_scenarios: ${{ steps.main.outputs.parametric_scenarios }}
dockerssi_scenarios: ${{ steps.main.outputs.dockerssi_scenarios }}
dockerssi_weblogs: ${{ steps.main.outputs.dockerssi_weblogs }}
_experimental_parametric_job_matrix: ${{ steps.main.outputs._experimental_parametric_job_matrix }}
steps:
- name: Checkout
Expand Down
53 changes: 0 additions & 53 deletions .github/workflows/python-temporary-test.yml

This file was deleted.

66 changes: 0 additions & 66 deletions .github/workflows/run-docker-ssi.yml

This file was deleted.

10 changes: 0 additions & 10 deletions .github/workflows/system-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,6 @@ jobs:
weblogs: ${{ needs.compute_parameters.outputs.opentelemetry_weblogs }}
build_proxy_image: ${{ inputs.build_proxy_image }}

docker-ssi:
needs:
- compute_parameters
if: ${{ needs.compute_parameters.outputs.dockerssi_scenarios != '[]' && inputs.binaries_artifact == ''}} #Execute only for latest releases of the ssi
uses: ./.github/workflows/run-docker-ssi.yml
secrets: inherit
with:
library: ${{ inputs.library }}
weblogs: ${{ needs.compute_parameters.outputs.dockerssi_weblogs }}

external-processing:
needs:
- compute_parameters
Expand Down
49 changes: 40 additions & 9 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ include:
- remote: https://gitlab-templates.ddbuild.io/libdatadog/include/single-step-instrumentation-tests.yml

stages:
- child_pipelines
- ruby_tracer
- nodejs_tracer
- java_tracer
Expand Down Expand Up @@ -45,7 +46,7 @@ onboarding_nodejs:
extends: .base_job_onboarding_system_tests
stage: nodejs_tracer
allow_failure: true
dependencies: []
needs: []
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && ($ONLY_TEST_LIBRARY == "" || $ONLY_TEST_LIBRARY == "nodejs")
when: always
Expand Down Expand Up @@ -84,7 +85,7 @@ onboarding_java:
extends: .base_job_onboarding_system_tests
stage: java_tracer
allow_failure: true
dependencies: []
needs: []
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && ($ONLY_TEST_LIBRARY == "" || $ONLY_TEST_LIBRARY == "java")
when: always
Expand Down Expand Up @@ -122,7 +123,7 @@ onboarding_python:
extends: .base_job_onboarding_system_tests
stage: python_tracer
allow_failure: true
dependencies: []
needs: []
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && ($ONLY_TEST_LIBRARY == "" || $ONLY_TEST_LIBRARY == "python")
when: always
Expand Down Expand Up @@ -150,6 +151,9 @@ onboarding_python:
- ONBOARDING_FILTER_WEBLOG: [test-app-python-multicontainer,test-app-python-multialpine]
SCENARIO: [SIMPLE_INSTALLER_AUTO_INJECTION]
DEFAULT_VMS: ["True", "False"]
- ONBOARDING_FILTER_WEBLOG: [test-app-python-unsupported-defaults,test-app-python-27]
SCENARIO: [INSTALLER_NOT_SUPPORTED_AUTO_INJECTION]
DEFAULT_VMS: ["True", "False"]
script:
- ./build.sh -i runner
- timeout 2700s ./run.sh $SCENARIO --vm-weblog ${ONBOARDING_FILTER_WEBLOG} --vm-env ${ONBOARDING_FILTER_ENV} --vm-library ${TEST_LIBRARY} --vm-provider aws --report-run-url ${CI_PIPELINE_URL} --report-environment ${ONBOARDING_FILTER_ENV} --vm-default-vms ${DEFAULT_VMS}
Expand All @@ -158,7 +162,7 @@ onboarding_dotnet:
extends: .base_job_onboarding_system_tests
stage: dotnet_tracer
allow_failure: true
dependencies: []
needs: []
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && ($ONLY_TEST_LIBRARY == "" || $ONLY_TEST_LIBRARY == "dotnet")
when: always
Expand Down Expand Up @@ -194,7 +198,7 @@ onboarding_ruby:
extends: .base_job_onboarding_system_tests
stage: ruby_tracer
allow_failure: true
dependencies: []
needs: []
timeout: 90 minutes
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && ($ONLY_TEST_LIBRARY == "" || $ONLY_TEST_LIBRARY == "ruby")
Expand All @@ -217,9 +221,9 @@ onboarding_ruby:
- ONBOARDING_FILTER_WEBLOG: [test-app-ruby]
SCENARIO: [CHAOS_INSTALLER_AUTO_INJECTION]
DEFAULT_VMS: ["True", "False"]
#- ONBOARDING_FILTER_WEBLOG: [test-app-ruby-multicontainer,test-app-ruby-multialpine]
# SCENARIO: [SIMPLE_INSTALLER_AUTO_INJECTION]
# DEFAULT_VMS: ["True", "False"]
- ONBOARDING_FILTER_WEBLOG: [test-app-ruby-multicontainer]
SCENARIO: [SIMPLE_INSTALLER_AUTO_INJECTION]
DEFAULT_VMS: ["True", "False"]
script:
- ./build.sh -i runner
- timeout 4800s ./run.sh $SCENARIO --vm-weblog ${ONBOARDING_FILTER_WEBLOG} --vm-env ${ONBOARDING_FILTER_ENV} --vm-library ${TEST_LIBRARY} --vm-provider aws --report-run-url ${CI_PIPELINE_URL} --report-environment ${ONBOARDING_FILTER_ENV} --vm-default-vms All
Expand All @@ -228,7 +232,7 @@ onboarding_php:
extends: .base_job_onboarding_system_tests
stage: php_tracer
allow_failure: true
dependencies: []
needs: []
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && ($ONLY_TEST_LIBRARY == "" || $ONLY_TEST_LIBRARY == "php")
when: always
Expand Down Expand Up @@ -344,3 +348,30 @@ generate_system_tests_images:
- ./utils/build/build_python_base_images.sh --push
- ./lib-injection/build/build_lib_injection_images.sh
when: manual

generate_docker_ssi_pipeline:
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/test-infra-definitions/runner:a58cc31c
stage: child_pipelines
tags: ["arch:amd64"]
needs: []
script:
- python utils/docker_ssi/docker_ssi_matrix_builder.py --format yaml --output-file ssi_pipeline.yml
artifacts:
paths:
- ssi_pipeline.yml

docker_ssi_pipeline:
stage: child_pipelines
needs: ["generate_docker_ssi_pipeline"]
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: always
- when: manual
allow_failure: true
variables:
PARENT_PIPELINE_SOURCE: $CI_PIPELINE_SOURCE
trigger:
include:
- artifact: ssi_pipeline.yml
job: generate_docker_ssi_pipeline
strategy: depend
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Refer to the [edit docs](docs/edit/README.md).

**[Complete documentation](https://github.com/DataDog/system-tests/blob/main/docs)**

System-tests supports various scenarios for running tests; read more about the different kinds of tests that this repo covers in [scenarios/README.md](scenarios/README.md).
System-tests supports various scenarios for running tests; read more about the different kinds of tests that this repo covers in [scenarios/README.md](docs/scenarios/README.md).

Understand the test architecture at the [architectural overview](https://github.com/DataDog/system-tests/blob/main/docs/architecture/overview.md).

Expand Down
24 changes: 12 additions & 12 deletions docs/edit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ To make changes, you must be able to run tests locally. Instructions for running
You'll commonly need to run unmerged changes to your library against system tests (e.g. to ensure the feature is up to spec). Instructions for testing against unmerged changes can be found in [enable-test.md](./enable-test.md).

## Index
1. [lifecycle.md](./lifecycle.md): Understand how system tests work
2. [add-new-test.md](./add-new-test.md): Add a new test
3. [scenarios.md](./scenarios.md): Add a new scenario
4. [format.md](./format.md): Use the linter
5. [features.md](./features.md): Mark tests for the feature parity dashboard
6. [enable-test.md](./enable-test.md): Enable a test
7. [skip-tests.md](./skip-tests.md): Disable tests
8. [manifest.md](./manifest.md): How tests are marked as enabled or disabled for libraries
9. [features.md](./features.md): Mark tests for the feature parity dashboard
10. [format.md](./format.md): Use the linter
11. [troubleshooting.md](./troubleshooting.md) Tips for debugging
12. [iast-validations.md](./iast-validations.md): Mark tests with vulnerabilities
1. [add-new-test.md](./add-new-test.md): Add a new test
2. [scenarios.md](./scenarios.md): Add a new scenario
3. [format.md](./format.md): Use the linter
4. [features.md](./features.md): Mark tests for the feature parity dashboard
5. [enable-test.md](./enable-test.md): Enable a test
6. [skip-tests.md](./skip-tests.md): Disable tests
7. [manifest.md](./manifest.md): How tests are marked as enabled or disabled for libraries
8. [troubleshooting.md](./troubleshooting.md) Tips for debugging
9. [iast-validations.md](./iast-validations.md): Mark tests with vulnerabilities
10. [CI-and-scenarios.md](./CI-and-scenarios.md): Understand how scenarios run in CI
11. [update-docker-images.md](./update-docker-images.md): Modify test app docker images
12. [remote-config.md](./remote-config.md): Write remote config tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM python:2.7

ENV PYTHONUNBUFFERED 1
ENV DJANGO_SETTINGS_MODULE django_app
WORKDIR /src
ADD . /src
RUN pip install django
EXPOSE 18080

# Many users run a non-root user, ensure this is supported by the injection mechanism
USER 1000
CMD python -m django runserver 0.0.0.0:18080
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

if [ -z "${BUILDX_PLATFORMS}" ] ; then
BUILDX_PLATFORMS=`docker buildx imagetools inspect --raw python:3.12 | jq -r 'reduce (.manifests[] | [ .platform.os, .platform.architecture, .platform.variant ] | join("/") | sub("\\/$"; "")) as $item (""; . + "," + $item)' | sed 's/,//'`
fi
docker buildx build --platform ${BUILDX_PLATFORMS} --tag ${LIBRARY_INJECTION_TEST_APP_IMAGE} --push .
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import os
import signal
import sys

from django.http import HttpResponse
from django.conf.urls import url


def handle_sigterm(signo, sf):
sys.exit(0)


signal.signal(signal.SIGTERM, handle_sigterm)


filepath, extension = os.path.splitext(__file__)
ROOT_URLCONF = os.path.basename(filepath)
DEBUG = False
SECRET_KEY = "fdsfdasfa"
ALLOWED_HOSTS = ["*"]


def index(request):
return HttpResponse("test")


urlpatterns = [
url("", index),
]
3 changes: 2 additions & 1 deletion manifests/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,13 @@ tests/:
Test_Parametric_DDTrace_Current_Span: missing_feature (current_span endpoint is not implemented)
Test_Parametric_DDTrace_Extract_Headers: missing_feature (extract_headers endpoint is not implemented)
# cpp tracer does not support the OpenTelemetry API, otel parametric endpoints are not implemented
Test_Parametric_OtelSpan_End: missing_feature (otel api is not supported)
Test_Parametric_OtelSpan_Events: missing_feature (otel api is not supported)
Test_Parametric_OtelSpan_Is_Recording: missing_feature (otel api is not supported)
Test_Parametric_OtelSpan_Set_Attribute: missing_feature (otel api is not supported)
Test_Parametric_OtelSpan_Set_Name: missing_feature (otel api is not supported)
Test_Parametric_OtelSpan_Set_Status: missing_feature (otel api is not supported)
Test_Parametric_OtelSpan_Start_Finish: missing_feature (otel api is not supported)
Test_Parametric_OtelSpan_Start: missing_feature (otel api is not supported)
Test_Parametric_Otel_Baggage: missing_feature (otel api is not supported)
Test_Parametric_Otel_Current_Span: missing_feature (otel api is not supported)
Test_Parametric_Otel_Trace_Flush: missing_feature (otel api is not supported)
Expand Down
2 changes: 0 additions & 2 deletions manifests/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,6 @@ tests/:
Test_Otel_Env_Vars: v2.53.0
test_otel_span_with_baggage.py:
Test_Otel_Span_With_Baggage: missing_feature
test_otel_span_with_w3c.py:
Test_Otel_Span_With_W3c: v2.42.0
test_otel_tracer.py:
Test_Otel_Tracer: v2.8.0
test_parametric_endpoints.py:
Expand Down
Loading

0 comments on commit 52110ad

Please sign in to comment.