Repository navigation
Conversation
0cd7820 to
a37d4df
Compare
This brings the code from our secondary Ruby Git repo into the main one: https://github.com/riverqueue/riverqueue-ruby I've had Codex do a pass to bring it into line with CI, testing, and tooling conventions established by Ruby and TypeScript, then also check that we're in maximum compliance with the conformance test suite. The idea with this one is that after pulling Ruby in here we'll archive the original.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
| - Expanded checks against Go-generated conformance fixtures to cover cron schedules, snooze counters, all shared metadata keys, and queue-control and leadership notification emission through both SQL drivers. | ||
| - Added `CRON_TZ=` / `TZ=` prefixes, `?` wildcards, and Go-style `@every` durations to `PeriodicCron`. | ||
|
|
||
| ### Fixed | ||
|
|
||
| - Snoozing tolerates nonnumeric metadata counters and follows Go's JSON integer conversion instead of failing on booleans or collections. | ||
| - Periodic jobs now carry `periodic: true` and, when named, `river:periodic_job_id`, while preserving constructor options and application metadata. | ||
| - Queue pause, resume, metadata changes, and leader resignation now broadcast notifications for clients in other languages. Notifications commit and roll back with the corresponding database change. | ||
| - Cron schedules include both occurrences of repeated daylight-saving times when given a local reference time. |
There was a problem hiding this comment.
I'm seeing that these new entries are all missing PR numbers.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 35ca222faa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| max_attempts: insert_opts.max_attempts || args_insert_opts.max_attempts || MAX_ATTEMPTS_DEFAULT, | ||
| metadata: (args_insert_opts.metadata || {}).merge(insert_opts.metadata || {}), | ||
| priority: insert_opts.priority || args_insert_opts.priority || PRIORITY_DEFAULT, | ||
| queue: (insert_opts.queue || args_insert_opts.queue || QUEUE_DEFAULT).to_s, |
There was a problem hiding this comment.
Validate queue names before inserting jobs
When an insertion supplies a queue such as "billing queue", this line persists it because the database schema only enforces queue length. The same name is rejected by Config and queue_add via QUEUE_NAME_REGEX, so no Ruby worker can configure that queue and the successfully inserted job is stranded. Apply the configured-queue name validation to insertion queues before calling the driver.
Useful? React with 👍 / 👎.
| if unique_opts.by_period && unique_opts.by_period != 0 | ||
| lower_period_bound = truncate_time(insert_params.scheduled_at || @time_now_utc.call, unique_opts.by_period).utc | ||
|
|
||
| unique_key += "&period=#{lower_period_bound.strftime("%FT%TZ")}" |
There was a problem hiding this comment.
Reject unique periods shorter than one second
Any nonzero by_period reaches this calculation without validation, so values such as 0.5 are accepted even though the resulting boundary is formatted only to whole seconds and distinct sub-second periods therefore generate the same uniqueness key. Negative periods are accepted as well, while the Go client explicitly rejects every nonzero period below one second in insert_opts.go. Reject these values before generating the key to preserve the advertised cross-language uniqueness semantics.
Useful? React with 👍 / 👎.
This brings the code from our secondary Ruby Git repo into the main one:
https://github.com/riverqueue/riverqueue-ruby
I've had Codex do a pass to bring it into line with CI, testing, and
tooling conventions established by Ruby and TypeScript, then also check
that we're in maximum compliance with the conformance test suite.
The idea with this one is that after pulling Ruby in here we'll archive the
original.