Repository navigation
perf(Onboarding): Create the demo setup in parallel for new organisations - #9200
talissoncosta wants to merge 1 commit into
Conversation
…ions Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Docker builds report
|
There was a problem hiding this comment.
1 issue found across 1 file
Confidence score: 3/5
bootstrapOnboarding.tscan leave a Production project behind when Development creation fails; on reload, the retry may reuse that project and fall back to its first environment. Make the bootstrap retry-safe or clean up the partial creation on failure.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="frontend/web/components/pages/onboarding/hooks/bootstrapOnboarding.ts">
<violation number="1" location="frontend/web/components/pages/onboarding/hooks/bootstrapOnboarding.ts:149">
P2: If Development creation fails after Production succeeds, `Promise.all` rejects but leaves Production behind. Reload retries against that project, and `ensureEnvironments` falls back to its first environment, so the SDK sample receives a Production key; make recovery guarantee Development before returning an environment.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
| .unwrap() | ||
| return project | ||
| API.trackEvent(Constants.events.CREATE_FIRST_PROJECT) | ||
| const [environment, , tag] = await Promise.all([ |
There was a problem hiding this comment.
P2: If Development creation fails after Production succeeds, Promise.all rejects but leaves Production behind. Reload retries against that project, and ensureEnvironments falls back to its first environment, so the SDK sample receives a Production key; make recovery guarantee Development before returning an environment.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At frontend/web/components/pages/onboarding/hooks/bootstrapOnboarding.ts, line 149:
<comment>If Development creation fails after Production succeeds, `Promise.all` rejects but leaves Production behind. Reload retries against that project, and `ensureEnvironments` falls back to its first environment, so the SDK sample receives a Production key; make recovery guarantee Development before returning an environment.</comment>
<file context>
@@ -69,47 +70,94 @@ async function ensureOrganisation(
.unwrap()
- return project
+ API.trackEvent(Constants.events.CREATE_FIRST_PROJECT)
+ const [environment, , tag] = await Promise.all([
+ createEnvironment(store, project.id, DEV_ENVIRONMENT_NAME),
+ createEnvironment(store, project.id, PROD_ENVIRONMENT_NAME),
</file context>
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #24092 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
🗂️ Previous results✅ private-cloud · depot-ubuntu-latest-16 — run #24092 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
✅ oss · depot-ubuntu-latest-arm-16 — run #24092 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-16 — run #24092 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
|
Visual Regression31 screenshots compared. See report for details. |
docs/if required so people know about the feature.Changes
The onboarding demo setup ran 14 API calls one after another. On staging that took 7.3s for a new sign-up (prod median is over 6s, worst case 49s).
For a new organisation,
bootstrapOnboardingnow:The flag still waits for both environments, so neither environment can miss the flag's state. Users who already have a project take the same path as before.
On staging: 14 steps down to 5, 7.3s down to 3.4s.
How did you test this code?
single_pagevariant: