Skip to content

[envoy][haproxy] Usage of scenario groups for appsec tests#6060

Closed
e-n-0 wants to merge 43 commits intomainfrom
flavien/proxies/use-scenario-groups
Closed

[envoy][haproxy] Usage of scenario groups for appsec tests#6060
e-n-0 wants to merge 43 commits intomainfrom
flavien/proxies/use-scenario-groups

Conversation

@e-n-0
Copy link
Copy Markdown
Member

@e-n-0 e-n-0 commented Jan 19, 2026

Motivation

Changes

This PR introduces some change in decoration of tests to be included into scenarios:

  • Previously tests were added into scenarios by their corresponding decorator, but here we had new scenarios that was including the same tests. So now tests have a scenario group decorator instead of a scenario. Scenarios now have to "subscribe" to their corresponding scenario group where all the matchings tests are selected.
  • When a test doesn't have a scenario decorator, it was automatically added to the DEFAULT scenario. Now this behavior have a bit changed: it is actually bound to the DEFAULT scenario group. This doesn't change the existing default behavior but this allows default scenarios of proxies or lambda to also have these tests selected.

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • Anything but tests/ or manifests/ is modified ? I have the approval from R&P team
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added, removed or renamed?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 19, 2026

CODEOWNERS have been resolved as:

.github/workflows/run-end-to-end.yml                                    @DataDog/system-tests-core
manifests/envoy.yml                                                     @DataDog/system-tests-core
manifests/haproxy.yml                                                   @DataDog/system-tests-core
tests/appsec/api_security/test_api_security_rc.py                       @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/api_security/test_apisecurity_telemetry.py                 @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/api_security/test_custom_data_classification.py            @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/api_security/test_schemas.py                               @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_alpha.py                                              @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_asm_standalone.py                                     @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_automated_login_events.py                             @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_automated_user_and_session_tracking.py                @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_blocking_addresses.py                                 @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_conf.py                                               @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_extended_data_collection.py                           @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_extended_header_collection.py                         @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_fingerprinting.py                                     @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_ip_blocking_full_denylist.py                          @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_only_python.py                                        @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_remote_config_rule_changes.py                         @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_reports.py                                            @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_request_blocking.py                                   @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_trace_tagging.py                                      @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_traces.py                                             @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_user_blocking_full_denylist.py                        @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_versions.py                                           @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/waf/test_blocking.py                                       @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/waf/test_blocking_security_response_id.py                  @DataDog/asm-libraries @DataDog/system-tests-core
tests/remote_config/test_remote_configuration.py                        @DataDog/remote-config @DataDog/system-tests-core
tests/test_config_consistency.py                                        @DataDog/system-tests-core
tests/test_resource_renaming.py                                         @DataDog/system-tests-core
tests/test_scrubbing.py                                                 @DataDog/system-tests-core
tests/test_semantic_conventions.py                                      @DataDog/system-tests-core
tests/test_standard_tags.py                                             @DataDog/system-tests-core
tests/test_the_test/test_group_rules.py                                 @DataDog/system-tests-core
utils/_context/_scenarios/__init__.py                                   @DataDog/system-tests-core
utils/_context/_scenarios/core.py                                       @DataDog/system-tests-core
utils/_context/_scenarios/go_proxies.py                                 @DataDog/system-tests-core
utils/build/docker/envoy/envoy.yaml                                     @DataDog/system-tests-core

@e-n-0 e-n-0 changed the base branch from main to flavien/proxies/go-proxies-manifest January 21, 2026 13:25
@e-n-0 e-n-0 force-pushed the flavien/proxies/use-scenario-groups branch from 93e0749 to 5916251 Compare January 21, 2026 13:26
@e-n-0 e-n-0 force-pushed the flavien/proxies/go-proxies-manifest branch 3 times, most recently from de1237e to f0d47ee Compare January 23, 2026 14:01
@e-n-0 e-n-0 force-pushed the flavien/proxies/use-scenario-groups branch from 2918cd5 to b9b4236 Compare January 23, 2026 14:06
@e-n-0 e-n-0 force-pushed the flavien/proxies/go-proxies-manifest branch 2 times, most recently from 8855d57 to 180c90f Compare January 26, 2026 10:27
@e-n-0 e-n-0 force-pushed the flavien/proxies/use-scenario-groups branch 2 times, most recently from 46feac9 to e53c1a9 Compare January 26, 2026 16:57
@datadog-official
Copy link
Copy Markdown

datadog-official Bot commented Jan 26, 2026

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

❄️ 1 New flaky test detected

tests.test_resource_renaming.Test_Resource_Renaming_Stats_Aggregation_Keys.test_stats_aggregation_with_method_and_endpoint[haproxy-spoa] from system_tests_suite (Datadog) (Fix with Cursor)
AssertionError: Expected 5 hits for GET /resource_renaming/api/users/{param:int}, got 1
assert 1 == 5

self = <tests.test_resource_renaming.Test_Resource_Renaming_Stats_Aggregation_Keys object at 0x7fdc4488b830>

    def test_stats_aggregation_with_method_and_endpoint(self):
        """Test that stats are aggregated by method and endpoint"""
        stats_points = []
        for stats_data in interfaces.library.get_data("/v0.6/stats"):
            stats = stats_data.get("request", {}).get("content", {}).get("Stats", [])
...

ℹ️ Info

🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 794be8d | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@e-n-0 e-n-0 force-pushed the flavien/proxies/go-proxies-manifest branch from 180c90f to 008382e Compare January 27, 2026 10:35
@e-n-0 e-n-0 force-pushed the flavien/proxies/use-scenario-groups branch from e53c1a9 to 162485d Compare January 27, 2026 16:01
Base automatically changed from flavien/proxies/go-proxies-manifest to main January 27, 2026 22:43
@e-n-0 e-n-0 force-pushed the flavien/proxies/use-scenario-groups branch from efa13de to fc5b393 Compare January 27, 2026 22:48
@e-n-0 e-n-0 marked this pull request as ready for review January 27, 2026 23:22
@e-n-0 e-n-0 requested review from a team as code owners January 27, 2026 23:22
@e-n-0 e-n-0 requested a review from cbeauchesne January 28, 2026 13:13
Copy link
Copy Markdown
Collaborator

@nccatoni nccatoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not entirely sure what you’re aiming to achieve here, could you please provide a bit more detail?

Additionally, the second point in your changes section doesn’t seem to align with the modifications you’ve made. The default scenario group is not a scenario group that is automatically applied to all tests without a scenario group; it is simply the scenario group that contains the default scenario. Moreover, it is deprecated and is currently being removed in this PR.

@e-n-0
Copy link
Copy Markdown
Member Author

e-n-0 commented Jan 28, 2026

@nccatoni The idea of the PR you mentioned came up because of this current PR.
I talked with Charles and there was some misunderstanding about the default scenario and how the scenario for envoy/haproxy were made (weblog as infrastructure but still testing a go library behind).

I'll close this PR for now as it will be superseded by a rewrite of weblog "as customizable client infrastructure", where the current envoy/haproxy infra could live inside, and perform the current scenarios on these.

@e-n-0 e-n-0 closed this Jan 28, 2026
@cbeauchesne cbeauchesne deleted the flavien/proxies/use-scenario-groups branch February 6, 2026 14:28
@e-n-0 e-n-0 restored the flavien/proxies/use-scenario-groups branch March 11, 2026 10:53
@cbeauchesne cbeauchesne deleted the flavien/proxies/use-scenario-groups branch March 26, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants