vscode-pull-request-github icon indicating copy to clipboard operation
vscode-pull-request-github copied to clipboard

GitHub Enterprise GraphQL Schema needs to be considered before querying for new-ish fields

Open kabel opened this issue 3 years ago • 7 comments

Copied from https://github.com/microsoft/vscode/pull/115940#issuecomment-854596119:

I can see the list of PRs but clicking on the dropdown shows nothing.

Extension output is as follows:

[Info] Failed to get pull request review comments: Error: GraphQL error: Field 'path' doesn't exist on type 'PullRequestReviewThread'
GraphQL error: Field 'isOutdated' doesn't exist on type 'PullRequestReviewThread'
[Info] Error: GraphQL error: Field 'viewerViewedState' doesn't exist on type 'PullRequestChangedFile'
[Info] Failed to get pull request review comments: Error: GraphQL error: Field 'path' doesn't exist on type 'PullRequestReviewThread'
GraphQL error: Field 'isOutdated' doesn't exist on type 'PullRequestReviewThread'
[Info] Error: GraphQL error: Field 'viewerViewedState' doesn't exist on type 'PullRequestChangedFile'
[Info] Failed to get pull request review comments: Error: GraphQL error: Field 'path' doesn't exist on type 'PullRequestReviewThread'
GraphQL error: Field 'isOutdated' doesn't exist on type 'PullRequestReviewThread'
[Info] Error: GraphQL error: Field 'viewerViewedState' doesn't exist on type 'PullRequestChangedFile'

Github Authentification Output:

[Info  - 09:22:45.590] Getting user info...
[Info  - 09:22:46.204] Got account info!

Enterprise version is: v2.22.4

@kabel do you know why the above errors are happening? Is GHEP now out of sync with the extension again?

Copied from https://github.com/microsoft/vscode/pull/115940#issuecomment-854604614:

I had similar errors on our GHE instance. Based on the change log, these fields were introduced on 2020-09-23. I guess you have to upgrade the GHE to a version after that.

kabel avatar Jun 11 '21 17:06 kabel

When I have a spare moment, I'll try to see what the effort would be to actually query the schema information at activation to ensure we know exactly what types are available to the GitHub.com and GitHub Enterprise API endpoint.

kabel avatar Jun 11 '21 17:06 kabel

Thanks for looking into this @kabel!

alexr00 avatar Jun 14 '21 09:06 alexr00

Hi, is there any progress on this?

I met the same error here with Git Enterprise

[Info] Failed to get pull request review comments: Error: GraphQL error: Field 'path' doesn't exist on type 'PullRequestReviewThread'
GraphQL error: Field 'isOutdated' doesn't exist on type 'PullRequestReviewThread'
[Info] Failed to get pull request review comments: Error: GraphQL error: Field 'path' doesn't exist on type 'PullRequestReviewThread'
GraphQL error: Field 'isOutdated' doesn't exist on type 'PullRequestReviewThread'
[Info] Failed to get pull request review comments: Error: GraphQL error: Field 'path' doesn't exist on type 'PullRequestReviewThread'
GraphQL error: Field 'isOutdated' doesn't exist on type 'PullRequestReviewThread'
[Info] Failed to get pull request review comments: Error: GraphQL error: Field 'path' doesn't exist on type 'PullRequestReviewThread'
GraphQL error: Field 'isOutdated' doesn't exist on type 'PullRequestReviewThread'
[Info] Review> Error: GraphQL error: Field 'viewerViewedState' doesn't exist on type 'PullRequestChangedFile'
[Info] Failed to get pull request review comments: Error: GraphQL error: Field 'path' doesn't exist on type 'PullRequestReviewThread'
GraphQL error: Field 'isOutdated' doesn't exist on type 'PullRequestReviewThread'
[Info] Failed to get pull request review comments: Error: GraphQL error: Field 'path' doesn't exist on type 'PullRequestReviewThread'
GraphQL error: Field 'isOutdated' doesn't exist on type 'PullRequestReviewThread'
[Info] Review> Error: GraphQL error: Field 'viewerViewedState' doesn't exist on type 'PullRequestChangedFile

jonnyyu avatar Sep 24 '21 08:09 jonnyyu

Hi, same error with GHE. Any plans on this issue?

proof666 avatar Oct 05 '21 18:10 proof666

Hey @kabel Do you know how fixable this is? Sadly there's still many of us stuck on GHE v2

jasonwilliams avatar Nov 26 '21 12:11 jasonwilliams

Sadly, I have not had free time to explore this more and won't have older GHE instances to work with. The recommendation remains to get current with the supported versions.

It's only really feasible if we can decouple the interface features that rely on these object fields. Even that, I have not looked into.

kabel avatar Dec 01 '21 00:12 kabel

@kabel Can you please document which one is the minimum version of GHE compatible with the extension? It is not documented anywhere

AntonioL avatar May 06 '22 15:05 AntonioL

Hi folks, I've tested with GitHub Enterprise version 3.2-3.5 and now I'm going through old issues. Version 3.2 is the oldest supported version from GitHub (https://docs.github.com/en/[email protected]/admin/all-releases), so it's the oldest I've tested with. If you use GitHub Enterprise with this extension, I recommend trying out the pre-release version of the extension for the next couple weeks as there are improvements to Enterprise support there. I will document the current Enterprise support before releasing the next minor version of the extension.

In the mean time, I'm closing this issue as it doesn't occur with 3.2+ of GitHub Enterprise. If you're still seeing this issue, please do comment with your GitHub Enterprise version so I can understand how much demand there is for supporting deprecated versions. If anyone's still hitting this problem I'll reopen the issue.

alexr00 avatar Sep 19 '22 16:09 alexr00