-
Notifications
You must be signed in to change notification settings - Fork 97
Fix overflowing integer when retrieving comments for FCP #1907
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
Conversation
Mark-Simulacrum
left a comment
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.
Might want to switch to u64 to preempt another round of problems.
485e212 to
b8921a8
Compare
|
Note for myself to investigate before merge: using u64 causes a runtime error when retrieving issues The error happens here and it's due to parsing the JSON that goes into |
|
@apiraino I don't know how changes to |
|
I can consistently reproduce the issue in my tests (which, due to GH 429'ing me, are pretty annoying) |
b8921a8 to
208661d
Compare
208661d to
4279369
Compare
|
Finally I think this should be fixed, now we use I also removed some code that was doing some dance with casts because it's not needed anymore |
|
Who wants to review? :) r? |
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'm not sure how does it help if RFCbot still serializes these fields as i32 (even if it converts them to u32 right before writing them, but that doesn't help if the value is over 2.something billion already on the rfcbot side), but it also hopefully shouldn't hurt, so let's see :)
Seems like in https://rfcbot.rs/api/all, some fk_initiating_comment values are e.g. 2669499833, so clearly they go over i32. Not sure how that's even possible, probably the values are actually represented as negative numbers in rfcbot or something? xD Anyway.
I don't remember exactly the details anymore but some of things you mention were probably also what I was thinking at the time (IIUC your comment): rust-lang/rfcbot-rs#325 Would it make sense to close now rfcbot-rs#325? 🤔 Zulip discussion for the record (so we don't completely forget) |
|
I think that the fundamental issue is still that the IDs are represented as i32 in RFCbot's DB, rather than i64, and that issue is not solved yet. It seems very scary to perform migrations on RFCbot's DB 🥶 But we could try, I guess. |
This is a patch I've been using locally since long, should be the final nail in the coffin to fix the overflowing GH ID issue we started experiencing a while ago.
I'd like to upstream it after some testing.