Skip to content

Commit

Permalink
Merge branch 'main' into mtoff/query-string-consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
mtoffl01 authored Sep 17, 2024
2 parents f725b0d + 45f9664 commit 40fb6fa
Show file tree
Hide file tree
Showing 46 changed files with 485 additions and 123 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/run-docker-ssi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,16 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install runner
id: install_runner
uses: ./.github/actions/install_runner
- name: Run Docker SSI scenario
if: always()
if: always() && steps.install_runner.outcome == 'success'
run: ./run.sh DOCKER_SSI --ssi-weblog ${{matrix.weblog}} --ssi-library ${{ inputs.library }} --ssi-base-image ${{matrix.base_image}} --ssi-arch ${{matrix.arch}} --ssi-installable-runtime ${{matrix.installable_runtime}}
- name: Compress logs
if: always()
if: always() && steps.install_runner.outcome == 'success'
run: tar -czvf artifact.tar.gz $(ls | grep logs)
- name: Upload artifact
if: always()
if: always() && steps.install_runner.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: logs_docker_ssi_${{ inputs.library }}_${{ matrix.unique_name }}
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/run-end-to-end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ jobs:
- name: Run TRACING_CONFIG_NONDEFAULT_2 scenario
if: always() && steps.build.outcome == 'success' && contains(inputs.scenarios, '"TRACING_CONFIG_NONDEFAULT_2"')
run: ./run.sh TRACING_CONFIG_NONDEFAULT_2
env:
DD_API_KEY: ${{ secrets.DD_API_KEY }}
- name: Run TRACING_CONFIG_NONDEFAULT_3 scenario
if: always() && steps.build.outcome == 'success' && contains(inputs.scenarios, '"TRACING_CONFIG_NONDEFAULT_3"')
run: ./run.sh TRACING_CONFIG_NONDEFAULT_3
env:
DD_API_KEY: ${{ secrets.DD_API_KEY }}
- name: Run REMOTE_CONFIG_MOCKED_BACKEND_ASM_FEATURES scenario
Expand Down Expand Up @@ -220,9 +225,9 @@ jobs:
run: ./run.sh APPSEC_BLOCKING
env:
DD_API_KEY: ${{ secrets.DD_API_KEY }}
- name: Run APPSEC_DISABLED scenario
if: always() && steps.build.outcome == 'success' && contains(inputs.scenarios, '"APPSEC_DISABLED"')
run: ./run.sh APPSEC_DISABLED
- name: Run EVERYTHING_DISABLED scenario
if: always() && steps.build.outcome == 'success' && contains(inputs.scenarios, '"EVERYTHING_DISABLED"')
run: ./run.sh EVERYTHING_DISABLED
env:
DD_API_KEY: ${{ secrets.DD_API_KEY }}
- name: Run APPSEC_LOW_WAF_TIMEOUT scenario
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/run-lib-injection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ jobs:
id: k8s-lib-injection-tests
run: ./run.sh K8S_LIBRARY_INJECTION_BASIC

- name: Kubernetes lib-injection profiling tests
id: k8s-lib-injection-tests-profiling
run: ./run.sh K8S_LIBRARY_INJECTION_PROFILING

- name: Compress logs
id: compress_logs
if: always()
Expand Down
12 changes: 9 additions & 3 deletions docs/scenarios/parametric.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,20 +116,26 @@ Add a file datadog-dotnet-apm-<VERSION>.tar.gz in binaries/. <VERSION> must be a

##### Run Parametric tests with a custom Java Tracer version

1. Build Java Tracer artifacts
1. Clone the repo and checkout to the branch you'd like to test
Clone the repo:
```bash
git clone [email protected]:DataDog/dd-trace-java.git
cd dd-trace-java
```
By default you will be on the `master` branch, but if you'd like to run system-tests on the changes you made to your local branch, `gitc checkout` to that branch.

2. Build Java Tracer artifacts
```
./gradlew :dd-java-agent:shadowJar :dd-trace-api:jar
```

