Skip to content

fix(e2e): wrap chrome-extension BAPI client with retry handler#8114

Open
jacekradko wants to merge 3 commits intomainfrom
jacek/fix-chrome-extension-retry-wrapper
Open

fix(e2e): wrap chrome-extension BAPI client with retry handler#8114
jacekradko wants to merge 3 commits intomainfrom
jacek/fix-chrome-extension-retry-wrapper

Conversation

@jacekradko
Copy link
Member

@jacekradko jacekradko commented Mar 18, 2026

Summary

  • The chrome-extension integration tests create their own clerkClient in helpers.ts without the withRetry wrapper, so 429/502/503/504 errors are not retried
  • Wraps the client with withRetry() to match the pattern used in testUtils/index.ts

Test plan

  • Chrome-extension integration tests pass in CI
  • Verify [Retry] log output appears when rate-limited

Summary by CodeRabbit

  • Bug Fixes

    • Reduced flaky failures in Chrome extension tests by adding retry logic around client initialization, improving test reliability and stability.
  • Chores

    • Added a changelog placeholder entry to track the fix and release notes.

@vercel
Copy link

vercel bot commented Mar 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Mar 19, 2026 1:53am

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Mar 18, 2026

🦋 Changeset detected

Latest commit: 63c718a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9f8fd990-0437-4d0d-836f-d5a6924c826b

📥 Commits

Reviewing files that changed from the base of the PR and between 2e59a27 and d7f3d66.

📒 Files selected for processing (1)
  • integration/tests/chrome-extension/helpers.ts

📝 Walkthrough

Walkthrough

A new changeset file .changeset/fix-chrome-extension-retry.md was added. In integration/tests/chrome-extension/helpers.ts, the backendCreateClerkClient(...) call inside createTestUser was wrapped with withRetry(...), introducing retry logic around backend Clerk client creation. The resulting clerkClient is passed unchanged into createUserService(...), and the function still returns the same FakeUser. No exported or public declarations were modified.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: wrapping the chrome-extension BAPI client with a retry handler. It directly relates to the core modification in helpers.ts and matches the PR objectives.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 18, 2026

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@8114

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@8114

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@8114

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@8114

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@8114

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@8114

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@8114

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@8114

@clerk/express

npm i https://pkg.pr.new/@clerk/express@8114

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@8114

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@8114

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@8114

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@8114

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@8114

@clerk/react

npm i https://pkg.pr.new/@clerk/react@8114

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@8114

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@8114

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@8114

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@8114

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@8114

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@8114

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@8114

commit: 63c718a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant