-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
8.0.1 Time on locks & changelog UI is incorrect/wrong #761
Comments
It looks like the result of digests[1].map in Digests#page has changed because the underlying values are stored/returned differently and that is causing the multiple rows to be returned - the 'blank' is just the time for the lock def page(cursor: 0, pattern: SCAN_PATTERN, page_size: 100)
redis do |conn|
total_size, digests = conn.multi do |pipeline|
pipeline.zcard(key)
pipeline.zscan(key, cursor, match: pattern, count: page_size)
end
puts "\n\ndigests: #{digests[1].inspect}\n\n"
# NOTE: When debugging, check the last item in the returned array.
[
total_size.to_i,
digests[0].to_i, # next_cursor
digests[1].map { |digest, score| Lock.new(digest, time: score) }, # entries
]
end returns
when instead it should be nested more like:
a monkey patch to use activesupport's module SidekiqUniqueJobs
class Digests
def page(cursor: 0, pattern: SCAN_PATTERN, page_size: 100)
redis do |conn|
total_size, digests = conn.multi do |pipeline|
pipeline.zcard(key)
pipeline.zscan(key, cursor, match: pattern, count: page_size)
end
# NOTE: When debugging, check the last item in the returned array.
[
total_size.to_i,
digests[0].to_i, # next_cursor
digests[1].in_groups_of(2).map { |digest, score| Lock.new(digest, time: score) }, # entries
]
end
end
end
end |
Can I close this then @JeremiahChurch? |
@mhenrixon without that monkey patch the locks page is still broken. I'm assuming it should generally be fixed? As-is on 8.0.2 without that patch you'll see with the monkey patch the 'extra' lines are gone If you're alright with active support as a depend I'll pull a PR together if you'd like? |
@JeremiahChurch I don't think the dependency on active_support is needed. |
Great suggestion, I'll have a look at that. |
Describe the bug
took the 8.0.1/sidekiq 7 upgrade to try and resolve some non-releasing-lockd issues.
The locks screen is showing 1970-01-01 values in the 'since' column and the changelogs screen is showing 'bogus' for time. looks like a date integer coercion issue? Also appears to be creating empty lock values? I'm digging through the changes to see if I can find it...
the locks detail screen does show the correct time.
I cleared the locks and changeset (via the methods the UI calls) in case the upgrade from unique-jobs 7.x had problems - issue remains
a dump of a few of the values
SidekiqUniqueJobs::Digests.new.page(cursor:100, pattern: '*', page_size: 25)
Expected behavior
correct dates
Current behavior
incorrect dates and extra locks?
Additional context
sidekiq 7.0.6
sidekiq-unique-jobs 8.0.1
sidekiq-scheduler 5.0.2
The text was updated successfully, but these errors were encountered: