-
-
Notifications
You must be signed in to change notification settings - Fork 938
fix(react): prevent infinite useEffect when passing an array of tags to useRealtimeRunsWithTag #2705
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
fix(react): prevent infinite useEffect when passing an array of tags to useRealtimeRunsWithTag #2705
Conversation
…to useRealtimeRunsWithTag
🦋 Changeset detectedLatest commit: 3f0efbf The changes in this PR will be included in the next version bump. This PR includes changesets to release 25 packages
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 |
WalkthroughThis PR adds a changeset entry and implements a fix for preventing infinite useEffect loops in the Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (30)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlreferences/realtime-hooks-test/.eslintrc.jsonis excluded by!references/**references/realtime-hooks-test/.gitignoreis excluded by!references/**references/realtime-hooks-test/README.mdis excluded by!references/**references/realtime-hooks-test/next.config.tsis excluded by!references/**references/realtime-hooks-test/package.jsonis excluded by!references/**references/realtime-hooks-test/postcss.config.mjsis excluded by!references/**references/realtime-hooks-test/public/.gitkeepis excluded by!references/**references/realtime-hooks-test/src/app/actions.tsis excluded by!references/**references/realtime-hooks-test/src/app/batch/[id]/page.tsxis excluded by!references/**references/realtime-hooks-test/src/app/globals.cssis excluded by!references/**references/realtime-hooks-test/src/app/layout.tsxis excluded by!references/**references/realtime-hooks-test/src/app/page.tsxis excluded by!references/**references/realtime-hooks-test/src/app/run-with-streams/[id]/page.tsxis excluded by!references/**references/realtime-hooks-test/src/app/run/[id]/page.tsxis excluded by!references/**references/realtime-hooks-test/src/app/runs-with-tag/[tag]/page.tsxis excluded by!references/**references/realtime-hooks-test/src/app/stream/[id]/page.tsxis excluded by!references/**references/realtime-hooks-test/src/components/batch-viewer.tsxis excluded by!references/**references/realtime-hooks-test/src/components/run-viewer.tsxis excluded by!references/**references/realtime-hooks-test/src/components/run-with-streams-viewer.tsxis excluded by!references/**references/realtime-hooks-test/src/components/runs-with-tag-viewer.tsxis excluded by!references/**references/realtime-hooks-test/src/components/stream-viewer.tsxis excluded by!references/**references/realtime-hooks-test/src/trigger/batch-task.tsis excluded by!references/**references/realtime-hooks-test/src/trigger/simple-task.tsis excluded by!references/**references/realtime-hooks-test/src/trigger/stream-task.tsis excluded by!references/**references/realtime-hooks-test/src/trigger/streams.tsis excluded by!references/**references/realtime-hooks-test/src/trigger/tagged-task.tsis excluded by!references/**references/realtime-hooks-test/tailwind.config.tsis excluded by!references/**references/realtime-hooks-test/trigger.config.tsis excluded by!references/**references/realtime-hooks-test/tsconfig.jsonis excluded by!references/**
📒 Files selected for processing (2)
.changeset/late-kings-smell.md(1 hunks)packages/react-hooks/src/hooks/useRealtime.ts(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (23)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
- GitHub Check: typecheck / typecheck
- GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
- GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
- GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
.changeset/late-kings-smell.md (1)
1-5: LGTM!The changeset correctly documents this bug fix as a patch release with an accurate description.
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## trigger.dev@4.2.0 ### Minor Changes - feat(cli): upgrade bun deployments to v1.3.3 ([#2756](#2756)) ### Patch Changes - fix(otel): exported logs and spans will now have matching trace IDs ([#2724](#2724)) - The `--force-local-build` flag is now renamed to just `--local-build` ([#2702](#2702)) - fix(cli): header will always print the correct profile ([#2728](#2728)) - feat: add ability to set custom resource properties through trigger.config.ts or via the OTEL_RESOURCE_ATTRIBUTES env var ([#2704](#2704)) - feat(cli): implements content-addressable store for the dev CLI build outputs, reducing disk usage ([#2725](#2725)) - Added support for native build server builds in the deploy command (`--native-build-server`) ([#2702](#2702)) - Updated dependencies: - `@trigger.dev/build@4.2.0` - `@trigger.dev/core@4.2.0` - `@trigger.dev/schema-to-json@4.2.0` ## @trigger.dev/build@4.2.0 ### Patch Changes - syncVercelEnvVars to skip API and read env vars directly from env.process for Vercel build environments. New syncNeonEnvVars build extension for syncing environment variablesfrom Neon database projects to Trigger.dev. The extension automatically detects branches and builds appropriate PostgreSQL connection strings for non-production, non-dev environments (staging, preview). ([#2729](#2729)) - Updated dependencies: - `@trigger.dev/core@4.2.0` ## @trigger.dev/core@4.2.0 ### Patch Changes - fix: prevent ERR_IPC_CHANNEL_CLOSED errors from causing an unhandled exception on TaskRunProcess ([#2743](#2743)) - Added support for native build server builds in the deploy command (`--native-build-server`) ([#2702](#2702)) ## @trigger.dev/python@4.2.0 ### Patch Changes - Updated dependencies: - `@trigger.dev/build@4.2.0` - `@trigger.dev/sdk@4.2.0` - `@trigger.dev/core@4.2.0` ## @trigger.dev/react-hooks@4.2.0 ### Patch Changes - fix: prevent infinite useEffect when passing an array of tags to useRealtimeRunsWithTag ([#2705](#2705)) - Updated dependencies: - `@trigger.dev/core@4.2.0` ## @trigger.dev/redis-worker@4.2.0 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.2.0` ## @trigger.dev/rsc@4.2.0 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.2.0` ## @trigger.dev/schema-to-json@4.2.0 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.2.0` ## @trigger.dev/sdk@4.2.0 ### Patch Changes - fix(sdk): Re-export schemaTask types to prevent the TypeScript error TS2742: The inferred type of 'task' cannot be named without a reference to '@trigger.dev/core/v3'. This is likely not portable. ([#2735](#2735)) - feat: add ability to set custom resource properties through trigger.config.ts or via the OTEL_RESOURCE_ATTRIBUTES env var ([#2704](#2704)) - Updated dependencies: - `@trigger.dev/core@4.2.0` --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
fixes #2629