2. Copy both artifacts into the `system-tests/binaries/` folder:
3. Copy both artifacts into the `system-tests/binaries/` folder:
* The Java tracer agent artifact `dd-java-agent-*.jar` from `dd-java-agent/build/libs/`
* Its public API `dd-trace-api-*.jar` from `dd-trace-api/build/libs/` into

Note, you should have only TWO jar files in `system-tests/binaries`. Do NOT copy sources or javadoc jars.

3. Run Parametric tests from the `system-tests/parametric` folder:
4. Run Parametric tests from the `system-tests/parametric` folder:

```bash
TEST_LIBRARY=java ./run.sh test_span_sampling.py::test_single_rule_match_span_sampling_sss001
Expand Down
4 changes: 4 additions & 0 deletions manifests/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ tests/:
test_config_consistency.py:
Test_Config_TraceEnabled: missing_feature
Test_Config_TraceLogDirectory: missing_feature
Test_Config_UnifiedServiceTagging: missing_feature
test_dynamic_configuration.py:
TestDynamicConfigHeaderTags: missing_feature
test_otel_api_interoperability.py: irrelevant (library does not implement OpenTelemetry)
Expand All @@ -148,6 +149,7 @@ tests/:
test_otel_span_methods.py: irrelevant (library does not implement OpenTelemetry)
test_span_links.py: missing_feature
test_telemetry.py:
Test_Consistent_Configs: missing_feature
Test_TelemetryInstallSignature: missing_feature
Test_TelemetrySCAEnvVar: missing_feature
test_tracer.py:
Expand All @@ -167,6 +169,8 @@ tests/:
test_miscs.py:
Test_Miscs: missing_feature
test_config_consistency.py:
Test_Config_ClientTagQueryString_Configured: missing_feature
Test_Config_ClientTagQueryString_Empty: missing_feature (test can not capture span with the expected http.url tag)
Test_Config_HttpServerErrorStatuses_Default: missing_feature
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature
Expand Down
7 changes: 7 additions & 0 deletions manifests/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,14 @@ tests/:
Test_DsmSQS: v2.48.0
Test_Dsm_Manual_Checkpoint_Inter_Process: missing_feature
Test_Dsm_Manual_Checkpoint_Intra_Process: missing_feature
k8s_lib_injection/:
test_k8s_manual_inject.py:
TestAdmisionControllerProfiling: missing_feature
parametric/:
test_config_consistency.py:
Test_Config_TraceEnabled: missing_feature
Test_Config_TraceLogDirectory: missing_feature
Test_Config_UnifiedServiceTagging: missing_feature
test_crashtracking.py:
Test_Crashtracking: v3.2.0
test_dynamic_configuration.py:
Expand All @@ -334,6 +338,7 @@ tests/:
Test_Otel_Tracer: v2.8.0
test_span_links.py: missing_feature
test_telemetry.py:
Test_Consistent_Configs: missing_feature
Test_Defaults: v2.49.0
Test_Environment: v2.49.0
Test_TelemetryInstallSignature: v2.45.0
Expand All @@ -360,6 +365,8 @@ tests/:
Test_RemoteConfigurationUpdateSequenceLiveDebugging: v2.15.0
Test_RemoteConfigurationUpdateSequenceLiveDebuggingNoCache: irrelevant (cache is implemented)
test_config_consistency.py:
Test_Config_ClientTagQueryString_Configured: missing_feature (configuration DNE)
Test_Config_ClientTagQueryString_Empty: v2.53.0
Test_Config_HttpServerErrorStatuses_Default: missing_feature
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature
Expand Down
4 changes: 4 additions & 0 deletions manifests/golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ tests/:
test_config_consistency.py:
Test_Config_TraceEnabled: missing_feature
Test_Config_TraceLogDirectory: missing_feature
Test_Config_UnifiedServiceTagging: missing_feature
test_dynamic_configuration.py:
TestDynamicConfigHeaderTags: missing_feature
TestDynamicConfigSamplingRules: v1.64.0-dev
Expand All @@ -458,6 +459,7 @@ tests/:
test_otel_sdk_interoperability.py: missing_feature
test_span_links.py: missing_feature
test_telemetry.py:
Test_Consistent_Configs: missing_feature
Test_Defaults: missing_feature
Test_Environment: missing_feature
Test_TelemetryInstallSignature: missing_feature
Expand All @@ -483,6 +485,8 @@ tests/:
Test_RemoteConfigurationUpdateSequenceLiveDebugging: missing_feature
Test_RemoteConfigurationUpdateSequenceLiveDebuggingNoCache: irrelevant (cache is implemented)
test_config_consistency.py:
Test_Config_ClientTagQueryString_Configured: missing_feature (supports DD_TRACE_HTTP_URL_QUERY_STRING_DISABLED)
Test_Config_ClientTagQueryString_Empty: v1.60.0
Test_Config_HttpServerErrorStatuses_Default: missing_feature
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: v1.67.0
Expand Down
7 changes: 7 additions & 0 deletions manifests/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1170,10 +1170,14 @@ tests/:
Test_Mongo: bug (Endpoint is probably improperly implemented on weblog)
test_sql.py:
Test_Sql: bug (Endpoint is probably improperly implemented on weblog)
k8s_lib_injection/:
test_k8s_manual_inject.py:
TestAdmisionControllerProfiling: v1.39.0
parametric/:
test_config_consistency.py:
Test_Config_TraceEnabled: missing_feature
Test_Config_TraceLogDirectory: missing_feature
Test_Config_UnifiedServiceTagging: missing_feature
test_crashtracking.py:
Test_Crashtracking: v1.38.0
test_dynamic_configuration.py:
Expand All @@ -1189,6 +1193,7 @@ tests/:
test_otel_sdk_interoperability.py: missing_feature
test_span_links.py: missing_feature
test_telemetry.py:
Test_Consistent_Configs: missing_feature
Test_Defaults: v1.31.0
Test_Environment: v1.31.0
Test_TelemetryInstallSignature: v1.27.0
Expand Down Expand Up @@ -1230,6 +1235,8 @@ tests/:
Test_Mock: v0.0.99
Test_NotReleased: missing_feature
test_config_consistency.py:
Test_Config_ClientTagQueryString_Configured: missing_feature (endpoints return 404, but in theory should work)
Test_Config_ClientTagQueryString_Empty: missing_feature (incorrect default value)
Test_Config_HttpServerErrorStatuses_Default: missing_feature
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: v1.39.0
Expand Down
4 changes: 4 additions & 0 deletions manifests/k8s_cluster_agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tests/:
k8s_lib_injection/:
test_k8s_manual_inject.py:
TestAdmisionControllerProfiling: v7.57.0
7 changes: 7 additions & 0 deletions manifests/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -511,10 +511,14 @@ tests/:
Test_Dsm_Manual_Checkpoint_Intra_Process:
'*': irrelevant
express4: *ref_5_20_0
k8s_lib_injection/:
test_k8s_manual_inject.py:
TestAdmisionControllerProfiling: *ref_5_22_0
parametric/:
test_config_consistency.py:
Test_Config_TraceEnabled: missing_feature
Test_Config_TraceLogDirectory: missing_feature
Test_Config_UnifiedServiceTagging: missing_feature
test_dynamic_configuration.py:
TestDynamicConfigHeaderTags: missing_feature
TestDynamicConfigSamplingRules: *ref_5_16_0
Expand All @@ -529,6 +533,7 @@ tests/:
test_span_links.py:
Test_Span_Links: *ref_5_3_0
test_telemetry.py:
Test_Consistent_Configs: missing_feature
Test_Defaults: *ref_5_6_0
Test_Environment: *ref_5_6_0
Test_TelemetryInstallSignature: *ref_4_23_0
Expand All @@ -555,6 +560,8 @@ tests/:
Test_RemoteConfigurationUpdateSequenceLiveDebugging: *ref_5_16_0 #actual version unknown
Test_RemoteConfigurationUpdateSequenceLiveDebuggingNoCache: irrelevant (cache is implemented)
test_config_consistency.py:
Test_Config_ClientTagQueryString_Configured: missing_feature (adding query string to http.url is not supported)
Test_Config_ClientTagQueryString_Empty: missing_feature (removes query strings by default)
Test_Config_HttpServerErrorStatuses_Default: missing_feature
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature
Expand Down
1 change: 1 addition & 0 deletions manifests/parser/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def load(base_dir="manifests/"):
"python_otel",
"ruby",
"dd_apm_inject",
"k8s_cluster_agent",
):
data = _load_file(f"{base_dir}{component}.yml")

Expand Down
8 changes: 6 additions & 2 deletions manifests/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,9 @@ tests/:
test_128_bit_traceids.py:
Test_128_Bit_Traceids: v0.84.0
test_config_consistency.py:
Test_Config_TraceEnabled: missing_feature
Test_Config_TraceEnabled: v1.3.0 # Unknown initial version
Test_Config_TraceLogDirectory: missing_feature
Test_Config_UnifiedServiceTagging: missing_feature
test_crashtracking.py:
Test_Crashtracking: v1.3.0
test_dynamic_configuration.py:
Expand Down Expand Up @@ -287,6 +288,7 @@ tests/:
See <https://github.com/DataDog/system-tests/actions/runs/7629296312/job/20782699614?pr=2005>.)
test_span_links.py: missing_feature
test_telemetry.py:
Test_Consistent_Configs: missing_feature
Test_Defaults: missing_feature
Test_Environment: missing_feature
Test_TelemetryInstallSignature: missing_feature
Expand Down Expand Up @@ -314,7 +316,9 @@ tests/:
test_miscs.py:
Test_Miscs: missing_feature
test_config_consistency.py:
Test_Config_HttpServerErrorStatuses_Default: missing_feature
Test_Config_ClientTagQueryString_Configured: missing_feature (supports dd_trace_http_url_query_param_allowed instead)
Test_Config_ClientTagQueryString_Empty: v1.2.0
Test_Config_HttpServerErrorStatuses_Default: v1.3.0 # Unknown initial version
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Empty: missing_feature
Expand Down
10 changes: 8 additions & 2 deletions manifests/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,7 @@ tests/:
'*': v1.1.0rc2.dev
fastapi: v2.4.0.dev1
test_asm_standalone.py:
Test_AppSecStandalone_UpstreamPropagation:
'*': v2.10.0rc1
Test_AppSecStandalone_UpstreamPropagation: v2.12.3 # flaky before that version, possibly flaky also after
test_automated_login_events.py:
Test_Login_Events: irrelevant (was v2.10.0.dev but will be replaced by V2)
Test_Login_Events_Extended: irrelevant (was v2.10.0.dev but will be replaced by V2)
Expand Down Expand Up @@ -672,12 +671,16 @@ tests/:
Test_Dsm_Manual_Checkpoint_Intra_Process:
'*': irrelevant
flask-poc: v2.8.0
k8s_lib_injection/:
test_k8s_manual_inject.py:
TestAdmisionControllerProfiling: v2.12.2
parametric/:
test_128_bit_traceids.py:
Test_128_Bit_Traceids: v2.6.0
test_config_consistency.py:
Test_Config_TraceEnabled: missing_feature
Test_Config_TraceLogDirectory: missing_feature
Test_Config_UnifiedServiceTagging: missing_feature
test_crashtracking.py:
Test_Crashtracking: v2.11.2
test_dynamic_configuration.py:
Expand Down Expand Up @@ -726,6 +729,7 @@ tests/:
test_span_sampling.py:
Test_Span_Sampling: v2.8.0
test_telemetry.py:
Test_Consistent_Configs: missing_feature
Test_Defaults: v2.9.0.dev
Test_Environment: v2.8.0
Test_TelemetryInstallSignature: v2.5.0
Expand Down Expand Up @@ -754,6 +758,8 @@ tests/:
Test_RemoteConfigurationUpdateSequenceLiveDebugging: v2.8.0.dev
Test_RemoteConfigurationUpdateSequenceLiveDebuggingNoCache: missing_feature
test_config_consistency.py:
Test_Config_ClientTagQueryString_Configured: missing_feature (supports DD_HTPP_CLIENT_TAGS_QUERY_STRING instead)
Test_Config_ClientTagQueryString_Empty: v2.12.0
Test_Config_HttpServerErrorStatuses_Default: missing_feature
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature
Expand Down
9 changes: 8 additions & 1 deletion manifests/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -324,10 +324,14 @@ tests/:
Test_Dsm_Manual_Checkpoint_Intra_Process:
'*': irrelevant
rails70: missing_feature (Endpoint not implemented)
k8s_lib_injection/:
test_k8s_manual_inject.py:
TestAdmisionControllerProfiling: missing_feature
parametric/:
test_config_consistency.py:
Test_Config_TraceEnabled: missing_feature
Test_Config_TraceLogDirectory: missing_feature
Test_Config_UnifiedServiceTagging: missing_feature
test_dynamic_configuration.py:
TestDynamicConfigHeaderTags: bug (To be confirmed, theorical version is v2.0.0)
TestDynamicConfigSamplingRules: v2.0.0
Expand All @@ -352,6 +356,7 @@ tests/:
test_span_links.py:
Test_Span_Links: v2.0.0
test_telemetry.py:
Test_Consistent_Configs: missing_feature
Test_Defaults: missing_feature
Test_Environment: missing_feature
Test_TelemetryInstallSignature: missing_feature
Expand All @@ -365,7 +370,7 @@ tests/:
Test_Trace_Sampling_Tags_Feb2024_Revision: missing_feature
Test_Trace_Sampling_With_W3C: missing_feature
test_tracer.py:
Test_TracerSCITagging: missing_feature
Test_TracerSCITagging: v1.21.0
test_tracer_flare.py:
TestTracerFlareV1: missing_feature
remote_config/:
Expand All @@ -381,6 +386,8 @@ tests/:
test_miscs.py:
Test_Miscs: missing_feature
test_config_consistency.py:
Test_Config_ClientTagQueryString_Configured: missing_feature
Test_Config_ClientTagQueryString_Empty: missing_feature (removes query string by default)
Test_Config_HttpServerErrorStatuses_Default: missing_feature
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature
Expand Down
5 changes: 5 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,11 @@ function main() {
scenarios+=(LIBRARY_CONF_CUSTOM_HEADER_TAGS)
unset "scenarios[${i}]"
;;

APPSEC_DISABLED)
scenarios+=(EVERYTHING_DISABLED)
unset "scenarios[${i}]"
;;
esac
done

Expand Down
3 changes: 2 additions & 1 deletion scenario_groups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ APPSEC_SCENARIOS: &appsec_scenarios
- APPSEC_BLOCKING
- GRAPHQL_APPSEC
- APPSEC_RULES_MONITORING_WITH_ERRORS
- APPSEC_DISABLED
- EVERYTHING_DISABLED
- APPSEC_LOW_WAF_TIMEOUT
- APPSEC_CUSTOM_OBFUSCATION
- APPSEC_RATE_LIMITER
Expand Down Expand Up @@ -42,6 +42,7 @@ TELEMETRY_SCENARIOS: &telemetry_scenarios
TRACING_CONFIG_SCENARIOS: &tracing_config_scenarios
- TRACING_CONFIG_NONDEFAULT
- TRACING_CONFIG_NONDEFAULT_2
- TRACING_CONFIG_NONDEFAULT_3

# Scenarios to run before a tracer release, basically, all stable scenarios
TRACER_RELEASE_SCENARIOS:
Expand Down
Loading

0 comments on commit 40fb6fa

Please sign in to comment.