fix(crashtracker): fix payload from v1 into v2#6275
fix(crashtracker): fix payload from v1 into v2#6275gh-worker-dd-mergequeue-cf854d[bot] merged 7 commits intomainfrom
Conversation
|
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 14ffb6f6a9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
nccatoni
left a comment
There was a problem hiding this comment.
LGTM (for @DataDog/system-tests-core) but you should get a review from someone familiar with the feature
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bc01770c5e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
My main question is about keeping only one test, is mandatory ?
Having a test on v1 for a given set of tracers versions and one v2 would be easier to understand write and to understand.
Having two tests would also allow us to know when the switch from v1 → v2 happened in every tracer impacted.
EDIT: discussed live:
- it's fine to keep a single test.
- The
assert_crash_reportshould be split into two func (v1 and v2) and called when needed instead of havingv1andv2strings to improve test readability. - NIT: Another test asserting all tracer are using v2 could be added, tracer not migrated would be marked as
missing_featureuntil they migrate
|
/merge |
|
View all feedbacks in Devflow UI.
This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
The expected merge time in
|
0c9148f
into
main
This is needed to incorporate DataDog/system-tests#6275 as otherwise we get test failures https://github.com/DataDog/dd-trace-rb/actions/runs/21942765829/job/63372573702?pr=5274 ``` ============================= test session starts ============================== gw0 I / gw1 I / gw2 I / gw3 I / gw4 I / gw5 I / gw6 I / gw7 I gw0 [82] / gw1 [82] / gw2 [82] / gw3 [82] / gw4 [82] / gw5 [82] / gw6 [82] / gw7 [82] ssss................s.............x..x..............x.xxx............... [ 82%] ...F.xx... [100%] =================================== FAILURES =================================== ______________ Test_Crashtracking.test_report_crash[library_env0] ______________ [gw4] linux -- Python 3.12.12 /home/runner/work/dd-trace-rb/dd-trace-rb/venv/bin/python self = <tests.parametric.test_crashtracking.Test_Crashtracking object at 0x7f85cb97a240> test_agent = <utils.docker_fixtures._test_agent.TestAgentAPI object at 0x7f8596e1ac00> test_library = <utils.docker_fixtures._test_clients._test_client_parametric.ParametricTestClientApi object at 0x7f8596e1a5a0> @pytest.mark.parametrize("library_env", [{"DD_CRASHTRACKING_ENABLED": "true"}]) def test_report_crash(self, test_agent: TestAgentAPI, test_library: APMLibrary): test_library.crash() while True: event = test_agent.wait_for_telemetry_event("logs", wait_loops=400) > if event is None or "is_crash_ping:true" not in event["payload"][0]["tags"]: E KeyError: 0 tests/parametric/test_crashtracking.py:20: KeyError ```
Motivation
Having support for both v1 and v2 payload.
Libdatadog now send v2 payload : DataDog/libdatadog#1498
Changes
Fixed the crashtracking tests to handle both v1 (
payload:[]) and v2 (payload:{logs:[]}) payload format so we can update to v2 without breaking the system tests.Reviewer checklist
tests/ormanifests/is modified ? I have the approval from R&P team