Skip to content

Commit

Permalink
Merge branch 'main' into robertomonteromiguel/onboarding_rh9_ami_update
Browse files Browse the repository at this point in the history
  • Loading branch information
robertomonteromiguel authored Nov 21, 2024
2 parents daf1fea + 6c4ddd1 commit d416518
Show file tree
Hide file tree
Showing 54 changed files with 489 additions and 767 deletions.
53 changes: 0 additions & 53 deletions .github/workflows/python-temporary-test.yml

This file was deleted.

26 changes: 16 additions & 10 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ onboarding_nodejs:
stage: nodejs_tracer
allow_failure: true
needs: []
timeout: 90 minutes
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && ($ONLY_TEST_LIBRARY == "" || $ONLY_TEST_LIBRARY == "nodejs")
when: always
Expand Down Expand Up @@ -79,13 +80,14 @@ onboarding_nodejs:
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}
- 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 ${DEFAULT_VMS}

onboarding_java:
extends: .base_job_onboarding_system_tests
stage: java_tracer
allow_failure: true
needs: []
timeout: 90 minutes
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && ($ONLY_TEST_LIBRARY == "" || $ONLY_TEST_LIBRARY == "java")
when: always
Expand Down Expand Up @@ -118,12 +120,13 @@ onboarding_java:
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}
- 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 ${DEFAULT_VMS}
onboarding_python:
extends: .base_job_onboarding_system_tests
stage: python_tracer
allow_failure: true
needs: []
timeout: 90 minutes
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && ($ONLY_TEST_LIBRARY == "" || $ONLY_TEST_LIBRARY == "python")
when: always
Expand Down Expand Up @@ -151,18 +154,19 @@ 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]
- 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}
- 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 ${DEFAULT_VMS}

onboarding_dotnet:
extends: .base_job_onboarding_system_tests
stage: dotnet_tracer
allow_failure: true
needs: []
timeout: 90 minutes
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && ($ONLY_TEST_LIBRARY == "" || $ONLY_TEST_LIBRARY == "dotnet")
when: always
Expand Down Expand Up @@ -192,13 +196,14 @@ onboarding_dotnet:
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}
- 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 ${DEFAULT_VMS}

onboarding_ruby:
extends: .base_job_onboarding_system_tests
stage: ruby_tracer
allow_failure: true
needs: []
timeout: 90 minutes
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && ($ONLY_TEST_LIBRARY == "" || $ONLY_TEST_LIBRARY == "ruby")
when: always
Expand All @@ -219,18 +224,19 @@ 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 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}
- 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 ${DEFAULT_VMS}

onboarding_php:
extends: .base_job_onboarding_system_tests
stage: php_tracer
allow_failure: true
needs: []
timeout: 90 minutes
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && ($ONLY_TEST_LIBRARY == "" || $ONLY_TEST_LIBRARY == "php")
when: always
Expand Down Expand Up @@ -259,7 +265,7 @@ onboarding_php:
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}
- 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 ${DEFAULT_VMS}


