Skip to content

Commit 8ebb5aa

Browse files
authored
Merge branch 'main' into maximo/otlp-runtime-metrics-test
2 parents e44ad35 + a850f56 commit 8ebb5aa

41 files changed

Lines changed: 766 additions & 186 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/run-end-to-end.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ on:
101101
default: "datadoghq.com"
102102
required: false
103103
type: string
104+
_system_tests_dev_mode:
105+
description: "Shall we run system tests in dev mode (library and agent dev binary)"
106+
default: false
107+
required: false
108+
type: boolean
104109

105110
jobs:
106111
main:
@@ -111,6 +116,7 @@ jobs:
111116
SYSTEM_TESTS_REPORT_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
112117
SYSTEM_TESTS_SKIP_EMPTY_SCENARIO: ${{ inputs.skip_empty_scenarios }}
113118
SYSTEM_TESTS_FORCE_EXECUTE: ${{ inputs.force_execute }}
119+
SYSTEM_TESTS_DEV_MODE: ${{ inputs._system_tests_dev_mode }}
114120
steps:
115121
- name: Compute ref
116122
id: compute_ref

.github/workflows/stale-prs.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Close stale PRs
2+
3+
on:
4+
schedule:
5+
- cron: '0 9 * * 1' # Every Monday at 09:00 UTC
6+
workflow_dispatch:
7+
8+
jobs:
9+
stale:
10+
name: Mark and close stale PRs
11+
runs-on: ubuntu-latest
12+
permissions:
13+
pull-requests: write
14+
15+
steps:
16+
- uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
17+
with:
18+
# Only touch PRs, not issues
19+
days-before-issue-stale: -1
20+
days-before-issue-close: -1
21+
22+
# Mark a PR stale after 1 year of no activity
23+
days-before-pr-stale: 365
24+
# Close it 2 weeks after the stale warning, if still no activity
25+
days-before-pr-close: 14
26+
27+
stale-pr-label: stale
28+
stale-pr-message: >
29+
This PR has had no activity for over a year. It will be closed in 2 weeks
30+
unless there is new activity or the `stale` label is removed.
31+
close-pr-message: >
32+
Closing this PR due to inactivity. Feel free to reopen if the work is still relevant.
33+
34+
# Exempt PRs whose authors are members or collaborators
35+
exempt-pr-labels: 'do-not-close,pinned'

.github/workflows/system-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ jobs:
177177
secrets: inherit
178178
permissions:
179179
id-token: write
180+
contents: read
180181
with:
181182
library: ${{ inputs.library }}
182183
ref: ${{ inputs.ref }}
@@ -265,6 +266,7 @@ jobs:
265266
secrets: inherit
266267
permissions:
267268
id-token: write
269+
contents: read
268270
with:
269271
runs_on: ${{ matrix.job.runs_on }}
270272
library: ${{ matrix.job.library }}
@@ -285,6 +287,7 @@ jobs:
285287
_build_proxy_image: ${{ inputs._build_proxy_image }}
286288
_build_lambda_proxy_image: ${{ inputs._build_lambda_proxy_image }}
287289
_enable_replay_scenarios: ${{ inputs._enable_replay_scenarios }}
290+
_system_tests_dev_mode: ${{ inputs._system_tests_dev_mode }}
288291

289292
display_summary:
290293
name: Report failures

conftest.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
from utils import context
2222
from utils._context._scenarios import Scenario, scenarios
23-
from utils._context.component_version import ComponentVersion, Version
23+
from utils._context.component_version import ComponentVersion
2424
from utils.const import COMPONENT_GROUPS
2525
from utils._decorators import add_pytest_marker
2626
from utils._decorators import configure as configure_decorators
@@ -233,7 +233,7 @@ def pytest_sessionstart(session: pytest.Session) -> None:
233233
if not session.config.option.collectonly:
234234
context.scenario.pytest_sessionstart(session)
235235

236-
# The canonical way o adding Junit properties to testsuite is not working with xdist
236+
# The canonical way of adding Junit properties to testsuite is not working with xdist
237237
# Workaround to tackle this issue
238238
# https://github.com/pytest-dev/pytest/issues/7767#issuecomment-698560400
239239
xml = session.config._store.get(xml_key, None) # noqa: SLF001
@@ -247,6 +247,15 @@ def pytest_sessionstart(session: pytest.Session) -> None:
247247
logger.terminal.write(" *** .:: Sleep mode activated. Press Ctrl+C to exit ::. *** ")
248248
logger.terminal.write("\n ********************************************************** \n\n")
249249

250+
if os.environ.get("SYSTEM_TESTS_DEV_MODE", "").lower() == "true":
251+
logger.info("Checking that no version is ahead of main branch")
252+
manifest = Manifest(context.scenario.components, context.weblog_variant)
253+
errors = manifest.assert_versions_not_ahead_of_current()
254+
if errors:
255+
message = "Dev mode check: manifest declares versions ahead of the current tested version:\n"
256+
message += "\n".join(f" - {e}" for e in errors)
257+
pytest.exit(message, 1)
258+
250259

251260
# called when each test item is collected
252261
def _collect_item_metadata(item: pytest.Item):
@@ -290,10 +299,8 @@ def pytest_collection_modifyitems(session: pytest.Session, config: pytest.Config
290299
"""Unselect items that were deactivated in the manifests or that are not included in the current scenario"""
291300

292301
logger.debug("pytest_collection_modifyitems")
293-
manifest_components: dict[str, Version] = {
294-
name: version for name, version in context.scenario.components.items() if isinstance(version, Version)
295-
}
296-
manifest = Manifest(manifest_components, context.weblog_variant)
302+
manifest = Manifest(context.scenario.components, context.weblog_variant)
303+
297304
for item in items:
298305
assert isinstance(item, pytest.Function)
299306
declarations = manifest.get_declarations(item.nodeid)
@@ -399,6 +406,8 @@ def _item_is_skipped(item: pytest.Item):
399406

400407

401408
def pytest_collection_finish(session: pytest.Session) -> None:
409+
logger.debug("pytest_collection_finish")
410+
402411
if session.config.option.collectonly:
403412
return
404413

manifests/cpp_nginx.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ manifest:
189189
tests/appsec/waf/test_addresses.py::Test_GrpcServerMethod: irrelevant
190190
tests/appsec/waf/test_addresses.py::Test_Headers: v1.2.0
191191
tests/appsec/waf/test_addresses.py::Test_Headers::test_specific_key2: irrelevant (Header rejected by nginx ('client sent invalid header line)
192+
tests/appsec/waf/test_addresses.py::Test_IoFsFileWrite: "irrelevant (Java-only address: server.io.fs.file_write)"
192193
tests/appsec/waf/test_addresses.py::Test_PathParams: irrelevant (path params waf address unfilled)
193194
tests/appsec/waf/test_addresses.py::Test_ResponseStatus: v1.2.0
194195
tests/appsec/waf/test_addresses.py::Test_UrlQueryKey: v1.2.0

manifests/dotnet.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,7 @@ manifest:
534534
tests/appsec/waf/test_addresses.py::Test_GraphQL: missing_feature
535535
tests/appsec/waf/test_addresses.py::Test_GrpcServerMethod: missing_feature
536536
tests/appsec/waf/test_addresses.py::Test_Headers: v1.28.6
537+
tests/appsec/waf/test_addresses.py::Test_IoFsFileWrite: "irrelevant (Java-only address: server.io.fs.file_write)"
537538
tests/appsec/waf/test_addresses.py::Test_PathParams: v2.5.1
538539
tests/appsec/waf/test_addresses.py::Test_ResponseStatus: v2.3.0
539540
tests/appsec/waf/test_addresses.py::Test_UrlQuery: v1.28.6
@@ -1152,6 +1153,7 @@ manifest:
11521153
tests/test_span_events.py: incomplete_test_app (Weblog `/add_event` not implemented)
11531154
tests/test_standard_tags.py::Test_StandardTagsClientIp: v2.26.0
11541155
tests/test_standard_tags.py::Test_StandardTagsMethod: v2.0.0-prerelease
1156+
tests/test_standard_tags.py::Test_StandardTagsNetworkClientIp: v0.1 # unknown initial version
11551157
tests/test_standard_tags.py::Test_StandardTagsReferrerHostname: missing_feature
11561158
tests/test_standard_tags.py::Test_StandardTagsRoute: v2.13.0
11571159
tests/test_standard_tags.py::Test_StandardTagsStatusCode: v2.0.0-prerelease

manifests/envoy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ manifest:
3636
tests/test_semantic_conventions.py: v1.72.0
3737
tests/test_semantic_conventions.py::Test_Meta::test_meta_component_tag: v2.3.0
3838
tests/test_standard_tags.py: v1.72.0
39+
tests/test_standard_tags.py::Test_StandardTagsNetworkClientIp: v0.1 # unknown initial version
3940
tests/test_standard_tags.py::Test_StandardTagsReferrerHostname: missing_feature
4041
tests/test_standard_tags.py::Test_StandardTagsUrl::test_multiple_matching_substring: irrelevant (tracer did not yet implemented the new version of query parameters obfuscation regex)
4142
tests/test_standard_tags.py::Test_StandardTagsUrl::test_url_with_sensitive_query_string: irrelevant (tracer did not yet implemented the new version of query parameters obfuscation regex)

manifests/golang.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,14 @@ manifest:
3939
tests/appsec/api_security/test_custom_data_classification.py::Test_API_Security_Custom_Data_Classification_Negative: v2.4.0
4040
tests/appsec/api_security/test_custom_data_classification.py::Test_API_Security_Custom_Data_Classification_Processor_Override: v2.4.0
4141
tests/appsec/api_security/test_custom_data_classification.py::Test_API_Security_Custom_Data_Classification_Scanner: v2.4.0
42-
tests/appsec/api_security/test_endpoint_discovery.py::Test_Endpoint_Discovery: missing_feature
42+
tests/appsec/api_security/test_endpoint_discovery.py::Test_Endpoint_Discovery:
43+
- weblog_declaration:
44+
"*": missing_feature
45+
echo: v2.7.0-dev # Automatic with orchestrion, semi-manual without
46+
tests/appsec/api_security/test_endpoint_discovery.py::Test_Endpoint_Discovery::test_optional_authentication: irrelevant (Not supported)
47+
tests/appsec/api_security/test_endpoint_discovery.py::Test_Endpoint_Discovery::test_optional_request_body_type: irrelevant (Not supported)
48+
tests/appsec/api_security/test_endpoint_discovery.py::Test_Endpoint_Discovery::test_optional_response_body_type: irrelevant (Not supported)
49+
tests/appsec/api_security/test_endpoint_discovery.py::Test_Endpoint_Discovery::test_optional_response_code: irrelevant (Not supported)
4350
tests/appsec/api_security/test_endpoint_fallback.py: missing_feature
4451
tests/appsec/api_security/test_endpoints.py: irrelevant (language not implementing this feature)
4552
tests/appsec/api_security/test_schemas.py::Test_Scanners: v2.0.0
@@ -670,6 +677,7 @@ manifest:
670677
chi: v1.36.0
671678
echo: v1.36.0
672679
gin: v1.37.0
680+
tests/appsec/waf/test_addresses.py::Test_IoFsFileWrite: "irrelevant (Java-only address: server.io.fs.file_write)"
673681
tests/appsec/waf/test_addresses.py::Test_PathParams:
674682
- weblog_declaration:
675683
"*": v1.36.0
@@ -1360,12 +1368,7 @@ manifest:
13601368
gqlgen: v1.73.0
13611369
graph-gophers: v1.73.0
13621370
graphql-go: v1.73.0
1363-
tests/test_graphql.py::Test_GraphQLOperationErrorTracking:
1364-
- weblog_declaration:
1365-
"*": missing_feature
1366-
gqlgen: missing_feature
1367-
graph-gophers: missing_feature
1368-
graphql-go: missing_feature
1371+
tests/test_graphql.py::Test_GraphQLOperationErrorTracking: missing_feature
13691372
tests/test_identify.py::Test_Basic: v1.37.0
13701373
tests/test_identify.py::Test_Basic::test_identify_tags:
13711374
- declaration: bug (APMRP-360)
@@ -1433,6 +1436,7 @@ manifest:
14331436
- declaration: missing_feature (missing fastly-client-ip, cf-connecting-ip, cf-connecting-ipv6)
14341437
component_version: <1.69.0
14351438
tests/test_standard_tags.py::Test_StandardTagsMethod: v1.39.0
1439+
tests/test_standard_tags.py::Test_StandardTagsNetworkClientIp: v0.1 # unknown initial version
14361440
tests/test_standard_tags.py::Test_StandardTagsReferrerHostname: missing_feature
14371441
tests/test_standard_tags.py::Test_StandardTagsRoute: v1.39.0
14381442
tests/test_standard_tags.py::Test_StandardTagsStatusCode: v1.39.0

manifests/haproxy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ manifest:
3333
tests/test_scrubbing.py: v2.4.0
3434
tests/test_semantic_conventions.py: v2.4.0
3535
tests/test_standard_tags.py: v2.4.0
36+
tests/test_standard_tags.py::Test_StandardTagsNetworkClientIp: v0.1 # unknown initial version
3637
tests/test_standard_tags.py::Test_StandardTagsReferrerHostname: missing_feature
3738
tests/test_standard_tags.py::Test_StandardTagsUrl::test_multiple_matching_substring: irrelevant (tracer did not yet implemented the new version of query parameters obfuscation regex)
3839
tests/test_standard_tags.py::Test_StandardTagsUrl::test_url_with_sensitive_query_string: irrelevant (tracer did not yet implemented the new version of query parameters obfuscation regex)

manifests/java.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2585,6 +2585,10 @@ manifest:
25852585
tests/appsec/waf/test_addresses.py::Test_Headers::test_specific_wrong_key:
25862586
- weblog_declaration:
25872587
spring-boot-3-native: missing_feature (GraalVM. Tracing support only)
2588+
tests/appsec/waf/test_addresses.py::Test_IoFsFileWrite:
2589+
- weblog_declaration:
2590+
"*": v1.62.0-SNAPSHOT
2591+
spring-boot-3-native: irrelevant (GraalVM. Tracing support only)
25882592
tests/appsec/waf/test_addresses.py::Test_PathParams:
25892593
- weblog_declaration:
25902594
"*": v0.95.1
@@ -4299,6 +4303,11 @@ manifest:
42994303
tests/test_standard_tags.py::Test_StandardTagsMethod::test_method_trace:
43004304
- weblog_declaration:
43014305
spring-boot-payara: missing_feature (This weblog variant is currently not accepting TRACE)
4306+
tests/test_standard_tags.py::Test_StandardTagsNetworkClientIp:
4307+
- weblog_declaration:
4308+
"*": v0.93.0
4309+
spring-boot-3-native: irrelevant (GraalVM. Tracing support only)
4310+
tests/test_standard_tags.py::Test_StandardTagsNetworkClientIp::test_network_client_ip: missing_feature (APPSEC-62219)
43024311
tests/test_standard_tags.py::Test_StandardTagsReferrerHostname: missing_feature
43034312
tests/test_standard_tags.py::Test_StandardTagsRoute:
43044313
- weblog_declaration:

0 commit comments

Comments
 (0)