-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[BUG]: Error deserializing issue comments #2927
Comments
|
why don't we change all edit: edit2:
i don't know if this helps anyone, but here it is the exceptions that i am getting while trying the following code:
|
As @DavidBoike said, it seams like the problem (mine at least) is in the property in example of the responses that i'm getting [{
"url": "https://redacted/issues/comments/2148124527",
"html_url": "https://redacted/pull/1#issuecomment-2148124527",
"issue_url": "https://redacted/issues/1",
"id": 2148124527,
"node_id": redacted,
"user": {
"login": redacted,
"id": redacted,
"node_id": redacted,
"avatar_url": redacted,
"gravatar_id": "",
"url": redacted,
"html_url": redacted,
"followers_url": redacted,
"following_url": redacted,
"gists_url": redacted,
"starred_url": redacted,
"subscriptions_url": redacted,
"organizations_url": redacted,
"repos_url": redacted,
"events_url": redacted,
"received_events_url": redacted,
"type": "User",
"site_admin": false
},
"created_at": "2024-06-04T18:12:02Z",
"updated_at": "2024-06-04T18:12:02Z",
"author_association": "OWNER",
"body": "AAAAAAAAAAAAAAAAAAAAA",
"reactions": {
"url": redacted,
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
},
"performed_via_github_app": null
},
...] i'm using the v11.0.1 |
Looking at the response schema for comments on issues, you will see that it lists the type as This is something that should be expressly fixed due to it breaking actions that rely on this library for build processing. |
Workaround for octokit/octokit.net#2927 Fortunately we don't actually need the response for any of these operations.
+1 here, I'm seeing the same thing trying to deserialize. It's the IssueComment's Id, in Octokit/Models/Response/IssueComment.cs#L30, being an int. The GitHub Actions payload has "id": 2152686870 which is > Int32 max or 2147483647. This was the same thing that happened with Issues 4 months ago. @nickfloyd, I'm curious as to how this is getting changed internally without Octokit having an update ready? |
Hey @JimSuplizio, There are a few reasons. While Octokit.net has served the community well over the years, the static nature of it makes it challenging for the small team and community to make sure it's synchronized with the overwhelming number of changes that are being made on a daily basis to GitHub's OpenAPI descriptions. So as a team, we have had to make decisions to maintain this and build for the future through Generative SDKs. These issues experienced here are not present in our .NET Generated SDK - which is regenerated nightly. I'd encourage you to give that next generation of SDK a shot and let us know what you think. The generated SDK (GitHub.Octokit.SDK) already has things like client side rate limiting and apps auth with automatic token refresh - two features that are not currently present in Octokit.net. We'll continue to maintain this SDK but I just wanted to let you know where we are headed. |
I've looked at the .NET Generated SDK but I'm going to be delaying anything until the SDK is out of alpha. Mainly because it would require me to effectively re-code/extensively change my GitHub event processor. |
* #2927: comment id model update to long instead of int * #2927: code review fixes (1) * #2927: code review fixes (2) * #2927: comment id model update to long instead of int: unit tests fix * #2927: code review fixes * Fixed most names of parameters --------- Co-authored-by: Victor Vorobyev <[email protected]> Co-authored-by: Brian C. Arnold <[email protected]>
This is not fully fixed, I'm still seeing issues with some PRs. I think the problem is the InReplyToId of PullRequestComment ( https://github.com/octokit/octokit.net/blob/main/Octokit/Models/Response/PullRequestReviewComment.cs ) which is still an int. |
Hey @joscol looks like you're right, great catch. I'll do another sweep. Apologies for the trouble. |
@nickfloyd was the release of 13.0.1 the result of fixing the issue(s) @joscol mentioned above? |
What happened?
I've begun noticing errors deserializing the comment ID number when receiving issue webhooks. The value appears to be an
int
in the models but it seems GitHub has finally crossed the threshold and needs along
. The log was for a comment created webhook request.Note: This is very similar to bug #2889 fixed in 10.0.0, but on comment IDs rather than issue IDs.
Versions
10.0.0 but bug appears to still be present in the main branch
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: