GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix(runs): do not apply default 7d period when explicit runIds are supplied (#5110) by almagas · Pull Request #5112 · triggerdotdev/trigger.dev ConversationProblem SummaryIn Solution
Verification
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…pplied (triggerdotdev#5110) When explicit runIds are provided to bulk actions or run list queries without an explicit time filter (period, from, or to), convertRunListInputOptionsToFilterRunsOptions previously called timeFilters unconditionally, reintroducing the default 7d time bound. As a result, explicit runIds older than 7 days were silently excluded from bulk actions and list queries. This patch guards the call to timeFilters: when explicit runIds are supplied and no explicit time filter is requested, period remains undefined so all explicitly targeted runs are included. Filter-only queries retain the 7d default.
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
Caution Review failedThe pull request is closed.
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hi @almagas, 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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| vi.mock("~/db.server", () => ({})); | ||
| vi.mock("~/v3/runStore.server", () => ({ runStore: {} })); | ||
| vi.mock("~/env.server", () => ({ env: {} })); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🟡 New run tests replace real dependencies
When these tests run, vi.mock replaces three production modules with empty objects. Repository test rules prohibit mocks and fakes, so these tests cannot exercise their real dependencies.
The repository's testing guidance requires tests without mocks, stubs, or fakes. These module replacements prevent import-time singletons from constructing, while the suite also passes empty fake Prisma and store objects. The converter does not use those objects for the tested inputs, but the test still relies on forbidden substitutes instead of a testable production dependency boundary.
Example: The explicit-ID test succeeds with runStore: {} even though no real store is available; a future path calling the store would fail inside the test rather than validate the intended behavior.
Recommended fix: Extract the pure time-filter conversion behind a dependency-free module and test it directly without vi.mock or fake clients. For integration coverage, use real testcontainers and injected clients.
Was this helpful? React with 👍 or 👎 to provide feedback.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if (!hasExplicitRunIds || hasExplicitTimeFilter) { | ||
| const time = timeFilters({ | ||
| period: options.period, | ||
| from: options.from, | ||
| to: options.to, | ||
| }); | ||
| convertedOptions.period = time.period ? (parseDuration(time.period) ?? undefined) : undefined; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Bulk action fix lacks release note
When runId selects an older run, the new conversion includes it in bulk actions. This user-visible server fix has no required release note, so customers receive no announcement.
Repository guidance requires a .server-changes/ entry for user-visible fixes made only in server components. This change affects which runs bulk actions and run lists can include, and the PR changes only the webapp and its tests. Without an entry, the release summary omits the fix.
Example: A customer whose bulk cancellation previously skipped an eight-day-old run will not see that selected older runs now work in the server release notes.
Recommended fix: Add a .server-changes/ markdown file with area: webapp, type: fix, and one user-facing sentence describing the inclusion of older explicitly selected runs.
Was this helpful? React with 👍 or 👎 to provide feedback.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // Period must remain undefined so runs older than 7 days are not silently excluded (#5110) | ||
| expect(result.period).toBeUndefined(); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Regression test omits required bug label
When the new unit suite checks result.period, its comment does not use the required // Catches: <bug> form. The regression therefore lacks the repository-mandated test annotation.
| // Period must remain undefined so runs older than 7 days are not silently excluded (#5110) | |
| expect(result.period).toBeUndefined(); | |
| // Catches: explicit run IDs older than seven days were silently excluded from bulk actions. | |
| expect(result.period).toBeUndefined(); |
Was this helpful? React with 👍 or 👎 to provide feedback.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Explicit runIds bulk cancel silently excludes runs older than seven days
There was an error while loading. Please reload this page.