-
Notifications
You must be signed in to change notification settings - Fork 369
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
Fix id conversion issue in delayed_sidekiq strategy #964
Conversation
9f52020
to
79c3e8e
Compare
@toptal-anvil hi, is there anything I'm missing to get this PR reviewed? |
The provided command
|
@toptal-anvil ping reviewers |
Anvil could not notify anyone, because there are no requested reviews for #964 |
Hello @sundus-y 👋 🙂 , Thank you for your PR. We'll review it and get back to you. |
create_locations_table | ||
create_comments_table | ||
create_users_table | ||
end |
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.
could elaborate why this is needed? Simply outdated?
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.
I needed a new table with uuid
to test my changes so I created the users
table. Then having every table creation inside a single block casued Rubocop Metrics/BlockLength
error. To fix it I moved each table creation to an individual method.
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.
you could simply disable rubocop rule, but thanks for slight refactoring 👍
hey @sundus-y thanks for you PR! |
Ensure ids extracted from Redis remain strings, preventing UUID issues. Previously, ids were being converted to integers, causing problems with UUIDs in the `delayed_sidekiq` strategy. This update also enhances the test suite: - Existing tests are updated. - A new test ensures the issue is resolved. Due to SQLite's lack of UUID support, a `stub_uuid_model` method is added. This method stubs models with UUIDs, using `SecureRandom.uuid` for the primary key. Move table creations to individual methods. Having every table creation inside a single block casued Rubocop `Metrics/BlockLength` error. To fix it I moved each table creation to an individual method.
79c3e8e
to
1adf3bc
Compare
Thanks! |
Ensure ids extracted from Redis remain strings, preventing UUID issues. Previously, ids were being converted to integers, causing problems with UUIDs in the
delayed_sidekiq
strategy.This update also enhances the test suite:
Due to SQLite's lack of UUID support, a
stub_uuid_model
method is added. This method stubs models with UUIDs, usingSecureRandom.uuid
for the primary key.Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).