Codestream: Gitlab open merge request error field 'approvalsRequired'

Created on 7 Apr 2021  ·  10Comments  ·  Source: TeamCodeStream/codestream

Plugin use in Jetbrains products
By clicking on the names of the mr, a message is displayed

Error Loading Pull Request:
Field 'approvalsRequired' doesn't exist on type 'MergeRequest': {"response":{"errors":[{"message":"Field 'approvalsRequired' doesn't exist on type 'MergeRequest'","locations":[{"line":23,"column":7}],"path":["query GetPullRequest","project","mergeRequest","approvalsRequired"],"extensions":{"code":"undefinedField","typeName":"MergeRequest","fieldName":"approvalsRequired"}},{"message":"Field 'approvalsLeft' doesn't exist on type 'MergeRequest'","locations":[{"line":24,"column":7}],"path":["query GetPullRequest","project","mergeRequest","approvalsLeft"],"extensions":{"code":"undefinedField","typeName":"MergeRequest","fieldName":"approvalsLeft"}}],"status":200},"request":{"query":"query GetPullRequest($fullPath: ID!, $iid: String!, $after: String) { currentUser { name login: username avatarUrl id } project(fullPath: $fullPath) { name mergeRequestsEnabled mergeRequestsFfOnlyEnabled removeSourceBranchAfterMerge mergeRequest(iid: $iid) { approvedBy(first: 50) { nodes { avatarUrl name login: username } } id iid approvalsRequired approvalsLeft createdAt sourceBranch targetBranch title description webUrl state mergedAt workInProgress reference projectId mergeWhenPipelineSucceeds mergeableDiscussionsState author { name login: username avatarUrl } diffRefs { baseSha headSha startSha } commitCount project { name webUrl fullPath } sourceProject { name webUrl fullPath } upvotes downvotes milestone { title id webPath dueDate } subscribed userDiscussionsCount discussionLocked forceRemoveSourceBranch reviewers { nodes { id name login: username avatarUrl } } timeEstimate totalTimeSpent updatedAt userPermissions { adminMergeRequest canMerge } discussions(first: 50, after: $after) { pageInfo { endCursor hasNextPage } nodes { ...discussionFragment } } } }}fragment discussionFragment on Discussion { createdAt id notes { nodes { author { name login: username avatarUrl } body bodyHtml createdAt discussion { id replyId createdAt } id position { x y newLine newPath oldLine oldPath filePath diffRefs { baseSha headSha startSha } } project { name } resolvable resolved resolvedAt resolvedBy { login: username avatarUrl } system systemNoteIconName updatedAt userPermissions { adminNote readNote resolveNote awardEmoji createNote } } } replyId resolvable resolved resolvedAt resolvedBy { login: username avatarUrl }}"}}

Most helpful comment

@deadpony @bupyc9 @belfortmaycon @vlad-artyomov - v11.0.2 is now available in the JetBrains marketplace.

All 10 comments

hi @bupyc9

Can you post what version of GitLab you're on and what version of the CodeStream extension you're using? Thanks.

hi @bcanzanella
Gitlab - 13.10
CodeStream - 11.0.0+3936

hi @bcanzanella
Gitlab - 13.10
CodeStream - 11.0.0+3936

Thanks, can I trouble you to go to this endpoint for your GitLab instance (/api/v4/version) and report back the values?

{
"version": "13.10.2",
"revision": "7efd19e3716"
}

Hi! Same problem here with self-hosted Gitlab and VsCode

(/api/v4/version)

{"version":"13.9.3","revision":"ea359c58edb"}

CodeStream:
Version: 11.0.1

VSCode:

Version: 1.55.1
Commit: 08a217c4d27a02a5bcde898fd7981bda5b49391b
Date: 2021-04-07T18:22:52.186Z
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Darwin x64 19.6.0

Hi all!

Same problem with self-hosted GitLab 13.9.4 (4be21b77456) when trying to open any merge-request:

image

@bcanzanella Probably, the problem is that approvalsRequired field is not available in free CE GitLab. According to the GitLab documentation required approvals is the premium-only feature.

Thanks for the heads up @vlad-artyomov! We should have a fix for this release on Monday. I'll update everyone here.

any updates on this?

@deadpony - This has been fixed in v11.0.2 of our extension for JetBrains. It has to go through the JetBrains approval process, which usually takes 24 hours, so it could happen at any time now. But if you don't want to wait you can download it here:

https://www.dropbox.com/s/plb8e4pohe3p3oq/codestream-jb-jcef-11.0.2%2B140.zip?dl=0

Thanks for your patience!

@deadpony @bupyc9 @belfortmaycon @vlad-artyomov - v11.0.2 is now available in the JetBrains marketplace.

Was this page helpful?
0 / 5 - 0 ratings