Skip to content

chore(@trpc/upgrade): flaky test improvement - #6783

Merged
KATT merged 1 commit into
mainfrom
05-26-fix-flake
May 26, 2025
Merged

KATT merged 1 commit into
mainfrom
05-26-fix-flake

Conversation

@KATT

@KATT KATT commented May 26, 2025 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Chores
    • Updated test configuration to automatically retry failed tests up to 10 times, improving test reliability.

@KATT
KATT requested a review from a team as a code owner May 26, 2025 11:58
@coderabbitai

coderabbitai Bot commented May 26, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

The Vitest configuration file was updated to add a retry property set to 10 under the test settings, enabling each test to automatically retry up to ten times upon failure. No other properties or logic were changed in the configuration.

Changes

File Change Summary
packages/upgrade/vitest.config.ts Added retry: 10 to the test configuration object.

Poem

In the warren of tests, some bunnies may fall,
But now with retries, they’ll bounce back tall.
Ten leaps for each test, no need to despair,
Flaky failures bewareβ€”robustness is in the air!
πŸ‡βœ¨

✨ Finishing Touches
  • πŸ“ Generate Docstrings

πŸͺ§ Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@vercel

vercel Bot commented May 26, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
www βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback May 26, 2025 11:59am

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/upgrade/vitest.config.ts (1)

8-8: Consider reducing the retry count and addressing flakiness systematically.

The retry configuration is correctly implemented and aligns with the PR objective of improving flaky test handling. However, a retry count of 10 is quite high compared to typical values (3-5).

While retries are a valid short-term solution for flaky tests, consider:

  • Reducing the retry count to 3-5 to avoid masking real issues
  • Investigating and fixing the root causes of flakiness when possible
  • Using test isolation, better mocking, or increased timeouts for timing-sensitive tests
πŸ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 66f375a and 2c7b295.

πŸ“’ Files selected for processing (1)
  • packages/upgrade/vitest.config.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Lint and auto-fix
  • GitHub Check: test
  • GitHub Check: Analyze (typescript)

@railway-app
railway-app Bot temporarily deployed to trpc-pr-6783 May 26, 2025 12:00 Destroyed
@railway-app
railway-app Bot temporarily deployed to trpc-pr-6783 May 26, 2025 12:00 Destroyed
@railway-app

railway-app Bot commented May 26, 2025 •

Copy link
Copy Markdown

πŸš… Deployed to the trpc-pr-6783 environment in trpc-sse-and-websockets

Service Status Web Updated (UTC)
next-sse-chat ◻️ Removed (View Logs) Web May 26, 2025 at 1:12 pm
next-prisma-websockets-starter ◻️ Removed (View Logs) May 26, 2025 at 1:12 pm

@pkg-pr-new

pkg-pr-new Bot commented May 26, 2025

Copy link
Copy Markdown

Open in StackBlitz

@trpc/client

npm i https://pkg.pr.new/trpc/trpc/@trpc/client@6783

@trpc/next

npm i https://pkg.pr.new/trpc/trpc/@trpc/next@6783

@trpc/server

npm i https://pkg.pr.new/trpc/trpc/@trpc/server@6783

@trpc/react-query

npm i https://pkg.pr.new/trpc/trpc/@trpc/react-query@6783

@trpc/upgrade

npm i https://pkg.pr.new/trpc/trpc/@trpc/upgrade@6783

@trpc/tanstack-react-query

npm i https://pkg.pr.new/trpc/trpc/@trpc/tanstack-react-query@6783

commit: 2c7b295

@KATT
KATT enabled auto-merge (squash) May 26, 2025 13:12
@KATT
KATT disabled auto-merge May 26, 2025 13:12
@KATT
KATT merged commit 69b53b1 into main May 26, 2025
@KATT
KATT deleted the 05-26-fix-flake branch May 26, 2025 13:12
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been locked because we are very unlikely to see comments on closed issues. If you think, this PR is still necessary, create a new one with the same branch. Thank you.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 27, 2025

This branch was successfully deployed

5 active deployments
trpc-pr-6783 β€” 2c7b2952 Deployed May 26, 2025 by railway-app[bot]
Preview – www β€” 2c7b2952 Deployed May 26, 2025 by vercel[bot]
Preview – examples-todomvc β€” 2c7b2952 Deployed May 26, 2025 by vercel[bot]
Preview – og-image β€” 2c7b2952 Deployed May 26, 2025 by vercel[bot]
Preview – next-prisma-starter β€” 2c7b2952 Deployed May 26, 2025 by vercel[bot]
Preview – trpc-next-app-dir β€” 2c7b2952 Deployed May 26, 2025 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants