-
Notifications
You must be signed in to change notification settings - Fork 94
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
Allow by period uniqueness to be based off scheduled time #734
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This one attempts to resolve #715. Currently, by period uniqueness always bases the period off the current time, but there's a good argument that if the job has been scheduled for a particular time in the future, it should be based off that time instead. This is one that could nominally be considered a small breaking change in a Hyrum's Law sort of way, even though it's really patching what could be considered a bug. Even though it was sort of broken before, some apps may have come to depend on the broken behavior of the unique code ignoring `ScheduledAt`. I'm not sure that it's a big enough problem to be worth calling out though, so I didn't. Fixes #715.
brandur
force-pushed
the
brandur-base-unique-off-scheduled-time
branch
from
January 25, 2025 19:48
b5e67e3
to
a672ad3
Compare
bgentry
approved these changes
Jan 25, 2025
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.
Looks good, I agree with your analysis and think it's unlikely to impact anybody in a negative way. This is probably something we'll want to pull over to the Ruby + Python libs too, right?
Thanks. Yes on Ruby and Python. I'll take a crack at those. |
brandur
added a commit
to riverqueue/riverqueue-ruby
that referenced
this pull request
Jan 25, 2025
This one follows up [1] in the main repository, in which we fix what could be considered a bug in that by period uniqueness was always based off the current time, even though a job may have been given a custom value for `scheduled_at`, which really should take precedence. [1] riverqueue/river#734
brandur
added a commit
to riverqueue/riverqueue-ruby
that referenced
this pull request
Jan 25, 2025
This one follows up [1] in the main repository, in which we fix what could be considered a bug in that by period uniqueness was always based off the current time, even though a job may have been given a custom value for `scheduled_at`, which really should take precedence. [1] riverqueue/river#734
brandur
added a commit
to riverqueue/riverqueue-ruby
that referenced
this pull request
Jan 25, 2025
This one follows up [1] in the main repository, in which we fix what could be considered a bug in that by period uniqueness was always based off the current time, even though a job may have been given a custom value for `scheduled_at`, which really should take precedence. [1] riverqueue/river#734
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This one attempts to resolve #715. Currently, by period uniqueness
always bases the period off the current time, but there's a good
argument that if the job has been scheduled for a particular time in the
future, it should be based off that time instead.
This is one that could nominally be considered a small breaking change
in a Hyrum's Law sort of way, even though it's really patching what
could be considered a bug. Even though it was sort of broken before,
some apps may have come to depend on the broken behavior of the unique
code ignoring
ScheduledAt
. I'm not sure that it's a big enough problemto be worth calling out though, so I didn't.
Fixes #715.