Skip to content

fix: OTLP nanosecond timestamp overflow in webapp event repository - #4747

Closed
Roshan931 wants to merge 1 commit into
triggerdotdev:mainfrom
Roshan931:prilog/fix-error-epoch-milliseconds-multiplied-by-1e6-as-08-21-2026-4e4c83
Closed

fix: OTLP nanosecond timestamp overflow in webapp event repository#4747
Roshan931 wants to merge 1 commit into
triggerdotdev:mainfrom
Roshan931:prilog/fix-error-epoch-milliseconds-multiplied-by-1e6-as-08-21-2026-4e4c83

Conversation

@Roshan931

Copy link
Copy Markdown

Fixes #3292

Root cause

Epoch milliseconds multiplied by 1e6 as a JS Number before BigInt conversion

Changes

  • Route all four epoch-ms -> nanosecond conversions through the existing convertDateToNanoseconds() helper, which multiplies in BigInt space, and add a regression test asserting exact nanosecond values.

@changeset-bot

changeset-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 68f813d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

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

Click here to learn what changesets are, and how to add one.

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

@github-actions

Copy link
Copy Markdown
Contributor

Hi @Roshan931, thanks for your interest in contributing!

This project requires that pull request authors are vouched, and you are not in the list of vouched users.

This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details.

@github-actions github-actions Bot closed this Aug 21, 2026
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c00d2543-d4a9-4ebc-a195-a8c207d1f2ce

📥 Commits

Reviewing files that changed from the base of the PR and between d044670 and 68f813d.

📒 Files selected for processing (4)
  • apps/webapp/app/v3/eventRepository/common.server.ts
  • apps/webapp/app/v3/eventRepository/index.server.ts
  • apps/webapp/app/v3/runEngineHandlers.server.ts
  • apps/webapp/test/eventRepositoryNanoseconds.test.ts

Walkthrough

The change centralizes date-to-nanoseconds conversion in event timestamp, duration, and retry-scheduling paths. It replaces inline millisecond-to-nanosecond calculations with convertDateToNanoseconds. New tests verify exact BigInt conversion, controlled current-time conversion, duration calculation, and timer restoration.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

@devin-ai-integration devin-ai-integration 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.

Devin Review found 1 potential issue.

Open in Devin Review

export const EVENT_STORE_TYPES = {
POSTGRES: "postgres",
CLICKHOUSE: "clickhouse",
POSTGRES: "postgres", CLICKHOUSE: "clickhouse",

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.

🟡 Object literal breaks formatter check

The EVENT_STORE_TYPES literal puts POSTGRES and CLICKHOUSE on one line with a double space. oxfmt reformats this, so the code-quality CI check fails on the diff.

Suggested change
POSTGRES: "postgres", CLICKHOUSE: "clickhouse",
POSTGRES: "postgres",
CLICKHOUSE: "clickhouse",
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OTLP nanosecond timestamp overflow in webapp event repository

1 participant