octokit.net icon indicating copy to clipboard operation
octokit.net copied to clipboard

GitHub IDs have exceeded Int32.MaxValue; Octokit uses int

Open SeanKilleen opened this issue 2 years ago • 8 comments

Spotted in this tweet from @patriksvensson: https://twitter.com/firstdrafthell/status/1429738272574558210?s=19

I'll look into this ASAP but don't mind anyone else doing the same.

SeanKilleen avatar Aug 23 '21 10:08 SeanKilleen

An example PR where we've had to fix this in the past: https://github.com/octokit/octokit.net/pull/1703

Happy to push out a release asap about it if you have a fix.

shiftkey avatar Aug 23 '21 12:08 shiftkey

@patriksvensson got a sample script that helps us to know where it's overflowing?

shiftkey avatar Aug 23 '21 12:08 shiftkey

For those following along, I am using the following regex search in VS to attempt to find int Ids and knocking them out:

int [^=]*Id

SeanKilleen avatar Aug 23 '21 12:08 SeanKilleen

@shiftkey I'm not quite sure how the songs are chosen for releases, but this one seems like "For the Long-est Time" would be appropriate.

SeanKilleen avatar Aug 23 '21 12:08 SeanKilleen

Release titles are chosen mostly at random. I endorse this name for the one that fixes this.

shiftkey avatar Aug 23 '21 12:08 shiftkey

@shiftkey I don't have a sample script, but encountered this when retrieving notifications.

patriksvensson avatar Aug 23 '21 12:08 patriksvensson

@patriksvensson question as I go through this:

You mention that you were having issues when retrieving notifications. It looks like, in a strange turn of events, the API is actually returning the notification ID as a string (and Octokit .NET is complying with that). Thread IDs are integers, but Octokit is currently compliant with that as well.

Are you by any chance casting it to an integer on your end?

The rest of this is still worth addressing, but I wanted to point out that it may not resolve your particular issue.

SeanKilleen avatar Aug 23 '21 16:08 SeanKilleen

Is there any progress on resolving this? #2352 appears stalled, but, sadly, this is stymieing any use of octokit.net for handling workflow_job events, because the id field therein is expressed as a JSON number, not a string, and they are far above 2**32 at this point.

nwf avatar Jan 17 '22 12:01 nwf

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

github-actions[bot] avatar Jul 24 '23 01:07 github-actions[bot]