onboarding_stats_results:
Expand Down
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
2 changes: 1 addition & 1 deletion manifests/golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ tests/:
Test_Parametric_DDTrace_Crash: missing_feature (crash endpoint is not implemented)
Test_Parametric_DDTrace_Current_Span: missing_feature (spans are stored in a local context, there is no global current span in the go tracer)
Test_Parametric_OtelSpan_Set_Name: bug (APMAPI-778) # The set_name endpoint should set the resouce name (not the span name)
Test_Parametric_OtelSpan_Start_Finish: bug (APMAPI-778) # String attributes are incorrectly stored/serialized in a list
Test_Parametric_OtelSpan_Start: bug (APMAPI-778) # String attributes are incorrectly stored/serialized in a list
Test_Parametric_Otel_Baggage: missing_feature (otel baggage is not supported)
Test_Parametric_Otel_Current_Span: missing_feature (otel current span endpoint is not defined)
test_span_links.py: missing_feature
Expand Down
22 changes: 14 additions & 8 deletions manifests/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,9 @@ tests/:
'*': v1.40.0
spring-boot-3-native: missing_feature (GraalVM. Tracing support only)
Test_Lfi_RC_CustomAction: missing_feature (APPSEC-54930)
Test_Lfi_Rules_Version: missing_feature
Test_Lfi_Rules_Version:
'*': v1.43.0
spring-boot-3-native: missing_feature (GraalVM. Tracing support only)
Test_Lfi_StackTrace:
'*': v1.40.0
spring-boot-3-native: missing_feature (GraalVM. Tracing support only)
Expand All @@ -603,8 +605,11 @@ tests/:
'*': v1.40.0
spring-boot-3-native: missing_feature (GraalVM. Tracing support only)
spring-boot-payara: missing_feature (APPSEC-54966)
test_libddwaf.py: missing_feature
test_shi.py: missing_feature (Not support in Java)
test_libddwaf.py:
Test_Libddwaf_Version:
'*': v1.40.0
spring-boot-3-native: missing_feature (GraalVM. Tracing support only)
test_shi.py: irrelevant (Not support in Java)
# SQLi was introduced in v1.38.0 (with RASP disabled by default, but was flaky)
test_sqli.py:
Test_Sqli_BodyJson:
Expand Down Expand Up @@ -638,7 +643,9 @@ tests/:
spring-boot-3-native: missing_feature (GraalVM. Tracing support only)
vertx3: v1.40.0 # issue in context propagation in 1.39.0
vertx4: v1.40.0 # issue in context propagation in 1.39.0
Test_Sqli_Rules_Version: missing_feature
Test_Sqli_Rules_Version:
'*': v1.43.0
spring-boot-3-native: missing_feature (GraalVM. Tracing support only)
Test_Sqli_StackTrace:
'*': v1.39.0
spring-boot-3-native: missing_feature (GraalVM. Tracing support only)
Expand Down Expand Up @@ -683,14 +690,14 @@ tests/:
Test_Ssrf_Mandatory_SpanTags:
'*': v1.39.0
spring-boot-3-native: missing_feature (GraalVM. Tracing support only)
spring-boot-payara: missing_feature (APPSEC-54966)
vertx4: missing_feature (APPSEC-55781)
Test_Ssrf_Optional_SpanTags:
'*': v1.39.0
spring-boot-3-native: missing_feature (GraalVM. Tracing support only)
spring-boot-payara: missing_feature (APPSEC-54966)
vertx4: missing_feature (APPSEC-55781)
Test_Ssrf_Rules_Version: missing_feature
Test_Ssrf_Rules_Version:
'*': v1.43.0
spring-boot-3-native: missing_feature (GraalVM. Tracing support only)
Test_Ssrf_StackTrace:
'*': v1.39.0
spring-boot-3-native: missing_feature (GraalVM. Tracing support only)
Expand Down Expand Up @@ -1618,4 +1625,3 @@ tests/:
spring-boot-3-native: missing_feature (GraalVM. Tracing support only)
Test_TelemetrySCAEnvVar: missing_feature
Test_TelemetryV2: v1.23.0

2 changes: 1 addition & 1 deletion manifests/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ tests/:
Test_Parametric_DDTrace_Crash: missing_feature (crash endpoint is not implemented)
Test_Parametric_DDTrace_Current_Span: missing_feature (otel current_span endpoint is not supported)
Test_Parametric_OtelSpan_Set_Name: bug (APMAPI-778) # set_name endpoint should set the resource name on a span (not the operation name)
Test_Parametric_OtelSpan_Start_Finish: bug (APMAPI-778) # The expected span.kind tag is not set
Test_Parametric_OtelSpan_Start: bug (APMAPI-778) # The expected span.kind tag is not set
Test_Parametric_Otel_Baggage: missing_feature (baggage is not supported)
Test_Parametric_Otel_Current_Span: missing_feature (otel baggage endpoints are not implemented)
test_partial_flushing.py:
Expand Down
3 changes: 0 additions & 3 deletions manifests/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,16 +325,13 @@ tests/:
Test_Otel_Span_Methods: v0.94.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: v0.94.0
test_otel_tracer.py:
Test_Otel_Tracer: v0.94.0
test_parametric_endpoints.py:
Test_Parametric_DDSpan_Add_Link: bug (APMAPI-778) # Adding spans links by parent id does not work as expected
Test_Parametric_DDSpan_Start: bug (APMAPI-778) # Does not support creating a child span from a finished span
Test_Parametric_DDTrace_Baggage: missing_feature (baggage is not supported)
Test_Parametric_DDTrace_Current_Span: bug (APMAPI-778) # current span endpoint should return span and trace id of zero if no span is "active"
Test_Parametric_DDTrace_Flush: missing_feature (flush endpoint is not implemented, the lack of this feature introduce flakiness in all tests)
Test_Parametric_Otel_Baggage: missing_feature (otel baggage is not supported)
Test_Parametric_Otel_Current_Span: bug (APMAPI-778) # otel current span endpoint should return a span and trace id of zero if no span is "active"
test_partial_flushing.py:
Expand Down
2 changes: 0 additions & 2 deletions manifests/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -771,8 +771,6 @@ tests/:
Test_Otel_Span_Methods: v2.8.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.8.0
test_otel_tracer.py:
Test_Otel_Tracer: v2.8.0
test_parametric_endpoints.py:
Expand Down
2 changes: 0 additions & 2 deletions manifests/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,6 @@ tests/:
Test_Otel_Span_Methods: v1.17.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: v1.17.0
test_parametric_endpoints.py:
Test_Parametric_DDSpan_Set_Resource: missing_feature (set_resource endpoint is not supported)
Test_Parametric_DDTrace_Baggage: missing_feature (baggage is not supported)
Expand Down
Loading

0 comments on commit d416518

Please sign in to comment.