-
-
Notifications
You must be signed in to change notification settings - Fork 728
Fix for missing logs when triggering without a trigger-version
#1331
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
Conversation
|
Warning Rate limit exceeded@ericallam has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 55 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe changes involve minor formatting adjustments and enhancements to trace context handling in the application. A space was removed in the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Worker
participant API
participant Service
Client->>API: Send request with traceparent
API->>Service: Call service with traceContext
Service-->>API: Return response
Worker->>API: Send request with x-trigger-worker header
API->>Service: Call service with traceContext
Service-->>API: Return response
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
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 (
|
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: 0
Outside diff range and nitpick comments (1)
apps/webapp/app/routes/api.v1.tasks.$taskId.batch.ts (1)
42-42
: Approve the addition of the"x-trigger-worker"
header.The addition of the
"x-trigger-worker"
header allows for more flexible handling of trace context based on the request origin.Consider adding validation or type-checking for the
isFromWorker
value to ensure it is a boolean and to prevent unexpected behavior if an invalid value is passed.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.runs.$runParam/route.tsx (0 hunks)
- apps/webapp/app/routes/api.v1.tasks.$taskId.batch.ts (2 hunks)
- apps/webapp/app/routes/api.v1.tasks.$taskId.trigger.ts (1 hunks)
Files not reviewed due to no reviewable changes (1)
- apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.runs.$runParam/route.tsx
Additional comments not posted (2)
apps/webapp/app/routes/api.v1.tasks.$taskId.batch.ts (1)
90-93
: Approve the updated logic for constructing thetraceContext
object.The updated logic ensures that if the request is from a worker, the trace context is still passed appropriately, enhancing the robustness of traceability in the service call. The use of the nullish coalescing operator and the ternary operator improves the readability and conciseness of the code.
apps/webapp/app/routes/api.v1.tasks.$taskId.trigger.ts (1)
82-85
: LGTM! The changes simplify the logic for settingtraceContext
.The removal of the
triggerVersion
check and the use of the nullish coalescing operator (??
) streamline the control flow and reduce the complexity of the conditional logic. This ensures thattraceContext
is set appropriately based on the presence oftraceparent
orisFromWorker
, regardless of thetriggerVersion
value.The changes improve the readability and maintainability of the code while preserving the intended functionality.
commit: |
f52c177
to
8775518
Compare
When trigger a run (or batch) without
trigger-version
(i.e. using HTTP POST directly) we wouldn't show any logs for a run.Summary by CodeRabbit
Bug Fixes
Style
NoLogsView
component for cleaner formatting.