[ci-visibility] Cypress: do not lose all the trace if testSuiteSpan can't be created#4072
Merged
juan-fernandez merged 2 commits intoFeb 19, 2024
Merged
Conversation
Contributor
Overall package sizeSelf size: 6.08 MB Dependency sizes
🤖 This report was automatically generated by heaviest-objects-in-the-universe |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4072 +/- ##
==========================================
- Coverage 85.45% 84.98% -0.48%
==========================================
Files 247 247
Lines 10664 10727 +63
Branches 33 33
==========================================
+ Hits 9113 9116 +3
- Misses 1551 1611 +60 ☔ View full report in Codecov by Sentry. |
BenchmarksBenchmark execution time: 2024-02-19 08:11:52 Comparing candidate commit 9a4b6a7 in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 259 metrics, 6 unstable metrics. scenario:plugin-graphql-with-depth-off-18
|
anmarchenko
approved these changes
Feb 19, 2024
uurien
approved these changes
Feb 19, 2024
Merged
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Create a
testSuiteSpanin'after:spec'event if it hadn't been created before.Motivation
This is an attempt to improve the fallback behavior of the cypress plugin if there are issues.
testSuiteSpanbeing undefined could be a result of other plugins interacting with CI Visibility's plugin. IftestSuiteSpanis undefined when a test span is created, that span will be invalid (notest_suite_id), resulting in the payload being dropped.With this change, we have a more gracious degradation.
Plugin Checklist
Security
Datadog employees:
@DataDog/security-design-and-guidance.Unsure? Have a question? Request a review!