fix: Watchdog Termination is not supported in Synthetics env #1937
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 and why?
After starting dogfooding WT, we saw 300+ terminations caused by WT in s8s but those are not actually WT but normal terminations caused by https://github.com/appium/appium-xcuitest-driver/blob/main/lib/real-device.js#L216 API. This API is used by s8s for Restart Application special action.
How?
Add extra
syntheticsEnvironment
state variable which stores the state if the app was running in s8s or not. This value is determined based on the presence of_dd.synthetics.test_id
or_dd.synthetics.result_id
env vars.I couldn't find any other information in the form of env var, args or launch args which we can use to make a decision so it not only covers s8s but also covers other UI automation frameworks.
Review checklist
Custom CI job configuration (optional)