-
-
Notifications
You must be signed in to change notification settings - Fork 757
feat: link the original run from replayed runs #2262
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
base: main
Are you sure you want to change the base?
Conversation
|
WalkthroughThis change introduces a new optional field, 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (10)
🧰 Additional context used📓 Path-based instructions (5)`apps/webapp/**/*.ts`: In the webapp, all environment variables must be accessed through the `env` export of `env.server.ts`, instead of directly accessing `process.env`.
📄 Source: CodeRabbit Inference Engine (.cursor/rules/webapp.mdc) List of files the instruction was applied to:
`apps/webapp/**/*.{ts,tsx}`: When importing from `@trigger.dev/core` in the weba...
📄 Source: CodeRabbit Inference Engine (.cursor/rules/webapp.mdc) List of files the instruction was applied to:
`**/*.{ts,tsx}`: Always prefer using isomorphic code like fetch, ReadableStream,...
📄 Source: CodeRabbit Inference Engine (.github/copilot-instructions.md) List of files the instruction was applied to:
`{packages/core,apps/webapp}/**/*.{ts,tsx}`: We use zod a lot in packages/core and in the webapp
📄 Source: CodeRabbit Inference Engine (.github/copilot-instructions.md) List of files the instruction was applied to:
`**/*.tsx`: When using React hooks for realtime updates, use `@trigger.dev/react-hooks` and provide a Public Access Token via context or props.
📄 Source: CodeRabbit Inference Engine (.cursor/rules/writing-tasks.mdc) List of files the instruction was applied to:
🧠 Learnings (10)📓 Common learnings
apps/webapp/app/v3/services/triggerTaskV1.server.ts (10)
apps/webapp/app/v3/services/triggerTask.server.ts (11)
internal-packages/run-engine/src/engine/types.ts (10)
apps/webapp/app/v3/services/replayTaskRun.server.ts (10)
apps/webapp/app/runEngine/services/triggerTask.server.ts (10)
internal-packages/database/prisma/schema.prisma (1)
apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx (3)
internal-packages/run-engine/src/engine/index.ts (10)
apps/webapp/app/presenters/v3/SpanPresenter.server.ts (1)
🧬 Code Graph Analysis (1)apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx (2)
⏰ 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). (25)
🔇 Additional comments (13)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@@ -644,6 +644,8 @@ model TaskRun { | |||
|
|||
logsDeletedAt DateTime? | |||
|
|||
replayedFromTaskRunFriendlyId 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.
Not happy with this name. Also it's not consistent with the other references to runs, like rootTaskRunId
, parentTaskRunId
, etc., where we store the internal ID as reference. But in this case it is more efficient to store the friendly ID as it avoids having to do a self-join and suffices to generate the link to the replayedFrom
run. Other ideas?
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.
In v4 the friendly IDs are run_<internalId>
. There are helpers to "convert" from one to the other. Will hopefully simplify this 👍
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.
Oh nice, then we can go with this for now and switch to internal IDs once we deprecate v3.
This PR introduces a small improvement in the replay flow, by linking the original run.