Skip to content

Commit

Permalink
Merge branch 'main' into avara1986/APPSEC-10657-xss_django
Browse files Browse the repository at this point in the history
  • Loading branch information
avara1986 authored Jan 31, 2025
2 parents f755d8e + 8519bfb commit 0a6cacc
Show file tree
Hide file tree
Showing 74 changed files with 2,254 additions and 357 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
build_buddies_images: ${{ contains(github.event.pull_request.labels.*.name, 'build-buddies-images') }}
build_proxy_image: ${{ contains(github.event.pull_request.labels.*.name, 'build-proxy-image') }}
build_lib_injection_app_images: ${{ contains(github.event.pull_request.labels.*.name, 'build-lib-injection-app-images') }}
_experimental_parametric_job_count: ${{ matrix.version == 'dev' && 2 || 1 }} # test both use cases
parametric_job_count: ${{ matrix.version == 'dev' && 2 || 1 }} # test both use cases
skip_empty_scenarios: true

system_tests_docker_mode:
Expand All @@ -157,7 +157,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- system_tests
if: always()
if: '!cancelled()'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/compute-workflow-parameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
description: "Comma-separated list of scenarios groups to run"
type: string
default: ""
_experimental_parametric_job_count:
parametric_job_count:
description: "*EXPERIMENTAL* : How many jobs should be used to run PARAMETRIC scenario"
default: 1
required: false
Expand Down Expand Up @@ -55,9 +55,9 @@ on:
externalprocessing_scenarios:
description: ""
value: ${{ jobs.main.outputs.externalprocessing_scenarios }}
_experimental_parametric_job_matrix:
parametric_job_matrix:
description: ""
value: ${{ jobs.main.outputs._experimental_parametric_job_matrix }}
value: ${{ jobs.main.outputs.parametric_job_matrix }}

jobs:
main:
Expand All @@ -73,7 +73,8 @@ jobs:
opentelemetry_weblogs: ${{ steps.main.outputs.opentelemetry_weblogs }}
parametric_scenarios: ${{ steps.main.outputs.parametric_scenarios }}
externalprocessing_scenarios: ${{ steps.main.outputs.externalprocessing_scenarios }}
_experimental_parametric_job_matrix: ${{ steps.main.outputs._experimental_parametric_job_matrix }}
parametric_job_matrix: ${{ steps.main.outputs.parametric_job_matrix }}
parametric_job_count: ${{ steps.main.outputs.parametric_job_count }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -88,7 +89,7 @@ jobs:
python utils/scripts/compute-workflow-parameters.py ${{ inputs.library }} \
-s "${{ inputs.scenarios }}" \
-g "${{ inputs.scenarios_groups }}" \
--parametric-job-count ${{ inputs.parametric_job_count }} \
--ci-environment "${{ inputs._ci_environment }}" >> $GITHUB_OUTPUT
env:
PYTHONPATH: "."
_EXPERIMENTAL_PARAMETRIC_JOB_COUNT: ${{ inputs._experimental_parametric_job_count }}
20 changes: 15 additions & 5 deletions .github/workflows/run-parametric.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,25 @@ on:
default: 'custom'
required: false
type: string
_experimental_job_count:
job_count:
description: "How many job should be spawned for the parametric test"
default: 1
required: false
type: number
_experimental_job_matrix:
job_matrix:
# github action syntax is not very powerfull, it require a job to compute this.
# => save on job, by asking the caller to compute this list
description: "Job matrix, JSON array of number from 1 to _experimental_job_count"
description: "Job matrix, JSON array of number from 1 to job_count"
default: '[1]'
required: false
type: string
_experimental_job_count:
description: "DEPRECATED"
default: 1
required: false
type: number
_experimental_job_matrix:
description: "DEPRECATED"
default: '[1]'
required: false
type: string
Expand All @@ -39,7 +49,7 @@ jobs:
strategy:
fail-fast: false
matrix:
job_instance: ${{ fromJson( inputs._experimental_job_matrix ) }}
job_instance: ${{ fromJson( inputs.job_matrix ) }}
env:
SYSTEM_TESTS_REPORT_ENVIRONMENT: ${{ inputs.ci_environment }}
SYSTEM_TESTS_REPORT_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
Expand All @@ -57,7 +67,7 @@ jobs:
name: ${{ inputs.binaries_artifact }}
path: binaries/
- name: Run PARAMETRIC scenario
run: ./run.sh PARAMETRIC -L ${{ inputs.library }} --splits=${{ inputs._experimental_job_count }} --group=${{ matrix.job_instance }}
run: ./run.sh PARAMETRIC -L ${{ inputs.library }} --splits=${{ inputs.job_count }} --group=${{ matrix.job_instance }}
- name: Compress logs
id: compress_logs
if: always()
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/system-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,13 @@ on:
default: false
required: false
type: boolean
parametric_job_count:
description: "How many jobs should be used to run PARAMETRIC scenario"
default: 1
required: false
type: number
_experimental_parametric_job_count:
description: "*EXPERIMENTAL* : How many jobs should be used to run PARAMETRIC scenario"
description: "*DEPRECATED*"
default: 1
required: false
type: number
Expand All @@ -70,7 +75,7 @@ jobs:
library: ${{ inputs.library }}
scenarios: ${{ inputs.scenarios }}
scenarios_groups: ${{ inputs.scenarios_groups }}
_experimental_parametric_job_count: ${{ inputs._experimental_parametric_job_count }}
parametric_job_count: ${{ inputs.parametric_job_count }}
_ci_environment: ${{ inputs.ci_environment }}

parametric:
Expand All @@ -83,8 +88,8 @@ jobs:
library: ${{ inputs.library }}
binaries_artifact: ${{ inputs.binaries_artifact }}
ci_environment: ${{ inputs.ci_environment }}
_experimental_job_count: ${{ inputs._experimental_parametric_job_count }}
_experimental_job_matrix: ${{ needs.compute_parameters.outputs._experimental_parametric_job_matrix }}
job_count: ${{ inputs.parametric_job_count }}
job_matrix: ${{ needs.compute_parameters.outputs.parametric_job_matrix }}

graphql:
needs:
Expand Down
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,10 @@
],
"python.testing.pytestEnabled": true,
"ruff.enable": true,
"ruff.interpreter": [
"${workspaceFolder}/venv/bin/python",
"-m",
"ruff"
],
"pylint.ignorePatterns": ["*"]
}
6 changes: 6 additions & 0 deletions docs/execute/binaries.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ Create a file `golang-load-from-go-get` under the `binaries` directory that spec
* `gopkg.in/DataDog/[email protected]` Test the 1.67.0 release
* `gopkg.in/DataDog/dd-trace-go.v1@<commit_hash>` Test un-merged changes

To change Orchestrion version, create a file `orchestrion-load-from-go-get` under the `binaries` directory that specifies the target build. The content of this file will be installed by the weblog or parametric app via `go get` when the test image is built.
* Content example:
* `github.com/DataDog/orchestrion@main` Test the main branch
* `github.com/DataDog/[email protected]` Test the 1.1.0 release
* `github.com/DataDog/orchestrion@<commit_hash>` Test un-merged changes

## Java library

Follow these steps to run Parametric tests with a custom Java Tracer version:
Expand Down
8 changes: 5 additions & 3 deletions manifests/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,10 @@ tests/:
test_inferred_proxy.py:
Test_AWS_API_Gateway_Inferred_Span_Creation: missing_feature
test_otel_drop_in.py:
Test_Otel_Drop_In: missing_feature
Test_Otel_Drop_In: irrelevant (library does not implement OpenTelemetry)
otel/:
test_context_propagation.py:
Test_Otel_Context_Propagation_Default_Propagator_Api: irrelevant (library does not implement OpenTelemetry)
parametric/:
test_128_bit_traceids.py:
Test_128_Bit_Traceids: v1.0.1.dev
Expand Down Expand Up @@ -261,8 +264,7 @@ tests/:
test_distributed.py:
Test_DistributedHttp: missing_feature
Test_Span_Links_Flags_From_Conflicting_Contexts: missing_feature (implementation specs have not been determined)
Test_Span_Links_From_Conflicting_Contexts: missing_feature
Test_Span_Links_From_Conflicting_Contexts_Datadog_Precedence: missing_feature
Test_Span_Links_From_Conflicting_Contexts: missing_feature (baggage should be implemented and conflicting trace contexts should generate span link)
Test_Span_Links_Omit_Tracestate_From_Conflicting_Contexts: missing_feature (implementation specs have not been determined)
test_graphql.py: missing_feature
test_identify.py: irrelevant
Expand Down
10 changes: 8 additions & 2 deletions manifests/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,9 @@ tests/:
Test_AWS_API_Gateway_Inferred_Span_Creation: missing_feature
test_otel_drop_in.py:
Test_Otel_Drop_In: missing_feature
otel/:
test_context_propagation.py:
Test_Otel_Context_Propagation_Default_Propagator_Api: v3.9.0
parametric/:
test_config_consistency.py:
Test_Config_Dogstatsd: missing_feature (does not support hostname)
Expand Down Expand Up @@ -512,8 +515,7 @@ tests/:
test_distributed.py:
Test_DistributedHttp: missing_feature
Test_Span_Links_Flags_From_Conflicting_Contexts: missing_feature (implementation specs have not been determined)
Test_Span_Links_From_Conflicting_Contexts: missing_feature
Test_Span_Links_From_Conflicting_Contexts_Datadog_Precedence: missing_feature
Test_Span_Links_From_Conflicting_Contexts: missing_feature (implementation specs have not been determined)
Test_Span_Links_Omit_Tracestate_From_Conflicting_Contexts: missing_feature (implementation specs have not been determined)
test_graphql.py: missing_feature
test_identify.py:
Expand All @@ -522,6 +524,10 @@ tests/:
Test_Propagate_Legacy: v2.26.0
test_ipv6.py: missing_feature (APMAPI-869)
test_library_conf.py:
Test_ExtractBehavior_Default: missing_feature (conflicting trace contexts should generate span link)
Test_ExtractBehavior_Ignore: missing_feature (extract behavior not implemented)
Test_ExtractBehavior_Restart: missing_feature (extract behavior not implemented)
Test_ExtractBehavior_Restart_With_Extract_First: missing_feature (extract behavior not implemented)
Test_HeaderTags: v2.27.0
Test_HeaderTags_Colon_Leading: v2.1.0
Test_HeaderTags_Colon_Trailing: v3.0.0
Expand Down
36 changes: 34 additions & 2 deletions manifests/golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ tests/:
Test_API_Security_Sampling_Rate:
'*': v1.60.0
net-http: irrelevant (net-http doesn't handle path params)
net-http-orchestrion: irrelevant (net-http doesn't handle path params)
Test_API_Security_Sampling_With_Delay: missing_feature
test_schemas.py:
Test_Scanners: missing_feature
Expand All @@ -32,6 +33,7 @@ tests/:
Test_Schema_Request_Path_Parameters:
'*': v1.60.0
net-http: irrelevant (net-http cannot list path params)
net-http-orchestrion: irrelevant (net-http cannot list path params)
Test_Schema_Request_Query_Parameters: v1.60.0
Test_Schema_Response_Body: missing_feature
Test_Schema_Response_Body_env_var: missing_feature
Expand Down Expand Up @@ -217,6 +219,7 @@ tests/:
'*': v1.36.0
gin: v1.37.0
net-http: irrelevant (net-http doesn't handle path params)
net-http-orchestrion: irrelevant (net-http doesn't handle path params)
Test_ResponseStatus:
'*': v1.36.0
gin: v1.37.0
Expand Down Expand Up @@ -337,21 +340,27 @@ tests/:
Test_Blocking_request_cookies:
'*': v1.51.0
net-http: irrelevant
net-http-orchestrion: irrelevant
Test_Blocking_request_headers:
'*': v1.51.0
net-http: irrelevant
net-http-orchestrion: irrelevant
Test_Blocking_request_method:
'*': v1.51.0
net-http: irrelevant
net-http-orchestrion: irrelevant
Test_Blocking_request_path_params:
'*': v1.51.0
net-http: irrelevant
net-http-orchestrion: irrelevant
Test_Blocking_request_query:
'*': v1.51.0
net-http: irrelevant
net-http-orchestrion: irrelevant
Test_Blocking_request_uri:
'*': v1.51.0
net-http: irrelevant
net-http-orchestrion: irrelevant
Test_Blocking_response_headers: missing_feature
Test_Blocking_response_status: missing_feature
Test_Blocking_user_id: v1.51.0
Expand Down Expand Up @@ -457,21 +466,26 @@ tests/:
Test_Kinesis_PROPAGATION_VIA_MESSAGE_ATTRIBUTES:
"*": irrelevant
net-http: missing_feature (Endpoint not implemented)
net-http-orchestrion: missing_feature (Endpoint not implemented)
test_rabbitmq.py:
Test_RabbitMQ_Trace_Context_Propagation:
"*": irrelevant
net-http: missing_feature (Endpoint not implemented)
net-http-orchestrion: missing_feature (Endpoint not implemented)
test_sns_to_sqs.py:
Test_SNS_Propagation:
"*": irrelevant
net-http: missing_feature
net-http-orchestrion: missing_feature (Endpoint not implemented)
test_sqs.py:
Test_SQS_PROPAGATION_VIA_AWS_XRAY_HEADERS:
"*": irrelevant
net-http: missing_feature (Endpoint not implemented)
net-http-orchestrion: missing_feature (Endpoint not implemented)
Test_SQS_PROPAGATION_VIA_MESSAGE_ATTRIBUTES:
"*": irrelevant
net-http: missing_feature (Endpoint not implemented)
net-http-orchestrion: missing_feature (Endpoint not implemented)
test_db_integrations_sql.py:
Test_MsSql: missing_feature
Test_MySql: missing_feature
Expand All @@ -492,31 +506,44 @@ tests/:
Test_DsmKinesis:
"*": irrelevant
net-http: missing_feature (Endpoint not implemented)
net-http-orchestrion: missing_feature (Endpoint not implemented)
Test_DsmRabbitmq:
"*": irrelevant
net-http: missing_feature (Endpoint not implemented)
net-http-orchestrion: missing_feature (Endpoint not implemented)
Test_DsmRabbitmq_FanoutExchange:
"*": irrelevant
net-http: missing_feature (Endpoint not implemented)
net-http-orchestrion: missing_feature (Endpoint not implemented)
Test_DsmRabbitmq_TopicExchange:
"*": irrelevant
net-http: missing_feature (Endpoint not implemented)
net-http-orchestrion: missing_feature (Endpoint not implemented)
Test_DsmSNS:
"*": irrelevant
net-http: missing_feature (Endpoint not implemented)
net-http-orchestrion: missing_feature (Endpoint not implemented)
Test_DsmSQS:
"*": irrelevant
net-http: missing_feature (Endpoint not implemented)
net-http-orchestrion: missing_feature (Endpoint not implemented)
Test_Dsm_Manual_Checkpoint_Inter_Process:
"*": irrelevant
net-http: missing_feature (Endpoint not implemented)
net-http-orchestrion: missing_feature (Endpoint not implemented)
Test_Dsm_Manual_Checkpoint_Intra_Process:
"*": irrelevant
net-http: missing_feature (Endpoint not implemented)
net-http-orchestrion: missing_feature (Endpoint not implemented)
test_inferred_proxy.py:
Test_AWS_API_Gateway_Inferred_Span_Creation: missing_feature
test_otel_drop_in.py:
Test_Otel_Drop_In: missing_feature
otel/:
test_context_propagation.py:
Test_Otel_Context_Propagation_Default_Propagator_Api:
'*': incomplete_test_app (endpoint not implemented)
net-http: v1.70.1
parametric/:
test_config_consistency.py:
Test_Config_Dogstatsd: v1.72.0-dev
Expand Down Expand Up @@ -592,7 +619,9 @@ tests/:
Test_Config_ClientTagQueryString_Configured: v1.72.0-dev
Test_Config_ClientTagQueryString_Empty: v1.72.0-dev
Test_Config_HttpClientErrorStatuses_Default: v1.69.0
Test_Config_HttpClientErrorStatuses_FeatureFlagCustom: v1.69.0
Test_Config_HttpClientErrorStatuses_FeatureFlagCustom:
'*': v1.69.0
net-http-orchestrion: v1.72.0-dev
Test_Config_HttpServerErrorStatuses_Default: v1.67.0
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom:
"*": v1.69.0
Expand All @@ -617,7 +646,6 @@ tests/:
Test_DistributedHttp: missing_feature
Test_Span_Links_Flags_From_Conflicting_Contexts: missing_feature (implementation specs have not been determined)
Test_Span_Links_From_Conflicting_Contexts: missing_feature
Test_Span_Links_From_Conflicting_Contexts_Datadog_Precedence: missing_feature
Test_Span_Links_Omit_Tracestate_From_Conflicting_Contexts: missing_feature (implementation specs have not been determined)
Test_Synthetics_APM_Datadog: bug (APMAPI-901) # the incoming headers are considered invalid
test_graphql.py: missing_feature
Expand All @@ -626,6 +654,10 @@ tests/:
Test_Propagate: v1.48.0-rc.1
Test_Propagate_Legacy: v1.41.0
test_library_conf.py:
Test_ExtractBehavior_Default: missing_feature (baggage should be implemented and conflicting trace contexts should generate span link in v1.71.0)
Test_ExtractBehavior_Ignore: missing_feature (extract behavior not implemented)
Test_ExtractBehavior_Restart: missing_feature (extract behavior not implemented)
Test_ExtractBehavior_Restart_With_Extract_First: missing_feature (extract behavior not implemented)
Test_HeaderTags: v1.53.0
Test_HeaderTags_Colon_Leading: v1.53.0
Test_HeaderTags_Colon_Trailing: v1.70.0
Expand Down
Loading

0 comments on commit 0a6cacc

Please sign in to comment.