Assertion error if the local repository has a remote pointing to a local path
Summary
I installed GitLab Workflow extension, and when using it inside a repository that contains git remotes to local paths, it fails with an AssertionError
.
Steps to reproduce
Try to use GitLab Workflow with a git repository that already has git remotes to local paths.
In my case, one of the remote is pointing to a local repository copy located next to it in the parent folder:
Parent-Folder\
My-Repo <--- I am in this repo
Example-Repo <--- one of the git remote is pointing to this repo as "../Example-Repo"
What is the current bug behavior?
It results in AssertionError
and no feature of GitLab Workflow seems to work at all.
What is the expected correct behavior?
Either:
- parse local git remotes without errors
- error when parsing local git remote, but fail gracefully and let the extension continue to work while ignoring this remote
Relevant logs and/or screenshots
Found https://git.example.org in the PAT list and git remotes, using it as the instanceUrl
git remote "../Example-Repo" could not be parsed
AssertionError [ERR_ASSERTION]: git remote "../Example-Repo" could not be parsed
at WrappedRepository.getRemoteByName (/home/ubuntu/.vscode-server/extensions/gitlab.gitlab-workflow-3.23.3/out/src/git/wrapped_repository.js:74:9)
at WrappedRepository.get remote [as remote] (/home/ubuntu/.vscode-server/extensions/gitlab.gitlab-workflow-3.23.3/out/src/git/wrapped_repository.js:104:21)
at WrappedRepository.<anonymous> (/home/ubuntu/.vscode-server/extensions/gitlab.gitlab-workflow-3.23.3/out/src/git/wrapped_repository.js:80:53)
at Generator.next (<anonymous>)
at /home/ubuntu/.vscode-server/extensions/gitlab.gitlab-workflow-3.23.3/out/src/git/wrapped_repository.js:8:71
at new Promise (<anonymous>)
at __awaiter (/home/ubuntu/.vscode-server/extensions/gitlab.gitlab-workflow-3.23.3/out/src/git/wrapped_repository.js:4:12)
at WrappedRepository.getProject (/home/ubuntu/.vscode-server/extensions/gitlab.gitlab-workflow-3.23.3/out/src/git/wrapped_repository.js:78:16)
at /home/ubuntu/.vscode-server/extensions/gitlab.gitlab-workflow-3.23.3/out/src/data_providers/issuable.js:25:30
at Generator.next (<anonymous>)
at /home/ubuntu/.vscode-server/extensions/gitlab.gitlab-workflow-3.23.3/out/src/data_providers/issuable.js:8:71
at new Promise (<anonymous>)
at __awaiter (/home/ubuntu/.vscode-server/extensions/gitlab.gitlab-workflow-3.23.3/out/src/data_providers/issuable.js:4:12)
at /home/ubuntu/.vscode-server/extensions/gitlab.gitlab-workflow-3.23.3/out/src/data_providers/issuable.js:24:110
at Array.map (<anonymous>)
at /home/ubuntu/.vscode-server/extensions/gitlab.gitlab-workflow-3.23.3/out/src/data_providers/issuable.js:24:90
at Generator.next (<anonymous>)
at /home/ubuntu/.vscode-server/extensions/gitlab.gitlab-workflow-3.23.3/out/src/data_providers/issuable.js:8:71
at new Promise (<anonymous>)
at __awaiter (/home/ubuntu/.vscode-server/extensions/gitlab.gitlab-workflow-3.23.3/out/src/data_providers/issuable.js:4:12)
at getAllGitlabRepositories (/home/ubuntu/.vscode-server/extensions/gitlab.gitlab-workflow-3.23.3/out/src/data_providers/issuable.js:23:12)
at DataProvider.<anonymous> (/home/ubuntu/.vscode-server/extensions/gitlab.gitlab-workflow-3.23.3/out/src/data_providers/issuable.js:49:38)
at Generator.next (<anonymous>)
at /home/ubuntu/.vscode-server/extensions/gitlab.gitlab-workflow-3.23.3/out/src/data_providers/issuable.js:8:71
at new Promise (<anonymous>)
at __awaiter (/home/ubuntu/.vscode-server/extensions/gitlab.gitlab-workflow-3.23.3/out/src/data_providers/issuable.js:4:12)
at DataProvider.getChildren (/home/ubuntu/.vscode-server/extensions/gitlab.gitlab-workflow-3.23.3/out/src/data_providers/issuable.js:39:16)
at m.fetchChildrenNodes (/home/ubuntu/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48/out/vs/server/remoteExtensionHostProcess.js:84:61525)
at m.getChildren (/home/ubuntu/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48/out/vs/server/remoteExtensionHostProcess.js:84:58131)
at c.$getChildren (/home/ubuntu/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48/out/vs/server/remoteExtensionHostProcess.js:84:54977)
at d._doInvokeHandler (/home/ubuntu/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48/out/vs/server/remoteExtensionHostProcess.js:88:12815)
at d._invokeHandler (/home/ubuntu/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48/out/vs/server/remoteExtensionHostProcess.js:88:12507)
at d._receiveRequest (/home/ubuntu/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48/out/vs/server/remoteExtensionHostProcess.js:88:11160)
at d._receiveOneMessage (/home/ubuntu/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48/out/vs/server/remoteExtensionHostProcess.js:88:10155)
at /home/ubuntu/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48/out/vs/server/remoteExtensionHostProcess.js:88:8064
at l.fire (/home/ubuntu/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48/out/vs/server/remoteExtensionHostProcess.js:57:1835)
at E.fire (/home/ubuntu/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48/out/vs/server/remoteExtensionHostProcess.js:65:15634)
at /home/ubuntu/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48/out/vs/server/remoteExtensionHostProcess.js:103:29816
at l.fire (/home/ubuntu/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48/out/vs/server/remoteExtensionHostProcess.js:57:1835)
at E.fire (/home/ubuntu/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48/out/vs/server/remoteExtensionHostProcess.js:65:15634)
at t._receiveMessage (/home/ubuntu/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48/out/vs/server/remoteExtensionHostProcess.js:65:20892)
at /home/ubuntu/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48/out/vs/server/remoteExtensionHostProcess.js:65:17778
at l.fire (/home/ubuntu/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48/out/vs/server/remoteExtensionHostProcess.js:57:1835)
at c.acceptChunk (/home/ubuntu/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48/out/vs/server/remoteExtensionHostProcess.js:65:12995)
at /home/ubuntu/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48/out/vs/server/remoteExtensionHostProcess.js:65:12343
at l.fire (/home/ubuntu/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48/out/vs/server/remoteExtensionHostProcess.js:57:1835)
at /home/ubuntu/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48/out/vs/server/remoteExtensionHostProcess.js:103:19093
at afterWrite (internal/streams/writable.js:466:5)
at onwrite (internal/streams/writable.js:446:7)
at InflateRaw.afterTransform (internal/streams/transform.js:103:3)
at Zlib.processCallback (zlib.js:586:8)
Possible fixes
N/A