diff --git "a/5261717.csv" "b/5261717.csv" deleted file mode 100644--- "a/5261717.csv" +++ /dev/null @@ -1,4587 +0,0 @@ -issuekey,created,title,description,storypoints -30087182,2020-01-29 23:19:58.696,Error reporting to VSCode OutputChannel,"### Problem to solve - -In my experience today, there was very little information about what was working or not. The side pane simply stayed blank and did not show anything apart from the default text (""there is no XYZ assigned to you"" etc.). Which makes it very hard to understand at what point something goes wrong or what might be the cause (connection to GitLab? authentication? extension not configured correctly?). - -### Proposal - -Creating and logging to an OutputChannel (see https://code.visualstudio.com/api/references/vscode-api#window.createOutputChannel) instead of logging to console would probably make it easier for the user to understand what is happening (and what not). - -### Further details - -#### In scope - -- bubble exceptions to the top-level client code (e.g. `extension.js`) and then log them to the output channel -- make sure that exceptions are not silenced (by empty try/catch blocks) -- **stretch**: separate exceptions from normal program flow - a lot of code in `git_service.js` and `gitlab_service.js` is using exceptions as a part of normal program flow (e.g. command returning empty result & command throwing exception is treated the same) -- making sure that the OutputChannel is shown during automated integratin tests (it will help understanding what's wrong) - -#### Out of scope - -- - -### Links / references - -- https://code.visualstudio.com/api/references/vscode-api#window.createOutputChannel",3 -26478886,2019-10-30 10:34:50.917,Insert Snippets in to current file in VS Code,"## Problem to Solve - -Snippets inside of a user account must be copy/pasted out of GitLab and into a file when they need to be used in another place. This is error prone and time consuming to context switch and find the appropriate Snippet and then paste the contents in to the file you're working on. - -## Proposal - -Create a command for `Insert Snippet` that talks to the GitLab Snippets API to retrieve a list of Snippets and then choose which file to insert. - -![image](https://gitlab.com/gitlab-org/gitlab-vscode-extension/uploads/30999d43156eb226d562c61c1d314611/Kapture_2020-09-11_at_11.53.01.gif) - -- If a user selects insert snippet from the command palette, display a list of single file project scoped snippets in the modal -- If a user selects a snippet from the list insert it's content to the editor at the cursor position - -*This page may contain information related to upcoming products, features and functionality. -It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. -Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.* -",3 -21291743,2019-05-25 13:57:04.945,"API calls fail when the GitLab instance is on a custom path, but the git remote isn't","## Summary - -The API calls are not working when the `gitlab.instanceUrl` setting contains a custom path, but the `git remote` URL doesn't. - -Example: - -``` -""gitlab.instanceUrl"": ""http://aom-int/gitlab"", -``` - -and `git remote`: - -``` -git@aom-int:depoortere/testmaven.git -``` - -The parsing logic expects that if the `instanceUrl` contains a custom path, the `git remote` will too. From the example above: `http://aom-int/gitlab` `instanceUrl` should have `git@aom-int:gitlab/depoortere/testmaven.git` `git remote`. - -### Details - -The original issue with GitLab on a custom path is this: https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/issues/42 - -And the initial fix was implemented in https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/merge_requests/11. - -[The implementation](https://gitlab.com/gitlab-org/gitlab-vscode-extension/blob/56dab86117c109443a9422b85b58605fa5b774f1/src/git/git_remote_parser.ts#L30) assumes that if your GitLab instance is on a custom path (e.g. `/gitlab`) then the `git remote` URL contains the same path (i.e. in above scenario the remote should be `git@aom-int:gitlab/depoortere/testmaven.git`. I'm not sure whether that's a reasonable assumption or not, but it doesn't hold true in above scenario. - -A workaround might be to use `https://` remote URL instead of the `git@..`. I assume that the `https://` version would have `/gitlab` in the remote path. - -The code for parsing remotes is in [`git_remote_parser.ts`](https://gitlab.com/gitlab-org/gitlab-vscode-extension/blob/56dab86117c109443a9422b85b58605fa5b774f1/src/git/git_remote_parser.ts#L10-38). I'm open to suggestions about how to change it. I also include a failing test with above scenario: - -
-Failing test case - -```diff -diff --git a/src/git/git_remote_parser.test.ts b/src/git/git_remote_parser.test.ts -index 33cba5a..c3c4586 100644 ---- a/src/git/git_remote_parser.test.ts -+++ b/src/git/git_remote_parser.test.ts -@@ -81,4 +81,14 @@ describe('git_remote_parser', () => { - project: 'gitlab-vscode-extension', - }); - }); -+ -+ it('should support host aliases with a custom path', () => { -+ expect( -+ parseGitRemote('git@aom-int:depoortere/testmaven.git', 'https://aom-int/gitlab'), -+ ).toEqual({ -+ host: 'aom-int', -+ namespace: 'depoortere', -+ project: 'testmaven', -+ }); -+ }); - }); -``` - -
- - -
-Original issue description - -Say my GITLAB instance URL is https://xyz.com/gitlab (Exposed via Nginx) - -In this case, the parsing by the extension is done incorrectly and fails to retrieve any information. - -The parsed array gives this (removing /gitlab from the path): - -[""http:"", ""xyz.com"", ""my-group/subgroup1"", ""project""] - -And thus the extension does not work. I tried concatenating the extra ""/gitlab"" and still it does not work. - -Meanwhile, what ports does this extension need/use? I only have https port of my instance exposed - have not exposed the SSH or git port. - -
",1 -16800932,2018-12-19 22:42:26.196,Matching access token URL with GitLab instance URL is too strict," - -### Summary - -The GitLab instance URL configured in `gitlab.instanceUrl` and the URL you specify when adding a new access token needs to match perfectly. If one contains slash at the end, the token is not used. - -
-Original description - -Connection issues with self-hosted GitLab instance URL name. - -e.g. correct connection when `https://my.gitlabinstance.io/group-name/project1` as opposed to `https://my.gitlabinstance.io/group-name/project1/` - -There are no instructions that mention to put it exactly like this... - -
- -### Steps to reproduce - -1. open workspace with project on `gitlab.com` -1. remove your token with `GitLab: Remove your Personal Access Token` command -1. add the same token but specify `https://gitlab.com/` as the instance URL (notice the `/` at the end) -1. now the extension can't authenticate your requests and you see an error - -### What is the current *bug* behavior? - -The extension cant match the token for `https://gitlab.com/` with the configured instance `https://gitlab.com` (without the slash) - -### What is the expected *correct* behavior? - -The extension should be able to recognise that those two URLs are for the same GitLab instance and use the token - -### Relevant logs and/or screenshots - -![Screenshot_2020-07-24_at_1.23.50_PM](/uploads/eacc8e0190ed9b87a0e65104e5cad0d4/Screenshot_2020-07-24_at_1.23.50_PM.png) - -### Possible fixes - -A naive solution would be to remove trialling slashes. A more complete solution could be parsing the URLs and deciding what parts need to match (most likely hostname, and port, maybe protocol).",1 -14680257,2018-10-04 10:53:18.349,"Auto update ""For Current Branch"" tab in sidebar","To improve the current behavior ""For Current Branch"" tab should auto update itself. - -Also refreshing the panels should clear issue and MR cache. Related with this one https://gitlab.com/fatihacet/gitlab-vscode-extension/issues/21 - -## Problem - -Rith now the sidebar with ""For Current Branch"" information needs to be manually refreshed and it will likely show outdated information. - -Additionally, the status bar refreshes every 30s, but at the start of the VS Code, the first refresh happens before the extension can access the git repository and the user always sees roughly 25s of ""initializing status bar"": - -![status bar](https://gitlab.com/gitlab-org/gitlab-vscode-extension/uploads/815e15090c1dc2566e48c75b8bcc1bc0/Screenshot_2021-09-07_at_20.10.54.png) - -## Proposal - -Both the ""For Current Branch"" sidebar panel and the status bar are using the same information (pipeline, MR, and issue). I suggest that they'll get automatically updated together. The update is going to be triggered by the following events: - -- Repository has been initialized (fixes the initial 25s of delay) -- Branch has been changed -- 30 seconds have passed since the last update (only this is now partially implemented)",2 -10763880,2018-05-10 14:47:44.457,Merge requests fail where branch contains a # symbol," -### Summary - -When we call `GitLab: Crete new merge request on current branch` command, branch with `#` doesn't get escaped causing incorrect branch name - -### Steps to reproduce - -1. Create `test-#-hash` branch and push a commit to the remote. -1. Run `GitLab: Crete new merge request on current branch` command - -### What is the current *bug* behavior? - -The branch name appears unescaped in the URL: - -``` -http://127.0.0.1:3000/root/empty-test-2/-/merge_requests/new?merge_request%5Bsource_branch%5D=test-#-hash -``` - -The `#-hash` gets treated as the browser ID fragment. - -### What is the expected *correct* behavior? - -The `#` is encoded and we open the MR with the following URL: - -``` -http://127.0.0.1:3000/root/empty-test-2/-/merge_requests/new?merge_request[source_branch]=test-%23-hash -``` - -### Relevant logs and/or screenshots - -![Screenshot_2020-08-05_at_11.14.34_AM](/uploads/2631da4c7bea6a6e97901e44cd4ff374/Screenshot_2020-08-05_at_11.14.34_AM.png) - -### Possible fixes - -Probably calling `encodeURIComponent(branchName);` is enough to fix the issue.",1 -117140277,2022-10-19 01:39:45.849,Add OAuth support for VSCodium,"When I click the `Connect to GitLab.com with OAuth` button I get a redirect error screen on GitLab's Web UI: - -![image](/uploads/9b062930e8dad00ac522e49fd6c6a30b/image.png) - -This is probably due to it being on VSCodium... so the redirect url includes: `vscodium` instead of `vscode`: - -``` -https://gitlab.com/oauth/authorize?client_id=...&redirect_uri=vscodium%3A%2F%2Fgitlab.gitlab-workflow%2Fauthentication&response_type=code&state=...&scope=api+read_user&code_challenge=...&code_challenge_method=S256 -``` - -we likely need to add it as valid redirects",1 -116769263,2022-10-12 17:23:38.888,Don't log the whole token," - -### Checklist - - - -- [ ] I'm using the latest version of the extension ([see the latest version in the right column of this page](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow)) - - Extension version: _Put your extension version here_ -- [ ] I'm using the latest VS Code version ([find the latest version here](https://github.com/microsoft/vscode/releases)) - - VS Code version: _Put your VS Code version here_ -- [ ] I'm using a supported version of GitLab ([see README for the supported version](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/blob/main/README.md#minimum-supported-version)) - - GitLab version: _Put your GitLab version here, or say ""happens on `gitlab.com`""_ - -### Summary - -When user enables debug logging, we log the whole token in the extension output every time the OAuth token is refreshed (~2h). Ideally we would like not to log the whole access token. - -https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/blob/77a1cbc0f7d85dbab917d8c06203663bbc87b525/src/gitlab/token_exchange_service.ts#L111 - -### Steps to reproduce - - - -### What is the current _bug_ behavior? - - - -### What is the expected _correct_ behavior? - - - -### Relevant logs and/or screenshots - - - -### Possible fixes - -",3 -112169745,2022-07-25 17:22:56.460,Custom Query error with `avatar_url` in Vulnerabilty Reports,"## Problem to Solve - -When using a custom query to look at vulnerability reports, there is an issue with `avatar_url` being expected in the response: - -**Error Message:** -``` -[error]: Cannot read properties of undefined (reading 'avatar_url') - TypeError: Cannot read properties of undefined (reading 'avatar_url') - at /Users/phikai/.vscode-insiders/extensions/gitlab.gitlab-workflow-3.47.2/out/extension.js:298:239 - at Array.map () - at Js.getIssuables (/Users/phikai/.vscode-insiders/extensions/gitlab.gitlab-workflow-3.47.2/out/extension.js:327:3252) - at processTicksAndRejections (node:internal/process/task_queues:96:5) - at async bd.getProjectIssues (/Users/phikai/.vscode-insiders/extensions/gitlab.gitlab-workflow-3.47.2/out/extension.js:344:2214) - at async bd.getChildren (/Users/phikai/.vscode-insiders/extensions/gitlab.gitlab-workflow-3.47.2/out/extension.js:344:2963) - at async v.fetchChildrenNodes (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:106:19736) - at async v.getChildren (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:106:15955) - -``` - -**Custom Query:** -``` -""gitlab.customQueries"": [ - { - ""name"": ""Vulnerability Reports"", - ""type"": ""vulnerabilities"", - ""scope"": ""all"", - ""noItemText"": ""No Vulns."", - ""state"": ""opened"" - } - ] -``` - -This was tested against the `gitlab-org/gitlab` project.",1 -109854568,2022-06-09 13:27:08.070,Update development documentation,"### Problem to solve - -The development documentation hasn't been updated in about a year. We plan to add more team members as maintainers soon. That means we need the development documentation up to date. - -### Proposal - -Review the following documents: - -- [x] CONTRIBUTING.md -- [x] docs/developer/architecture.md -- [x] docs/developer/ci-variables.md -- [x] docs/developer/coding-guidelines.md -- [x] docs/developer/commits.md -- [x] docs/developer/developer-process.md -- [x] docs/developer/maintainer.md -- [x] docs/developer/release-process.md -- [x] docs/developer/security-releases.md -- [x] docs/developer/testing-strategy.md -- [x] docs/developer/writing-tests.md - - -### Links / references",1 -108685441,2022-05-17 13:51:27.785,PAT no longer available after restart," - -### Checklist - - - -- [x] I'm using the latest version of the extension ([see the latest version in the right column of this page](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow)) - - Extension version: v3.44.1 -- [x] I'm using the latest VS Code version ([find the latest version here](https://github.com/microsoft/vscode/releases)) - - VS Code version: 1.67.1 -- [x] I'm using a supported version of GitLab ([see README for the supported version](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/blob/main/README.md#minimum-supported-version)) - - GitLab version: 14.9.1 - -### Summary - -Initial installation of the plugin works well after the PAT and URL are set up. - -After shutdown of VSCode and restart the PAT seems to be unavailable. - -I'm not sure how to debug any further. - -### Steps to reproduce - -1. Start with a linux desktop environment. In this case Archlinux with SwayWM. -2. Launch VSCode, install the plugin, and configure it with a URL and PAT. -3. Observe all works well. -4. Exit VSCode and re-launch. -5. Observe that the extension no longer is authenticated -6. Attempt to provide the URL and a new PAT, but it never succeeds. - -### What is the current _bug_ behavior? - -Plugin no longer works. - -### What is the expected _correct_ behavior? - -1. That the PAT is retained for next launch -2. That the plugin continues to work after re-launch - -### Relevant logs and/or screenshots - -``` -[error]: Account for instance REDACTED and user REDACTED is missing token in secret storage. Try to remove the account and add it again. -``` - -### Possible fixes - -",2 -108130012,2022-05-06 07:58:14.149,MR Review comments are not rendering Markdown,"### Checklist - - - -- [x] I'm using the latest version of the extension ([see the latest version in the right column of this page](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow)) - - Extension version: `3.43.1` -- [x] I'm using the latest VS Code version ([find the latest version here](https://github.com/microsoft/vscode/releases)) - - VS Code version: `1.67.0-insider` -- [x] I'm using a supported version of GitLab ([see README for the supported version](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/blob/main/README.md#minimum-supported-version)) - - GitLab version: ""happens on `gitlab.com`"" - -### Summary - -Markdown in MR comments stopped rendering in the newer version of VS Code - -![gitlab-vscode-extension](/uploads/0096dfa1ad3ae66b41f819f5abb5e238/gitlab-vscode-extension.png) - -GitLab Workflow depended on a ""bug"" in VS Code. VS Code rendered plain text comment body as markdown ([Comment.body rendered as Markdown, even for plain strings · Issue #140967 · microsoft/vscode](https://github.com/microsoft/vscode/issues/140967)). They fixed it in February 2022 and since then we show plain text MR comments. - -### Steps to reproduce - -1. See any MR comment with Markdown syntax. - -### What is the current _bug_ behavior? - -Markdown is shown as plain string. - -### What is the expected _correct_ behavior? - -Markdown should be rendered. - -![_Extension_Development_Host__-_gitlab-vscode-extension-TEST](/uploads/e875bc21fe466c6210a51ff67691e998/_Extension_Development_Host__-_gitlab-vscode-extension-TEST.png) - -### Relevant logs and/or screenshots - - - -### Possible fixes - -Use `vscode.MarkdownString` rather than `string` for the MR body.",1 -107015529,2022-04-22 08:08:31.388,Advanced search is broken + minor errors in issuable search,"### Summary - -The extension has a rudimentary search feature (it shows you input box and then it opens the web search results for you). - -There are 3 commands: - -- `GitLab: Search Project Issues (Supports Filters)` -- `GitLab: Search Project Merge Requests (Supports Filters)` -- `GitLab: Project Advanced Search (Issues, MR's, Commits, Comments...)` - -The advanced project search doesn't work. The remaining searches are sometimes throwing errors (no user-facing defects though). - -### Steps to reproduce - -1. Open GitLab project in VS Code -2. run the `GitLab: Project Advanced Search (Issues, MR's, Commits, Comments...)` -3. type in any query that would normally return results -4. see that the search results are empty - -### What is the current _bug_ behavior? - -The extension creates URL with `project_id=undefined` in it and the search results are empty. - -### What is the expected _correct_ behavior? - -The extension creates correct URL and there are search results. - -### Relevant logs and/or screenshots - -![dependency___Search___GitLab](/uploads/f481536c1f1d678b351622e2f2199ebd/dependency___Search___GitLab.png) - -### Possible fixes - -We use `project.id` in `search_input.js`, we should use `project.restId`. Best solution is to migrate this small file to TS, which would discover such an issue.",1 -106325001,2022-04-08 11:38:31.872,Implement OAuth token refreshing," - -### Problem to solve - -When we generate an access token using the OAuth flow (https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/issues/560), the token will expire (by default in 2 hours). - -### Proposal - -Ask for a new token using the `refresh_token` https://docs.gitlab.com/ee/api/oauth2.html#authorization-code-with-proof-key-for-code-exchange-pkce. - -### Further details - -We'll need to keep track of when the original token has been generated and refresh it when the extension want's to use it after its expiration time. - -### Links / references",2 -106324564,2022-04-08 11:27:06.847,Implement OAuth flow for `gitlab.com`,"### Problem to solve - -Users have to [log in with generated personal access token](https://gitlab.com/gitlab-org/gitlab-vscode-extension#setup). - -### Proposal - -Allow OAuth authorization so user's can log in to `gitlab.com` without generating token. - -### Further details - -https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/issues/221#note_885722819 - -### Links / references",2 -106032596,2022-04-04 13:05:49.059,Project-centric data model - change extension model to reflect Git and GitLab models,"### Problem to solve - -There are many edge cases when the extension's internal state can't reflect how entities (git remotes and GitLab projects) relate to each other. This is caused by the incremental nature of the current model design. - -1. We started with workspace centric approach, where the whole extension operated on an opened folder. This implementation couldn't support multiple repositories. -1. We refactored the extension to use repositories instead of workspaces (https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/issues/345). This was a large improvement, but the model still struggles to reflect some scenarios. It especially struggles with multiple remotes and repositories that don't contain GitLab projects. - -The way how repository-centred approach doesn't exactly reflect the Git repository + GitLab project entities is a cause of small bugs and misunderstandings. Currently, we [mix repository and project-related methods](https://gitlab.com/gitlab-org/gitlab-vscode-extension/blob/d92a0cb3cfa47d5cc7dcf074edd21a6220bb8870/src/git/wrapped_repository.ts#L71). - -### Proposal - -In hindsight, the solution is clear: Use the GitLabProject-centric approach. As the extension starts or configuration changes, we'll loop over all remote URLs in all repositories and find out which ones correspond to GitLab projects. Then, if there's more than one GitLab project per repository, we'll let the user choose which one they want to use. - -### Benefits - -- Simpler logic, many places in the codebase are now concerned about how to obtain GitLabProject from a repository. There is often an implicit expectation that the project is present. -- Simpler mental model - a few entities will reflect the whole application state, clear separation between the GitLab project model and the local repository model -- Easy support for [multiple accounts](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/issues/298), which will become more important once we implement [OAuth login](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/issues/221) - -### Further details - -Here are a few issues that we implemented to work around the repository-centric model: - -- [Helping users set the correct remote name](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/issues/459) -- [Unable to Validate CI config for mirrored repository](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/issues/505) -- [Extension ignores expired token and fails in the wrong place](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/issues/487) - -### Proposed model - -I'll put this in a diagram a bit later: - -```ts - -interface Repository { - remotes: Remote[] - // all local repository git methods will be here -} - -interface Remote { - name: string; - urlEntries: UrlEntry[]; -} - -interface UrlEntry { - type: 'fetch' | 'push' | 'both'; - url: string; -} - -/* This pointer allows us to work with remote URLs (because they represent GitLab Project), - * but also keep track of what local repository contains this remote URL. -*/ -interface RemoteUrlPointer { - repository: Repository; - remote: Remote; - urlEntry: UrlEntry; -} - -interface Account { - instanceUrl: string; - token: string; -} - -/* Represents a GitLab project that we can infer from remote URL and instance URL */ -interface ParsedProject { - remoteUrl: string; - instanceUrl: string; - projectName: string; - namespace: string; -} - -/* In a case when there is more than one GitLab project in a repository, - * the user will create this setting to indicate which project should be used. - * This will be a persistent setting stored in the global storage. - * - * There can be more than one GitLab project for a repository if there are multiple - * remotes like: - * - * - git@gitlab.com:gitlab-org/gitlab-vscode-extension.git - * - git@gitlab.com:gitlab-org/security/gitlab-vscode-extension.git - * - * Or when there are multiple accounts on the same GitLab instance. - */ -interface SelectedProject { - pointer: RemoteUrlPointer; - account: Account; - projectName: string; - namespace: string; -} - -/* This represents a GitLab project that the rest of the extension will work with - * this entity only exists at runtime, and the `GitLabProject` is always populated by querying a GitLab API - */ -interface InitializedProject { - project: GitLabProject; - pointer: RemoteUrlPointer; - account: Account; - // all GitLab project methods are going to be either here or accessed through here -} - -``` - -### Links / references",3 -105059947,2022-03-18 10:01:54.691,Failed to fetch jobs for pipeline (for current branch) - project_id in the requested url is 'undefined',"### Checklist - -- [x] I'm using the latest version of the extension ([see the latest version in the right column of this page](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow)) - - Extension version: v3.41.2 (v3.39.0 also has the same issue) -- [x] I'm using the latest VS Code version ([find the latest version here](https://github.com/microsoft/vscode/releases)) - - VS Code version: 1.65.2 -- [x] I'm using a supported version of GitLab ([see README for the supported version](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/blob/main/README.md#minimum-supported-version)) - - GitLab version: 13.5.4-ee - -### Summary - - - -### Steps to reproduce - -1. Install this extension -2. Setup gitlab.instanceUrl and personal access token -3. Open an VSCode workspace hosted by gitlab 13.5.4-ee -4. Click the gitlab icon in the sidebar, the pipeline result `FORCURRENT BRANCH` does not show fully: it shows the overall status but details are not displayed - -### What is the current _bug_ behavior? - -Can't see details of pipeline (see picture below) - -### What is the expected _correct_ behavior? - -Show details of pipeline correctly - -### Relevant logs and/or screenshots - -Logs from `GitLab: Show extension logs` -``` -[error]: { - ""userMessage"": ""Failed to fetch jobs for pipeline."", - ""errorMessage"": ""Fetching jobs for pipeline from https://gitlab.ourcompany.com/api/v4/projects/undefined/pipelines/397251/jobs failed"", - ""stack"": [ - ""Error: Fetching jobs for pipeline from https://gitlab.ourcompany.com/api/v4/projects/undefined/pipelines/397251/jobs failed"", - ""\tat ps (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:265:444)"", - ""\tat processTicksAndRejections (internal/process/task_queues.js:93:5)"", - ""\tat async pa.fetch (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:265:1606)"", - ""\tat async zv (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:7053)"", - ""\tat async Function.getState (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8530)"", - ""\tat async An.refresh (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8142)"", - ""\tat async An.clearAndSetIntervalAndRefresh (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:7866)"" - ] - } -[error]: { - ""userMessage"": ""Failed to fetch jobs for pipeline."", - ""errorMessage"": ""Fetching jobs for pipeline from https://gitlab.ourcompany.com/api/v4/projects/undefined/pipelines/397251/jobs failed"", - ""stack"": [ - ""Error: Fetching jobs for pipeline from https://gitlab.ourcompany.com/api/v4/projects/undefined/pipelines/397251/jobs failed"", - ""\tat ps (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:265:444)"", - ""\tat processTicksAndRejections (internal/process/task_queues.js:93:5)"", - ""\tat async pa.fetch (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:265:1606)"", - ""\tat async zv (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:7053)"", - ""\tat async Function.getState (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8530)"", - ""\tat async An.refresh (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8142)"", - ""\tat async An.clearAndSetIntervalAndRefresh (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:7866)"", - ""\tat async Timeout._onTimeout (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:7745)"" - ] - } -[error]: { - ""userMessage"": ""Failed to fetch jobs for pipeline."", - ""errorMessage"": ""Fetching jobs for pipeline from https://gitlab.ourcompany.com/api/v4/projects/undefined/pipelines/397251/jobs failed"", - ""stack"": [ - ""Error: Fetching jobs for pipeline from https://gitlab.ourcompany.com/api/v4/projects/undefined/pipelines/397251/jobs failed"", - ""\tat ps (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:265:444)"", - ""\tat processTicksAndRejections (internal/process/task_queues.js:93:5)"", - ""\tat async pa.fetch (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:265:1606)"", - ""\tat async zv (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:7053)"", - ""\tat async Function.getState (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8530)"", - ""\tat async An.refresh (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8142)"", - ""\tat async gl.refreshSidebar (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:317:2934)"", - ""\tat async c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:317:1540"", - ""\tat async r._executeContributedCommand (c:\\Apps\\VS Code\\resources\\app\\out\\vs\\workbench\\services\\extensions\\node\\extensionHostProcess.js:95:31072)"" - ] - } -[error]: { - ""userMessage"": ""Failed to fetch jobs for pipeline."", - ""errorMessage"": ""Fetching jobs for pipeline from https://gitlab.ourcompany.com/api/v4/projects/undefined/pipelines/397251/jobs failed"", - ""stack"": [ - ""Error: Fetching jobs for pipeline from https://gitlab.ourcompany.com/api/v4/projects/undefined/pipelines/397251/jobs failed"", - ""\tat ps (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:265:444)"", - ""\tat processTicksAndRejections (internal/process/task_queues.js:93:5)"", - ""\tat async pa.fetch (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:265:1606)"", - ""\tat async zv (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:7053)"", - ""\tat async Function.getState (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8530)"", - ""\tat async An.refresh (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8142)"", - ""\tat async Timeout._onTimeout (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8015)"" - ] - } -[error]: { - ""userMessage"": ""Failed to fetch jobs for pipeline."", - ""errorMessage"": ""Fetching jobs for pipeline from https://gitlab.ourcompany.com/api/v4/projects/undefined/pipelines/397251/jobs failed"", - ""stack"": [ - ""Error: Fetching jobs for pipeline from https://gitlab.ourcompany.com/api/v4/projects/undefined/pipelines/397251/jobs failed"", - ""\tat ps (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:265:444)"", - ""\tat processTicksAndRejections (internal/process/task_queues.js:93:5)"", - ""\tat async pa.fetch (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:265:1606)"", - ""\tat async zv (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:7053)"", - ""\tat async Function.getState (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8530)"", - ""\tat async An.refresh (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8142)"", - ""\tat async Timeout._onTimeout (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8015)"" - ] - } -[error]: { - ""userMessage"": ""Failed to fetch jobs for pipeline."", - ""errorMessage"": ""Fetching jobs for pipeline from https://gitlab.ourcompany.com/api/v4/projects/undefined/pipelines/397251/jobs failed"", - ""stack"": [ - ""Error: Fetching jobs for pipeline from https://gitlab.ourcompany.com/api/v4/projects/undefined/pipelines/397251/jobs failed"", - ""\tat ps (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:265:444)"", - ""\tat processTicksAndRejections (internal/process/task_queues.js:93:5)"", - ""\tat async pa.fetch (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:265:1606)"", - ""\tat async zv (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:7053)"", - ""\tat async Function.getState (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8530)"", - ""\tat async An.refresh (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8142)"", - ""\tat async Timeout._onTimeout (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8015)"" - ] - } -[error]: { - ""userMessage"": ""Failed to fetch jobs for pipeline."", - ""errorMessage"": ""Fetching jobs for pipeline from https://gitlab.ourcompany.com/api/v4/projects/undefined/pipelines/397251/jobs failed"", - ""stack"": [ - ""Error: Fetching jobs for pipeline from https://gitlab.ourcompany.com/api/v4/projects/undefined/pipelines/397251/jobs failed"", - ""\tat ps (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:265:444)"", - ""\tat processTicksAndRejections (internal/process/task_queues.js:93:5)"", - ""\tat async pa.fetch (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:265:1606)"", - ""\tat async zv (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:7053)"", - ""\tat async Function.getState (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8530)"", - ""\tat async An.refresh (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8142)"", - ""\tat async Timeout._onTimeout (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8015)"" - ] - } -[error]: { - ""userMessage"": ""Failed to fetch jobs for pipeline."", - ""errorMessage"": ""Fetching jobs for pipeline from https://gitlab.ourcompany.com/api/v4/projects/undefined/pipelines/397251/jobs failed"", - ""stack"": [ - ""Error: Fetching jobs for pipeline from https://gitlab.ourcompany.com/api/v4/projects/undefined/pipelines/397251/jobs failed"", - ""\tat ps (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:265:444)"", - ""\tat processTicksAndRejections (internal/process/task_queues.js:93:5)"", - ""\tat async pa.fetch (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:265:1606)"", - ""\tat async zv (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:7053)"", - ""\tat async Function.getState (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8530)"", - ""\tat async An.refresh (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8142)"", - ""\tat async Timeout._onTimeout (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8015)"" - ] - } -[error]: { - ""userMessage"": ""Failed to fetch jobs for pipeline."", - ""errorMessage"": ""Fetching jobs for pipeline from https://gitlab.ourcompany.com/api/v4/projects/undefined/pipelines/397251/jobs failed"", - ""stack"": [ - ""Error: Fetching jobs for pipeline from https://gitlab.ourcompany.com/api/v4/projects/undefined/pipelines/397251/jobs failed"", - ""\tat ps (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:265:444)"", - ""\tat processTicksAndRejections (internal/process/task_queues.js:93:5)"", - ""\tat async pa.fetch (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:265:1606)"", - ""\tat async zv (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:7053)"", - ""\tat async Function.getState (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8530)"", - ""\tat async An.refresh (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8142)"", - ""\tat async Timeout._onTimeout (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8015)"" - ] - } -[error]: { - ""userMessage"": ""Failed to fetch jobs for pipeline."", - ""errorMessage"": ""Fetching jobs for pipeline from https://gitlab.ourcompany.com/api/v4/projects/undefined/pipelines/397251/jobs failed"", - ""stack"": [ - ""Error: Fetching jobs for pipeline from https://gitlab.ourcompany.com/api/v4/projects/undefined/pipelines/397251/jobs failed"", - ""\tat ps (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:265:444)"", - ""\tat processTicksAndRejections (internal/process/task_queues.js:93:5)"", - ""\tat async pa.fetch (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:265:1606)"", - ""\tat async zv (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:7053)"", - ""\tat async Function.getState (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8530)"", - ""\tat async An.refresh (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8142)"", - ""\tat async Timeout._onTimeout (c:\\Apps\\VS Code\\data\\extensions\\gitlab.gitlab-workflow-3.41.2\\out\\extension.js:316:8015)"" - ] - } -``` - -(Note: I use a portable VS Code to re-produce this issue without any other extensions installed, but the issue also exists in a normal user setup of VS Code) - -### Possible fixes - -The problem might be caused by failure when get project id: in the log, you can see `undefined` in the request url, where it should be a project id: - -`https://gitlab.ourcompany.com/api/v4/projects/undefined/pipelines/397251/jobs` - -I try to replace regex `\{\w+\.project_id\}` with my project id `438` in `C:\Users\username\.vscode\extensions\gitlab.gitlab-workflow-3.41.2`, then it works (see the picture below): - -![gitlab_pipeline_error](/uploads/f450aa066c95a580ec26ba1c625c0359/gitlab_pipeline_error.png)",1 -104749501,2022-03-14 08:17:12.947,Fail to access merge request and pipeline result - Field 'url' doesn't exist on type 'Note',"### Checklist - - - -- [x] I'm using the latest version of the extension ([see the latest version in the right column of this page](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow)) - - Extension version: v3.41.1 -- [x] I'm using the latest VS Code version ([find the latest version here](https://github.com/microsoft/vscode/releases)) - - VS Code version: 1.65.2 (user setup) -- [x] I'm using a supported version of GitLab ([see README for the supported version](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/blob/main/README.md#minimum-supported-version)) - - GitLab version: 13.5.4-ee - -### Summary - - - -### Steps to reproduce - -1. Install this extension -2. Setup gitlab.instanceUrl and personal access token -3. Open an VSCode workspace hosted by gitlab EE -4. Click the gitlab icon in the sidebar, it shows list of the merge requests - (But here, the pipeline result FORCURRENT BRANCH does not show fully) -5. Click any MR in the ISSUES AND MERGE REQUESTS, an error message displays: -``` -The extension failed to preload discussions on the MR diff. - It's possible that you've encountered - https://gitlab.com/gitlab-org/gitlab/-/issues/298827. -``` - (I tried to find a solution from above URL but not found) - -6. Click 'Overview' of a MR, another error message displays: -``` -Field 'url' doesn't exist on type 'Note': {""response"":{""errors"":[{""message"":""Field 'url' doesn't exist on type 'Note'"",""locations"":[{""line"":35,""column"":5}],""path"":[""fragment noteDetails"",""url""],""extensions"":{""code"":""undefinedField"",""typeName"":""Note"",""fieldName"":""url""}}],""status"":200,""headers"":{}},""request"":{""query"":""\n \n \n \n \n fragment position on Note {\n position {\n diffRefs {\n baseSha\n headSha\n startSha\n }\n filePath\n positionType\n newLine\n oldLine\n newPath\n oldPath\n positionType\n }\n }\n\n fragment noteDetails on Note {\n id\n createdAt\n system\n author {\n avatarUrl\n name\n username\n webUrl\n }\n body\n bodyHtml\n url\n userPermissions {\n resolveNote\n adminNote\n createNote\n }\n ...position\n }\n\n fragment discussionDetails on Discussion {\n replyId\n createdAt\n resolved\n resolvable\n notes {\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n ...noteDetails\n }\n }\n }\n\n fragment discussions on DiscussionConnection {\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n ...discussionDetails\n }\n }\n\n query GetMrDiscussions($projectPath: ID!, $iid: String!, $afterCursor: String) {\n project(fullPath: $projectPath) {\n id\n mergeRequest(iid: $iid) {\n discussions(after: $afterCursor) {\n ...discussions\n }\n }\n }\n }\n"",""variables"":{""projectPath"":""dev/ProjectName"",""iid"":""729""}}} -``` -### What is the current _bug_ behavior? - -Can't open the merge request - -### What is the expected _correct_ behavior? - -It should open the MR correctly - - - -### Relevant logs and/or screenshots -![gitlab_error](/uploads/e8a2c12d0a9b5a5183e1d5b7ae2cacbf/gitlab_error.png) -log from 'GitLab: Show extension logs' -``` -[error]: { - ""userMessage"": ""The extension failed to preload discussions on the MR diff.\n It's possible that you've encountered\n https://gitlab.com/gitlab-org/gitlab/-/issues/298827."", - ""errorMessage"": ""Field 'url' doesn't exist on type 'Note': {\""response\"":{\""errors\"":[{\""message\"":\""Field 'url' doesn't exist on type 'Note'\"",\""locations\"":[{\""line\"":35,\""column\"":5}],\""path\"":[\""fragment noteDetails\"",\""url\""],\""extensions\"":{\""code\"":\""undefinedField\"",\""typeName\"":\""Note\"",\""fieldName\"":\""url\""}}],\""status\"":200,\""headers\"":{}},\""request\"":{\""query\"":\""\\n \\n \\n \\n \\n fragment position on Note {\\n position {\\n diffRefs {\\n baseSha\\n headSha\\n startSha\\n }\\n filePath\\n positionType\\n newLine\\n oldLine\\n newPath\\n oldPath\\n positionType\\n }\\n }\\n\\n fragment noteDetails on Note {\\n id\\n createdAt\\n system\\n author {\\n avatarUrl\\n name\\n username\\n webUrl\\n }\\n body\\n bodyHtml\\n url\\n userPermissions {\\n resolveNote\\n adminNote\\n createNote\\n }\\n ...position\\n }\\n\\n fragment discussionDetails on Discussion {\\n replyId\\n createdAt\\n resolved\\n resolvable\\n notes {\\n pageInfo {\\n hasNextPage\\n endCursor\\n }\\n nodes {\\n ...noteDetails\\n }\\n }\\n }\\n\\n fragment discussions on DiscussionConnection {\\n pageInfo {\\n hasNextPage\\n endCursor\\n }\\n nodes {\\n ...discussionDetails\\n }\\n }\\n\\n query GetMrDiscussions($projectPath: ID!, $iid: String!, $afterCursor: String) {\\n project(fullPath: $projectPath) {\\n id\\n mergeRequest(iid: $iid) {\\n discussions(after: $afterCursor) {\\n ...discussions\\n }\\n }\\n }\\n }\\n\"",\""variables\"":{\""projectPath\"":\""dev/ProjectName\"",\""iid\"":\""731\""}}}"", - ""stack"": [ - ""Error: Field 'url' doesn't exist on type 'Note': {\""response\"":{\""errors\"":[{\""message\"":\""Field 'url' doesn't exist on type 'Note'\"",\""locations\"":[{\""line\"":35,\""column\"":5}],\""path\"":[\""fragment noteDetails\"",\""url\""],\""extensions\"":{\""code\"":\""undefinedField\"",\""typeName\"":\""Note\"",\""fieldName\"":\""url\""}}],\""status\"":200,\""headers\"":{}},\""request\"":{\""query\"":\""\\n \\n \\n \\n \\n fragment position on Note {\\n position {\\n diffRefs {\\n baseSha\\n headSha\\n startSha\\n }\\n filePath\\n positionType\\n newLine\\n oldLine\\n newPath\\n oldPath\\n positionType\\n }\\n }\\n\\n fragment noteDetails on Note {\\n id\\n createdAt\\n system\\n author {\\n avatarUrl\\n name\\n username\\n webUrl\\n }\\n body\\n bodyHtml\\n url\\n userPermissions {\\n resolveNote\\n adminNote\\n createNote\\n }\\n ...position\\n }\\n\\n fragment discussionDetails on Discussion {\\n replyId\\n createdAt\\n resolved\\n resolvable\\n notes {\\n pageInfo {\\n hasNextPage\\n endCursor\\n }\\n nodes {\\n ...noteDetails\\n }\\n }\\n }\\n\\n fragment discussions on DiscussionConnection {\\n pageInfo {\\n hasNextPage\\n endCursor\\n }\\n nodes {\\n ...discussionDetails\\n }\\n }\\n\\n query GetMrDiscussions($projectPath: ID!, $iid: String!, $afterCursor: String) {\\n project(fullPath: $projectPath) {\\n id\\n mergeRequest(iid: $iid) {\\n discussions(after: $afterCursor) {\\n ...discussions\\n }\\n }\\n }\\n }\\n\"",\""variables\"":{\""projectPath\"":\""dev/ProjectName\"",\""iid\"":\""731\""}}}"", - ""\tat c:\\Users\\username\\.vscode\\extensions\\gitlab.gitlab-workflow-3.41.1\\out\\extension.js:31:15173"", - ""\tat o (c:\\Users\\username\\.vscode\\extensions\\gitlab.gitlab-workflow-3.41.1\\out\\extension.js:31:10042)"", - ""\tat Object.next (c:\\Users\\username\\.vscode\\extensions\\gitlab.gitlab-workflow-3.41.1\\out\\extension.js:31:9346)"", - ""\tat p (c:\\Users\\username\\.vscode\\extensions\\gitlab.gitlab-workflow-3.41.1\\out\\extension.js:31:8906)"", - ""\tat processTicksAndRejections (internal/process/task_queues.js:93:5)"" - ] - } -[error]: Field 'url' doesn't exist on type 'Note': {""response"":{""errors"":[{""message"":""Field 'url' doesn't exist on type 'Note'"",""locations"":[{""line"":35,""column"":5}],""path"":[""fragment noteDetails"",""url""],""extensions"":{""code"":""undefinedField"",""typeName"":""Note"",""fieldName"":""url""}}],""status"":200,""headers"":{}},""request"":{""query"":""\n \n \n \n \n fragment position on Note {\n position {\n diffRefs {\n baseSha\n headSha\n startSha\n }\n filePath\n positionType\n newLine\n oldLine\n newPath\n oldPath\n positionType\n }\n }\n\n fragment noteDetails on Note {\n id\n createdAt\n system\n author {\n avatarUrl\n name\n username\n webUrl\n }\n body\n bodyHtml\n url\n userPermissions {\n resolveNote\n adminNote\n createNote\n }\n ...position\n }\n\n fragment discussionDetails on Discussion {\n replyId\n createdAt\n resolved\n resolvable\n notes {\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n ...noteDetails\n }\n }\n }\n\n fragment discussions on DiscussionConnection {\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n ...discussionDetails\n }\n }\n\n query GetMrDiscussions($projectPath: ID!, $iid: String!, $afterCursor: String) {\n project(fullPath: $projectPath) {\n id\n mergeRequest(iid: $iid) {\n discussions(after: $afterCursor) {\n ...discussions\n }\n }\n }\n }\n"",""variables"":{""projectPath"":""dev/ProjectName"",""iid"":""731""}}} - Error: Field 'url' doesn't exist on type 'Note': {""response"":{""errors"":[{""message"":""Field 'url' doesn't exist on type 'Note'"",""locations"":[{""line"":35,""column"":5}],""path"":[""fragment noteDetails"",""url""],""extensions"":{""code"":""undefinedField"",""typeName"":""Note"",""fieldName"":""url""}}],""status"":200,""headers"":{}},""request"":{""query"":""\n \n \n \n \n fragment position on Note {\n position {\n diffRefs {\n baseSha\n headSha\n startSha\n }\n filePath\n positionType\n newLine\n oldLine\n newPath\n oldPath\n positionType\n }\n }\n\n fragment noteDetails on Note {\n id\n createdAt\n system\n author {\n avatarUrl\n name\n username\n webUrl\n }\n body\n bodyHtml\n url\n userPermissions {\n resolveNote\n adminNote\n createNote\n }\n ...position\n }\n\n fragment discussionDetails on Discussion {\n replyId\n createdAt\n resolved\n resolvable\n notes {\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n ...noteDetails\n }\n }\n }\n\n fragment discussions on DiscussionConnection {\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n ...discussionDetails\n }\n }\n\n query GetMrDiscussions($projectPath: ID!, $iid: String!, $afterCursor: String) {\n project(fullPath: $projectPath) {\n id\n mergeRequest(iid: $iid) {\n discussions(after: $afterCursor) {\n ...discussions\n }\n }\n }\n }\n"",""variables"":{""projectPath"":""dev/ProjectName"",""iid"":""731""}}} - at c:\Users\username\.vscode\extensions\gitlab.gitlab-workflow-3.41.1\out\extension.js:31:15173 - at o (c:\Users\username\.vscode\extensions\gitlab.gitlab-workflow-3.41.1\out\extension.js:31:10042) - at Object.next (c:\Users\username\.vscode\extensions\gitlab.gitlab-workflow-3.41.1\out\extension.js:31:9346) - at p (c:\Users\username\.vscode\extensions\gitlab.gitlab-workflow-3.41.1\out\extension.js:31:8906) - at processTicksAndRejections (internal/process/task_queues.js:93:5) -[error]: { - ""userMessage"": ""The extension failed to preload discussions on the MR diff.\n It's possible that you've encountered\n https://gitlab.com/gitlab-org/gitlab/-/issues/298827."", - ""errorMessage"": ""Field 'url' doesn't exist on type 'Note': {\""response\"":{\""errors\"":[{\""message\"":\""Field 'url' doesn't exist on type 'Note'\"",\""locations\"":[{\""line\"":35,\""column\"":5}],\""path\"":[\""fragment noteDetails\"",\""url\""],\""extensions\"":{\""code\"":\""undefinedField\"",\""typeName\"":\""Note\"",\""fieldName\"":\""url\""}}],\""status\"":200,\""headers\"":{}},\""request\"":{\""query\"":\""\\n \\n \\n \\n \\n fragment position on Note {\\n position {\\n diffRefs {\\n baseSha\\n headSha\\n startSha\\n }\\n filePath\\n positionType\\n newLine\\n oldLine\\n newPath\\n oldPath\\n positionType\\n }\\n }\\n\\n fragment noteDetails on Note {\\n id\\n createdAt\\n system\\n author {\\n avatarUrl\\n name\\n username\\n webUrl\\n }\\n body\\n bodyHtml\\n url\\n userPermissions {\\n resolveNote\\n adminNote\\n createNote\\n }\\n ...position\\n }\\n\\n fragment discussionDetails on Discussion {\\n replyId\\n createdAt\\n resolved\\n resolvable\\n notes {\\n pageInfo {\\n hasNextPage\\n endCursor\\n }\\n nodes {\\n ...noteDetails\\n }\\n }\\n }\\n\\n fragment discussions on DiscussionConnection {\\n pageInfo {\\n hasNextPage\\n endCursor\\n }\\n nodes {\\n ...discussionDetails\\n }\\n }\\n\\n query GetMrDiscussions($projectPath: ID!, $iid: String!, $afterCursor: String) {\\n project(fullPath: $projectPath) {\\n id\\n mergeRequest(iid: $iid) {\\n discussions(after: $afterCursor) {\\n ...discussions\\n }\\n }\\n }\\n }\\n\"",\""variables\"":{\""projectPath\"":\""dev/ProjectName\"",\""iid\"":\""730\""}}}"", - ""stack"": [ - ""Error: Field 'url' doesn't exist on type 'Note': {\""response\"":{\""errors\"":[{\""message\"":\""Field 'url' doesn't exist on type 'Note'\"",\""locations\"":[{\""line\"":35,\""column\"":5}],\""path\"":[\""fragment noteDetails\"",\""url\""],\""extensions\"":{\""code\"":\""undefinedField\"",\""typeName\"":\""Note\"",\""fieldName\"":\""url\""}}],\""status\"":200,\""headers\"":{}},\""request\"":{\""query\"":\""\\n \\n \\n \\n \\n fragment position on Note {\\n position {\\n diffRefs {\\n baseSha\\n headSha\\n startSha\\n }\\n filePath\\n positionType\\n newLine\\n oldLine\\n newPath\\n oldPath\\n positionType\\n }\\n }\\n\\n fragment noteDetails on Note {\\n id\\n createdAt\\n system\\n author {\\n avatarUrl\\n name\\n username\\n webUrl\\n }\\n body\\n bodyHtml\\n url\\n userPermissions {\\n resolveNote\\n adminNote\\n createNote\\n }\\n ...position\\n }\\n\\n fragment discussionDetails on Discussion {\\n replyId\\n createdAt\\n resolved\\n resolvable\\n notes {\\n pageInfo {\\n hasNextPage\\n endCursor\\n }\\n nodes {\\n ...noteDetails\\n }\\n }\\n }\\n\\n fragment discussions on DiscussionConnection {\\n pageInfo {\\n hasNextPage\\n endCursor\\n }\\n nodes {\\n ...discussionDetails\\n }\\n }\\n\\n query GetMrDiscussions($projectPath: ID!, $iid: String!, $afterCursor: String) {\\n project(fullPath: $projectPath) {\\n id\\n mergeRequest(iid: $iid) {\\n discussions(after: $afterCursor) {\\n ...discussions\\n }\\n }\\n }\\n }\\n\"",\""variables\"":{\""projectPath\"":\""dev/ProjectName\"",\""iid\"":\""730\""}}}"", - ""\tat c:\\Users\\username\\.vscode\\extensions\\gitlab.gitlab-workflow-3.41.1\\out\\extension.js:31:15173"", - ""\tat o (c:\\Users\\username\\.vscode\\extensions\\gitlab.gitlab-workflow-3.41.1\\out\\extension.js:31:10042)"", - ""\tat Object.next (c:\\Users\\username\\.vscode\\extensions\\gitlab.gitlab-workflow-3.41.1\\out\\extension.js:31:9346)"", - ""\tat p (c:\\Users\\username\\.vscode\\extensions\\gitlab.gitlab-workflow-3.41.1\\out\\extension.js:31:8906)"", - ""\tat processTicksAndRejections (internal/process/task_queues.js:93:5)"" - ] - } -[error]: Field 'url' doesn't exist on type 'Note': {""response"":{""errors"":[{""message"":""Field 'url' doesn't exist on type 'Note'"",""locations"":[{""line"":35,""column"":5}],""path"":[""fragment noteDetails"",""url""],""extensions"":{""code"":""undefinedField"",""typeName"":""Note"",""fieldName"":""url""}}],""status"":200,""headers"":{}},""request"":{""query"":""\n \n \n \n \n fragment position on Note {\n position {\n diffRefs {\n baseSha\n headSha\n startSha\n }\n filePath\n positionType\n newLine\n oldLine\n newPath\n oldPath\n positionType\n }\n }\n\n fragment noteDetails on Note {\n id\n createdAt\n system\n author {\n avatarUrl\n name\n username\n webUrl\n }\n body\n bodyHtml\n url\n userPermissions {\n resolveNote\n adminNote\n createNote\n }\n ...position\n }\n\n fragment discussionDetails on Discussion {\n replyId\n createdAt\n resolved\n resolvable\n notes {\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n ...noteDetails\n }\n }\n }\n\n fragment discussions on DiscussionConnection {\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n ...discussionDetails\n }\n }\n\n query GetMrDiscussions($projectPath: ID!, $iid: String!, $afterCursor: String) {\n project(fullPath: $projectPath) {\n id\n mergeRequest(iid: $iid) {\n discussions(after: $afterCursor) {\n ...discussions\n }\n }\n }\n }\n"",""variables"":{""projectPath"":""dev/ProjectName"",""iid"":""730""}}} - Error: Field 'url' doesn't exist on type 'Note': {""response"":{""errors"":[{""message"":""Field 'url' doesn't exist on type 'Note'"",""locations"":[{""line"":35,""column"":5}],""path"":[""fragment noteDetails"",""url""],""extensions"":{""code"":""undefinedField"",""typeName"":""Note"",""fieldName"":""url""}}],""status"":200,""headers"":{}},""request"":{""query"":""\n \n \n \n \n fragment position on Note {\n position {\n diffRefs {\n baseSha\n headSha\n startSha\n }\n filePath\n positionType\n newLine\n oldLine\n newPath\n oldPath\n positionType\n }\n }\n\n fragment noteDetails on Note {\n id\n createdAt\n system\n author {\n avatarUrl\n name\n username\n webUrl\n }\n body\n bodyHtml\n url\n userPermissions {\n resolveNote\n adminNote\n createNote\n }\n ...position\n }\n\n fragment discussionDetails on Discussion {\n replyId\n createdAt\n resolved\n resolvable\n notes {\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n ...noteDetails\n }\n }\n }\n\n fragment discussions on DiscussionConnection {\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n ...discussionDetails\n }\n }\n\n query GetMrDiscussions($projectPath: ID!, $iid: String!, $afterCursor: String) {\n project(fullPath: $projectPath) {\n id\n mergeRequest(iid: $iid) {\n discussions(after: $afterCursor) {\n ...discussions\n }\n }\n }\n }\n"",""variables"":{""projectPath"":""dev/ProjectName"",""iid"":""730""}}} - at c:\Users\username\.vscode\extensions\gitlab.gitlab-workflow-3.41.1\out\extension.js:31:15173 - at o (c:\Users\username\.vscode\extensions\gitlab.gitlab-workflow-3.41.1\out\extension.js:31:10042) - at Object.next (c:\Users\username\.vscode\extensions\gitlab.gitlab-workflow-3.41.1\out\extension.js:31:9346) - at p (c:\Users\username\.vscode\extensions\gitlab.gitlab-workflow-3.41.1\out\extension.js:31:8906) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:93:5) -[error]: { - ""userMessage"": ""The extension failed to preload discussions on the MR diff.\n It's possible that you've encountered\n https://gitlab.com/gitlab-org/gitlab/-/issues/298827."", - ""errorMessage"": ""Field 'url' doesn't exist on type 'Note': {\""response\"":{\""errors\"":[{\""message\"":\""Field 'url' doesn't exist on type 'Note'\"",\""locations\"":[{\""line\"":35,\""column\"":5}],\""path\"":[\""fragment noteDetails\"",\""url\""],\""extensions\"":{\""code\"":\""undefinedField\"",\""typeName\"":\""Note\"",\""fieldName\"":\""url\""}}],\""status\"":200,\""headers\"":{}},\""request\"":{\""query\"":\""\\n \\n \\n \\n \\n fragment position on Note {\\n position {\\n diffRefs {\\n baseSha\\n headSha\\n startSha\\n }\\n filePath\\n positionType\\n newLine\\n oldLine\\n newPath\\n oldPath\\n positionType\\n }\\n }\\n\\n fragment noteDetails on Note {\\n id\\n createdAt\\n system\\n author {\\n avatarUrl\\n name\\n username\\n webUrl\\n }\\n body\\n bodyHtml\\n url\\n userPermissions {\\n resolveNote\\n adminNote\\n createNote\\n }\\n ...position\\n }\\n\\n fragment discussionDetails on Discussion {\\n replyId\\n createdAt\\n resolved\\n resolvable\\n notes {\\n pageInfo {\\n hasNextPage\\n endCursor\\n }\\n nodes {\\n ...noteDetails\\n }\\n }\\n }\\n\\n fragment discussions on DiscussionConnection {\\n pageInfo {\\n hasNextPage\\n endCursor\\n }\\n nodes {\\n ...discussionDetails\\n }\\n }\\n\\n query GetMrDiscussions($projectPath: ID!, $iid: String!, $afterCursor: String) {\\n project(fullPath: $projectPath) {\\n id\\n mergeRequest(iid: $iid) {\\n discussions(after: $afterCursor) {\\n ...discussions\\n }\\n }\\n }\\n }\\n\"",\""variables\"":{\""projectPath\"":\""dev/ProjectName\"",\""iid\"":\""729\""}}}"", - ""stack"": [ - ""Error: Field 'url' doesn't exist on type 'Note': {\""response\"":{\""errors\"":[{\""message\"":\""Field 'url' doesn't exist on type 'Note'\"",\""locations\"":[{\""line\"":35,\""column\"":5}],\""path\"":[\""fragment noteDetails\"",\""url\""],\""extensions\"":{\""code\"":\""undefinedField\"",\""typeName\"":\""Note\"",\""fieldName\"":\""url\""}}],\""status\"":200,\""headers\"":{}},\""request\"":{\""query\"":\""\\n \\n \\n \\n \\n fragment position on Note {\\n position {\\n diffRefs {\\n baseSha\\n headSha\\n startSha\\n }\\n filePath\\n positionType\\n newLine\\n oldLine\\n newPath\\n oldPath\\n positionType\\n }\\n }\\n\\n fragment noteDetails on Note {\\n id\\n createdAt\\n system\\n author {\\n avatarUrl\\n name\\n username\\n webUrl\\n }\\n body\\n bodyHtml\\n url\\n userPermissions {\\n resolveNote\\n adminNote\\n createNote\\n }\\n ...position\\n }\\n\\n fragment discussionDetails on Discussion {\\n replyId\\n createdAt\\n resolved\\n resolvable\\n notes {\\n pageInfo {\\n hasNextPage\\n endCursor\\n }\\n nodes {\\n ...noteDetails\\n }\\n }\\n }\\n\\n fragment discussions on DiscussionConnection {\\n pageInfo {\\n hasNextPage\\n endCursor\\n }\\n nodes {\\n ...discussionDetails\\n }\\n }\\n\\n query GetMrDiscussions($projectPath: ID!, $iid: String!, $afterCursor: String) {\\n project(fullPath: $projectPath) {\\n id\\n mergeRequest(iid: $iid) {\\n discussions(after: $afterCursor) {\\n ...discussions\\n }\\n }\\n }\\n }\\n\"",\""variables\"":{\""projectPath\"":\""dev/ProjectName\"",\""iid\"":\""729\""}}}"", - ""\tat c:\\Users\\username\\.vscode\\extensions\\gitlab.gitlab-workflow-3.41.1\\out\\extension.js:31:15173"", - ""\tat o (c:\\Users\\username\\.vscode\\extensions\\gitlab.gitlab-workflow-3.41.1\\out\\extension.js:31:10042)"", - ""\tat Object.next (c:\\Users\\username\\.vscode\\extensions\\gitlab.gitlab-workflow-3.41.1\\out\\extension.js:31:9346)"", - ""\tat p (c:\\Users\\username\\.vscode\\extensions\\gitlab.gitlab-workflow-3.41.1\\out\\extension.js:31:8906)"", - ""\tat runMicrotasks ()"", - ""\tat processTicksAndRejections (internal/process/task_queues.js:93:5)"" - ] - } -[error]: Field 'url' doesn't exist on type 'Note': {""response"":{""errors"":[{""message"":""Field 'url' doesn't exist on type 'Note'"",""locations"":[{""line"":35,""column"":5}],""path"":[""fragment noteDetails"",""url""],""extensions"":{""code"":""undefinedField"",""typeName"":""Note"",""fieldName"":""url""}}],""status"":200,""headers"":{}},""request"":{""query"":""\n \n \n \n \n fragment position on Note {\n position {\n diffRefs {\n baseSha\n headSha\n startSha\n }\n filePath\n positionType\n newLine\n oldLine\n newPath\n oldPath\n positionType\n }\n }\n\n fragment noteDetails on Note {\n id\n createdAt\n system\n author {\n avatarUrl\n name\n username\n webUrl\n }\n body\n bodyHtml\n url\n userPermissions {\n resolveNote\n adminNote\n createNote\n }\n ...position\n }\n\n fragment discussionDetails on Discussion {\n replyId\n createdAt\n resolved\n resolvable\n notes {\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n ...noteDetails\n }\n }\n }\n\n fragment discussions on DiscussionConnection {\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n ...discussionDetails\n }\n }\n\n query GetMrDiscussions($projectPath: ID!, $iid: String!, $afterCursor: String) {\n project(fullPath: $projectPath) {\n id\n mergeRequest(iid: $iid) {\n discussions(after: $afterCursor) {\n ...discussions\n }\n }\n }\n }\n"",""variables"":{""projectPath"":""dev/ProjectName"",""iid"":""729""}}} - Error: Field 'url' doesn't exist on type 'Note': {""response"":{""errors"":[{""message"":""Field 'url' doesn't exist on type 'Note'"",""locations"":[{""line"":35,""column"":5}],""path"":[""fragment noteDetails"",""url""],""extensions"":{""code"":""undefinedField"",""typeName"":""Note"",""fieldName"":""url""}}],""status"":200,""headers"":{}},""request"":{""query"":""\n \n \n \n \n fragment position on Note {\n position {\n diffRefs {\n baseSha\n headSha\n startSha\n }\n filePath\n positionType\n newLine\n oldLine\n newPath\n oldPath\n positionType\n }\n }\n\n fragment noteDetails on Note {\n id\n createdAt\n system\n author {\n avatarUrl\n name\n username\n webUrl\n }\n body\n bodyHtml\n url\n userPermissions {\n resolveNote\n adminNote\n createNote\n }\n ...position\n }\n\n fragment discussionDetails on Discussion {\n replyId\n createdAt\n resolved\n resolvable\n notes {\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n ...noteDetails\n }\n }\n }\n\n fragment discussions on DiscussionConnection {\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n ...discussionDetails\n }\n }\n\n query GetMrDiscussions($projectPath: ID!, $iid: String!, $afterCursor: String) {\n project(fullPath: $projectPath) {\n id\n mergeRequest(iid: $iid) {\n discussions(after: $afterCursor) {\n ...discussions\n }\n }\n }\n }\n"",""variables"":{""projectPath"":""dev/ProjectName"",""iid"":""729""}}} - at c:\Users\username\.vscode\extensions\gitlab.gitlab-workflow-3.41.1\out\extension.js:31:15173 - at o (c:\Users\username\.vscode\extensions\gitlab.gitlab-workflow-3.41.1\out\extension.js:31:10042) - at Object.next (c:\Users\username\.vscode\extensions\gitlab.gitlab-workflow-3.41.1\out\extension.js:31:9346) - at p (c:\Users\username\.vscode\extensions\gitlab.gitlab-workflow-3.41.1\out\extension.js:31:8906) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:93:5) - -``` - - -### Possible fixes - -It seems that the extension failed to parse the project id correctly. I try to open `C:\Users\username\.vscode\extensions\gitlab.gitlab-workflow-3.41.1` and replace regex `\$\{\w+\.project_id\}` with my project id `438`, then I can see the pipeline result correctly, but the merge requests still can't be opened. -",1 -103967604,2022-03-02 12:28:05.948,Fix /merge quick action by submitting head SHA with the new note," -### Summary - -The `/merge` quick action in any MR comment causes the API to fail. Original issue: https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/issues/352 - -![merge-quick-action](/uploads/27f47835194fa6553869733be9523f91/merge-quick-action.mp4) - -### Steps to reproduce - -Try to send a comment on an open MR that contains the `/merge` quick action. - -### What is the current _bug_ behavior? - -GitLab API fails with 500 error. - -### What is the expected _correct_ behavior? - -The MR gets merged. - -### Relevant logs and/or screenshots - - - -### Possible fixes - -We need to submit the `CreateNoteInput.mergeRequestDiffHeadSha` parameter to the GraphQL `createNote` mutation. This parameter should contain the MR HEAD SHA and it is used for optimistic locking. - -Maybe we'll need to add a condition and only submit the parameter if the GitLab version is 14.9 or higher. I'm not 100% sure how GraphQL handles input parameters that are not defined (because the `mergeRequestDiffHeadSha` parameter won't be defined on older versions)",1 -103884289,2022-03-01 10:51:05.632,POC - OAuth GitLab login in addition to token login,"### Problem to solve - -The current way of generating Personal Access token and adding it to the extension is relatively complicated and prone to errors. More information is in the original issue https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/issues/221 - -### Proposal - -In the proof of concept we would test the OAuth login locally: - -1. Create an [instance-wide OAuth application](https://docs.gitlab.com/ee/integration/oauth_provider.html#instance-wide-applications) in the local GDK -1. Create a page that GitLab redirects to when user gives the OAuth permission - - Try localhost server triggered by the extension (this is how JetBrains GitHub plugin does it) - - If that doesn't work, we can try to use GitLab Pages (that's similar to how the VS Code GitHub extension does it) -1. Implement the OAuth flow in the extension - -### Further details - -This is going to be proof-of-concept with throwaway code. The output is going to be: - -- POC code in the extension -- Documentation on how to set up the OAuth application in the GitLab instance. -- It would be good to think how could this OAuth flow be adjusted for alternative VS Code deployments (Gitpod or `vscode.dev`) but that might be out of scope for this quick spike. - -### Links / references",2 -101152837,2022-01-24 14:19:44.538,Reintroduce minimal GitLab version warning," - -### Problem to solve - -There are currently two version-related checks that could cut down on our triage/support time: - -* [The README note](https://gitlab.com/gitlab-org/gitlab-vscode-extension#minimum-supported-version) - I have doubts that many people would install the extension, read this part of readme and double-check their GitLab instance version. -* [The Bug.md issue template](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/blob/main/.gitlab/issue_templates/Bug.md) - From my experience maybe 20% of bug reports use that template, the rest is people clicking ""New Issue"" and describing their problem in the description. - * I sometimes follow up and ask the issue creator to double-check their version but not always - -The checks that we have in place are (IMO) not successful at letting people know they are using an unsupported GitLab version (unless they use the two features specified in [feat: remove minimal version requirement in favour of per-feature checking](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/merge_requests/342)). - -### Proposal - -Reintroduce the minimal version check that we removed in https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/merge_requests/342 - -Set the minimum supported version to 13.0 - -### Further details - - - -### Links / references",1 -100379393,2022-01-10 17:33:00.840,No pipeline nor MR found for current branch,"### Summary - -I have been using the extension smoothly for many month but a few days ago it stopped properly linking the remote branch MRs and Pipelines. When I am on master/main it still works, but as soon as I switch to any other branch it stops showing the latest MR and pipeline status in the bottom bar. In the extension sidebar is stills shows the project merge requests though... I have uninstall and re-install, but this did not fix the issue. - -![image](/uploads/735c95a3d496e5a4e0d0d181ddb74feb/image.png) - -### Steps to reproduce - -See above - -### Relevant logs and/or screenshots - -Nothing particularly suspicious in the logs: -``` -[info]: Found https://gitlab.com in the PAT list and git remotes, using it as the instanceUrl -[info]: Found https://gitlab.com in the PAT list and git remotes, using it as the instanceUrl -[info]: Found https://gitlab.com in the PAT list and git remotes, using it as the instanceUrl -[info]: Found https://gitlab.com in the PAT list and git remotes, using it as the instanceUrl -[info]: Found https://gitlab.com in the PAT list and git remotes, using it as the instanceUrl -[info]: Found https://gitlab.com in the PAT list and git remotes, using it as the instanceUrl -[info]: Found https://gitlab.com in the PAT list and git remotes, using it as the instanceUrl -[info]: Found https://gitlab.com in the PAT list and git remotes, using it as the instanceUrl -[info]: Found https://gitlab.com in the PAT list and git remotes, using it as the instanceUrl -[info]: Found https://gitlab.com in the PAT list and git remotes, using it as the instanceUrl -[info]: Found https://gitlab.com in the PAT list and git remotes, using it as the instanceUrl -[info]: Found https://gitlab.com in the PAT list and git remotes, using it as the instanceUrl -[info]: Found https://gitlab.com in the PAT list and git remotes, using it as the instanceUrl -[info]: Found https://gitlab.com in the PAT list and git remotes, using it as the instanceUrl -[info]: Found https://gitlab.com in the PAT list and git remotes, using it as the instanceUrl -[info]: Found https://gitlab.com in the PAT list and git remotes, using it as the instanceUrl -[info]: Found https://gitlab.com in the PAT list and git remotes, using it as the instanceUrl -[info]: Found https://gitlab.com in the PAT list and git remotes, using it as the instanceUrl -[info]: Found https://gitlab.com in the PAT list and git remotes, using it as the instanceUrl -[info]: Found https://gitlab.com in the PAT list and git remotes, using it as the instanceUrl -```",1 -98682076,2021-12-08 16:32:01.060,Validate personal access token right after the user added it,"### Problem to solve - -Users can add a personal access token that is invalid or expired, or they make a typo when entering the instance URL. - -The extension will save this potentially incorrect pair (instance URL, token) and the user will find about the invalid token later when they try to use some of the extension functionality - -### Proposal - -Validate the token instantly after the user adds it. We can do that by calling `instanceUrl/api/v4/version` API endpoint. - -### Further details - -Thanks @pslaughter for suggesting this ~""type::feature"" - -### Links / references",1 -98158818,2021-11-30 09:19:39.223,Remote repositories not showing all files," - -### Checklist - - - -- [x] I'm using the latest version of the extension ([see the latest version in the right column of this page](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow)) - - Extension version: 3.38.1 -- [x] I'm using the latest VS Code version ([find the latest version here](https://github.com/microsoft/vscode/releases)) - - VS Code version: Latest insiders -- [x] I'm using a supported version of GitLab ([see README for the supported version](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/blob/main/README.md#minimum-supported-version)) - - GitLab version: happens on `gitlab.com` - -### Summary - -The extension loads a maximum of 20 files in the folder, if the folder has got more files/folders than that, the remote repository won't show them. - -| local repository | remote repository | -| ------ | ------ | -| ![image](/uploads/733d37a1fb933a419b18c9fec9444e50/image.png) | ![image](/uploads/746bbc525e2606ce3133d908404d65b1/image.png) | - - -### Steps to reproduce - -Open https://gitlab.com/gitlab-org/gitlab-vscode-extension as a remote repository, then open the `src/` folder. - -### What is the current *bug* behavior? - -The `src` folder has only 20 files. - -### What is the expected *correct* behavior? - -The `src` folder shows all the files - - -### Possible fixes - -We need to make sure we load all pages if the REST API result is paginated",1 -97260473,2021-11-12 19:20:44.596,Feature Request: Pipeline view does not show stages containing manually triggered jobs," There is no issue with a ""feature"" label as of submission time - -### Problem to solve - -As a developer using this feature to monitor pipelines for the projects I work on, some of the pipelines contain stages containing [manual jobs](https://docs.gitlab.com/ee/ci/jobs/job_control.html#create-a-job-that-must-be-run-manually). In the pipeline view for the extension, I do not see these stages nor can I manually trigger any of these jobs despite the stage containing these manual jobs also containing non-manual jobs. Being able to view and trigger these jobs would allow for me to do more pipeline management from within VS code without having to use the web API. - -### Proposal - -Extend the pipeline view to include viewing manual jobs and the ability to trigger them. - -### Further details - - -### Links / references",2 -96370440,2021-10-29 04:45:32.256,Extension ignores expired token and fails in the wrong place,"Original title: (*Open Active File on GitLab fails with Cannot read property 'webUrl' of null*) - -### Checklist - -- [x] I'm using the latest version of the extension 3.34.0 ([see the latest version in the right column of this page](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow)) - - Extension version: *Put your extension version here* -- [x] I'm using the latest VS Code version ([find the latest version here](https://github.com/microsoft/vscode/releases)) - - VS Code version: -Version: 1.61.2 -Commit: 6cba118ac49a1b88332f312a8f67186f7f3c1643 -Date: 2021-10-19T15:49:28.381Z -Electron: 13.5.1 -Chrome: 91.0.4472.164 -Node.js: 14.16.0 -V8: 9.1.269.39-electron.0 -OS: Darwin x64 20.6.0 -- [x] I'm using a supported version of GitLab ([see README for the supported version](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/blob/main/README.md#minimum-supported-version)) - - GitLab version: 14.4.0-ee -### Summary - -When I use the ""Open Active File on GitLab"" fails with Cannot read property 'webUrl' of null - -### Steps to reproduce - -Use an expired token to set up the extension. - -Open any file and execute the ""Open Active File on GitLab"" command. - -### What is the current *bug* behavior? - -Nothing happens. No error, no browser window opened. - -Before I updated it used to give this error: - -``` -Cannot read property 'webUrl' of null -TypeError: Cannot read property 'webUrl' of null -at getActiveFile (/Users/myusername/.vscode/extensions/gitlab.gitlab-workflow-3.33.0/out/src/openers.js:91:39) -at processTicksAndRejections (internal/process/task_queues.js:93:5) -at async openActiveFile (/Users/myusername/.vscode/extensions/gitlab.gitlab-workflow-3.33.0/out/src/openers.js:103:33) -at async /Users/myusername/.vscode/extensions/gitlab.gitlab-workflow-3.33.0/out/src/extension.js:36:9 -at async _executeContributedCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:94:110871) -``` - -### What is the expected *correct* behavior? - -It should open a browser window with the file I selected. - -### Relevant logs and/or screenshots - -It looks like my logs are empty.",1 -96137280,2021-10-26 07:16:33.326,Validate that instance URL starts with protocol,"### Problem to solve - -Currently, users can add GitLab instance URLs that do not start with the protocol. This can happen in both the `gitlab.instanceUrl` setting and the instance URL specified when adding token. - -This sometimes makes extension setup more confusing (e.g. #481). - - -### Proposal - -When the user adds a token, validate that the instance URL starts with a protocol (either `http://` or `https://`). - -When the extension notices a `gitlab.instanceUrl` setting, it warns user if the setting doesn't start with a protocol. - -### Further details - -This would work well with https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/issues/515 - - -### Links / references",1 -95823326,2021-10-20 20:52:38.144,request: support vscode browser based extension (vscode.dev)," - -### Problem to solve - - - -As a developer I want to open my web browser to https://vscode.dev/gitlab.mycorp.com/mygroup/myproject/-/merge_requests/3 and to be able to see the code/MR, so I can use vscode just by clicking a link - -### Proposal - - - -potentially make the extension support web extensions, at least partially - -https://code.visualstudio.com/api/extension-guides/web-extensions#update-existing-extensions-to-web-extensions - -### Further details - - - -If I have a lot of projects and merge requests get created, I'd rather be able to click a link to open an editor than open the editor, clone the repo, etc - -[remote-fs-url-format.md](docs/user/remote-fs-url-format.md) is cool, but can't seem to open up a merge request or use the plugin from that view - -`code --folder-uri 'gitlab-remote://gitlab.mycorp.com/myproject?project=35595&ref=master'` - -### Links / references",2 -95722138,2021-10-19 20:29:04.103,Pipeline status term mismatch: Succeeded,"## :speech_balloon: Term mismatch - -The VSCode extension uses the term **Succeeded** for pipelines and jobs that finished without errors or warnings (green check mark) in the sidebar. The extension also uses **Passed** for pipelines in the bottom status bar. Meanwhile, the GitLab platform just uses the term **Passed** (except for [MWPS](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html#merge-when-pipeline-succeeds)). - -| Current (extension) | [Reference](https://gitlab.com/KevSlashNull/empty-brackets-in-extension/-/pipelines/391382511) (in GitLab) | Expected (extension) | -| --- | --- | --- | -| ![image](/uploads/2f8faaee6f2cdda63eab1c63c278752a/image.png) | ![image](/uploads/2393c667199e5a3c4a8248232e585396/image.png) | ![image](/uploads/76257b292c3cbfec6bb641cabceb11f5/image.png) | - -| Status bar term | -| --- | -| ![image](/uploads/77ddf0e8b3f738dcd2938e147a6dfe3c/image.png) | - -## :bulb: Proposal - -Use the term **Passed** in the extension to be consistent with the UI text in the GitLab platform.",1 -95016920,2021-10-07 08:24:27.920,flaky test: Pipeline actions - creates new pipeline,"The test failed on master https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/jobs/1657306279, rerun fixed the pipeline. - -Failed assertion: https://gitlab.com/gitlab-org/gitlab-vscode-extension/blob/400425fb1819824b3455f8fce3c1ccb96f6bbe68/test/integration/pipeline_actions.test.js#L51 - -I assume that the new refreshing logic introduced in #60 refreshes more than once and the `calledOnce` assumption fails.",1 -92911576,2021-09-01 07:22:25.832,Helping users set the correct remote name,"### Problem to solve - -Currently, when user has got multiple remotes in the same repository (e.g. `origin` and `upstream`) the GitLab Workflow extension silently selects the (alphabetically) first one (`origin` in this example). - -Users can select remote to be used by setting the `gitlab.remoteName` (https://gitlab.com/gitlab-org/gitlab-vscode-extension#extension-settings). But that is not obvious to the user. - -### Proposal - -When we detect multiple remotes in the repository, we'll ask user which one they want to use and store it into the workspace settings (`gitlab.remoteName`) - -### Further details - - - -### Links / references - -- more context https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/issues/433#note_662047082",2 -92803258,2021-08-30 14:31:02.178,Can't access Issue detail from self-hosted gitlab (`Cannot read property 'full' of undefined`),"### Checklist - -- [X] I'm using the latest version of the extension - - Extension version: *v3.29.1* -- [X] I'm using the latest VS Code version - - VS Code version: *1.51.1* -- [X] I'm using a supported version of GitLab - - GitLab version: *14.2.1* - -### Summary - -I can see the list of issues associated with the current branch ![image](/uploads/2b208ecc8d687dbd0b2c778b1b236689/image.png) - -But when I click on one of those issue they just display ""Fetching issuable details and discussions. This may take a while."" - -This bug is similar to (#297) but the error message is different. - -### Steps to reproduce - - open VS Code - - go to the GitLab Workflow tab - - click on on of the issues associated with the current branch - -### What is the current *bug* behavior? - -It opens a tab with only ""Fetching issuable details and discussions. This may take a while."" - -### What is the expected *correct* behavior? - -To see the same thing that if I access the issue through ""Issues created by me"" - -### Relevant logs and/or screenshots - -The logs gives: -``` -Cannot read property 'full' of undefined -TypeError: Cannot read property 'full' of undefined - at getProjectPath (/home/pouxa/.vscode/extensions/gitlab.gitlab-workflow-3.29.1/out/src/gitlab/gitlab_new_service.js:67:58) - at GitLabNewService.getDiscussions (/home/pouxa/.vscode/extensions/gitlab.gitlab-workflow-3.29.1/out/src/gitlab/gitlab_new_service.js:235:29) - at GitLabNewService.getDiscussionsAndLabelEvents (/home/pouxa/.vscode/extensions/gitlab.gitlab-workflow-3.29.1/out/src/gitlab/gitlab_new_service.js:290:18) - at initPanelIfActive (/home/pouxa/.vscode/extensions/gitlab.gitlab-workflow-3.29.1/out/src/webview_controller.js:32:57) - at processTicksAndRejections (internal/process/task_queues.js:93:5) - at async WebviewController.create (/home/pouxa/.vscode/extensions/gitlab.gitlab-workflow-3.29.1/out/src/webview_controller.js:143:9) - at async WebviewController.open (/home/pouxa/.vscode/extensions/gitlab.gitlab-workflow-3.29.1/out/src/webview_controller.js:130:26) - at async /home/pouxa/.vscode/extensions/gitlab.gitlab-workflow-3.29.1/out/src/extension.js:35:9 - at async _executeContributedCommand (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:85:109243) - at async _executeContributedCommand (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:85:109243) -```",1 -92518812,2021-08-24 17:29:35.766,Optimize packaged extension,"[esbuild](https://github.com/evanw/esbuild) is an extremely fast JavaScript/TypeScript bundler. On my (admittedly powerful) PC, esbuild can bundle (and minify) this extension in ~40ms. - -The main advantage is a reduction in the number and size of files loaded by VSCode. Currently, the packaged extension contains ~3500 files: - -* `node_modules/` - ~2900 files -* `out/` - ~400 files -* `src/` - ~200 files - **these should be added to .vscodeignore**, since source files are not needed at runtime -* Miscellaneous other - 25 files - -Using esbuild can reduce the total file count to ~30 by bundling each entry point into a single file, thus eliminating `node_modules` and `out`. AFAIK, there are two entry points: main and webview. - -Removing `src` reduces the extension size by 2.2MB. Bundling the main entry point and eliminating `node_modules` and `out` reduces the extension size by 9MB. This is size of the files, after unpacking the extension from the .vsix/ZIP. This does not include the webview, because I'm not sure how to use esbuild with Vue. - -I am interested in submitting an MR.",2 -92093995,2021-08-17 08:50:09.893,Spike: Debug custom SSL Certificate issues,"### Summary - -The extension has issues connecting to instances that use a self-signed SSL certificate (not signed by a root authority included in `node`) (Epic: https://gitlab.com/groups/gitlab-org/-/epics/6244). The goal of this spike is to create a local environment where the server uses self-signed certificate. In this environment, we are going to test setting up the `gitlab.ca`, `gitlab.cert`, `gitlab.certKey`, and `gitlab.ingnoreCertificateErrors`. - -### Output of this spike: - -1. Documentation about the current support of self-signed certificates in the README - this will help users to set up their extension. If the extension doesn't support self-signed certificates, we'll document that. -1. Triage of existing issues in https://gitlab.com/groups/gitlab-org/-/epics/6244 -1. If `cross-fetch` (our library for making HTTPS requests) doesn't support self-signed SSL, this spike will document possible alternatives",2 -90519846,2021-07-19 20:01:53.257,Markdown renderer in Gitlab Workflow VSCode extension allows arbitrary HTML attributes on whitelisted elements,"**[HackerOne report #1261073](https://hackerone.com/reports/1261073)** by `arw9234` on 2021-07-14, assigned to GitLab Team: - -[Report](#report) | [Attachments](#attachments) | [How To Reproduce](#how-to-reproduce) - -## Report - -##### Summary - -I'm not sure whether something like this would be accepted without a larger impact, but I figured I should report it nonetheless. - -The Gitlab VSCode extension renders gitlab flavored markdown in a few places, mostly just in issues and merge requests. When doing so, it sends the markdown to be rendered to the connected Gitlab instance where it is processed server-side. However, the extension then [mutates the resulting HTML with regexes](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/blob/main/src/webview_controller.ts#L104) before incorporating it into the document using the following function: - -```ts -private createMessageHandler = ( - panel: vscode.WebviewPanel, - issuable: RestIssuable, - repositoryRoot: string, -) => async (message: any) => { - const instanceUrl = await getInstanceUrl(repositoryRoot); - if (message.command === 'renderMarkdown') { - let rendered = await gitLabService.renderMarkdown(message.markdown, repositoryRoot); // <--- clean HTML from server - rendered = (rendered || '') - .replace(/ src="".*"" alt/gim, ' alt') // <--- dangerous alteration of HTML with regexes - .replace(/"" data-src/gim, '"" src') - .replace(/ href=""\//gim, ` href=""${instanceUrl}/`); - - // ... -} -``` - -The above code attempts to remove/alter specific attributes within the resulting HTML. In particular, the `/ src="".*"" alt/gim` regex tries to remove `src` attributes followed by an `alt` attribute, but could be made to break out of quoted attributes or change the nesting order of elements. For example, the following HTML: -```html -
-``` -Will pass through Gitlab's markdown renderer relatively unchanged (`color`, `title`, and `alt` are [whitelisted on all elements](https://github.com/gjtorikian/html-pipeline/blob/v2.12.3/lib/html/pipeline/sanitization_filter.rb#L59), and `
` is a whitelisted element), but the ` src="" title="""" alt` sequence would then be matched and replaced by ` alt` with the above regex, resulting in: -```html -
-``` -Where the `someattr` attribute has broken out of the `alt` attribute and became part of the DOM. This allows for arbitrary HTML attributes to be added to any element whitelisted by the sanitization filter. - -This is limited, however, in that the affected frame is [using a nonce-based CSP](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/blob/main/src/webview/public/index.html#L5) that restricts inline event handlers and `javascript:` URIs. If it were possible to inject arbitrary HTML elements as well, it could be possible to inject `