-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#9150 Introduce SandboxInjectionError and increase sandbox timeouts to 5s #9168
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9168 +/- ##
==========================================
+ Coverage 74.24% 74.80% +0.55%
==========================================
Files 1332 1360 +28
Lines 40817 41886 +1069
Branches 7634 7826 +192
==========================================
+ Hits 30306 31331 +1025
- Misses 10511 10555 +44 ☔ View full report in Codecov by Sentry. |
Playwright test resultsDetails Open report ↗︎ Flaky testschrome › tests/pageEditor/addStarterBrick.spec.ts › Add starter brick to mod Skipped testschrome › tests/regressions/doNotCloseSidebarOnPageEditorSave.spec.ts › #8104: Do not automatically close the sidebar when saving in the Page Editor |
@@ -27,6 +30,7 @@ import { TimeoutError } from "p-timeout"; | |||
import { isSpecificError } from "@/errors/errorHelpers"; | |||
|
|||
const SANDBOX_SHADOW_ROOT_ID = "pixiebrix-sandbox"; | |||
const MAX_RETRIES = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to consider increasing MAX_RETRIES as well.
@grahamlangford if we can get this into a beta build & have users try this out before we release, that would be ideal. We were seeing a spike in this error in the beta build for the last release. Might give us an opportunity to tweak our approach before releasing
src/utils/injectIframe.tsx
Outdated
const TIMEOUT_MS = 5000; | ||
|
||
export class SandboxInjectionError extends Error { | ||
constructor(message: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: prefer override. See examples:
pixiebrix-extension/src/bricks/errors.ts
Line 34 in e05acf0
override name = "HeadlessModeError"; |
override name = "SandboxInjectionError";
No loom links were found in the first post. Please add one there if you'd like to it to appear on Slack. Do not edit this comment manually. |
What does this PR do?
SandboxInjectionError
to be explicit about the cause of the sandbox errors we are seeing (to rule out the less-strong hypothesis that the sandbox is getting removed from the page more often than before)Discussion