Skip to content
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

Reduce page size to improve stability and enhance error log #39

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

unidevel
Copy link
Contributor

@unidevel unidevel commented Jan 29, 2025

Fix the issue #37

Before PR applied

java.lang.RuntimeException: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.util.LinkedHashMap` out of START_ARRAY token
 at [Source: (String)"{"data":{"createPullRequest":{"pullRequest":null}},"errors":[{"type":"UNPROCESSABLE","path":["createPullRequest"],"locations":[{"line":2,"column":5}],"message":"A pull request already exists for unidevel:dev."}]}"; line: 1, column: 61] (through reference chain: java.util.LinkedHashMap["errors"])
        at com.facebook.presto.release.git.GithubGraphQlAction.githubApi(GithubGraphQlAction.java:199)
        at com.facebook.presto.release.git.GithubGraphQlAction.createPullRequest(GithubGraphQlAction.java:176)
        at com.facebook.presto.release.tasks.GenerateReleaseNotesTask.run(GenerateReleaseNotesTask.java:112)
        at com.facebook.presto.release.tasks.AbstractReleaseCommand.run(AbstractReleaseCommand.java:50)
        at com.facebook.presto.release.PrestoReleaseService.main(PrestoReleaseService.java:38)
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.util.LinkedHashMap` out of START_ARRAY token
 at [Source: (String)"{"data":{"createPullRequest":{"pullRequest":null}},"errors":[{"type":"UNPROCESSABLE","path":["createPullRequest"],"locations":[{"line":2,"column":5}],"message":"A pull request already exists for unidevel:dev."}]}"; line: 1, column: 61] (through reference chain: java.util.LinkedHashMap["errors"])
        at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:63)
        at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1343)
        at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1139)
        at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1093)
        at com.fasterxml.jackson.databind.deser.std.StdDeserializer._deserializeFromEmpty(StdDeserializer.java:600)
        at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:360)
        at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:29)
        at com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBindStringKeyMap(MapDeserializer.java:527)
        at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:364)
        at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:29)
        at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4013)
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3023)
        at com.facebook.presto.release.git.GithubGraphQlAction.githubApi(GithubGraphQlAction.java:196)
        ... 4 more

After PR applied, the GraphQL error can be more clear

2025-01-29T15:41:07.064Z        ERROR   main    Bootstrap       Uncaught exception in thread main
java.lang.RuntimeException: GraphQL error: [{type=UNPROCESSABLE, path=[createPullRequest], locations=[{line=2, column=5}], message=Head sha can't be blank, Base sha can't be blank, No commits between prestodb:master and unidevel:dev, Head ref must be a branch}]
        at com.facebook.presto.release.git.GithubGraphQlAction.githubApi(GithubGraphQlAction.java:205)
        at com.facebook.presto.release.git.GithubGraphQlAction.createPullRequest(GithubGraphQlAction.java:177)
        at com.facebook.presto.release.tasks.GenerateReleaseNotesTask.run(GenerateReleaseNotesTask.java:112)
        at com.facebook.presto.release.tasks.AbstractReleaseCommand.run(AbstractReleaseCommand.java:50)
        at com.facebook.presto.release.PrestoReleaseService.main(PrestoReleaseService.java:38)

@unidevel unidevel requested review from a team as code owners January 29, 2025 16:04
@unidevel unidevel changed the title Reduce page size to improve tool stability and enhance error log Reduce page size to improve stability and enhance error log Jan 29, 2025
@ethanyzhang ethanyzhang merged commit 27cd127 into prestodb:master Jan 31, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants