GitLab Connector (introduced in #37) fails to initialize it's configuration when user account lists repository with issues disabled in repository setting.
Steps to reproduce:
Given GitLab server "S" with User "U" create a new Mylyn GitLab Connector configuration "C" using User U's login/password or access token
Ensure user "U" has access to at least one GitLab Repository with "Issues" feature disabled:
Disable "Issues" feature in existing GitLab Repository
Create new GitLab Repository and disable "Issues" feature
In Mylyn Task Repositories view create a "New Query" for GitLab repository "C"
Expected Result
Query building screen is populated with values
It is possible to create a query
Actual Result
Query building screen is empty, no values are shown in "Projects" or "Groups" filters etc.
Error has been logged
!ENTRY org.eclipse.ui 4 0 2024-04-28 02:11:02.805
!MESSAGE Unhandled event loop exception
!STACK 0
java.util.concurrent.CompletionException: org.eclipse.mylyn.gitlab.core.GitlabException: Unexpected response from Gitlab REST server for '/api/v4/projects/45384114/milestones': Forbidden
at com.github.benmanes.caffeine.cache.LocalLoadingCache.lambda$newMappingFunction$3(LocalLoadingCache.java:190)
at com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$doComputeIfAbsent$14(BoundedLocalCache.java:2688)
at java.base/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1916)
at com.github.benmanes.caffeine.cache.BoundedLocalCache.doComputeIfAbsent(BoundedLocalCache.java:2686)
at com.github.benmanes.caffeine.cache.BoundedLocalCache.computeIfAbsent(BoundedLocalCache.java:2669)
at com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:112)
at com.github.benmanes.caffeine.cache.LocalLoadingCache.get(LocalLoadingCache.java:58)
at org.eclipse.mylyn.internal.gitlab.core.GitlabRepositoryConnector.getRepositoryConfiguration(GitlabRepositoryConnector.java:174)
at org.eclipse.mylyn.internal.gitlab.ui.GitlabConnectorUI.getQueryWizard(GitlabConnectorUI.java:61)
at org.eclipse.mylyn.internal.tasks.ui.actions.NewQueryAction.run(NewQueryAction.java:82)
at org.eclipse.mylyn.internal.tasks.ui.actions.NewQueryAction.run(NewQueryAction.java:58)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:239)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:581)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:415)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5855)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1529)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5065)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4517)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1042)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:152)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:639)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:546)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:651)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:588)
at org.eclipse.equinox.launcher.Main.run(Main.java:1459)
at org.eclipse.equinox.launcher.Main.main(Main.java:1432)
Caused by: org.eclipse.mylyn.gitlab.core.GitlabException: Unexpected response from Gitlab REST server for '/api/v4/projects/45384114/milestones': Forbidden
at org.eclipse.mylyn.internal.gitlab.core.GitlabOperation.validate(GitlabOperation.java:105)
at org.eclipse.mylyn.internal.gitlab.core.GitlabOperation.doValidate(GitlabOperation.java:94)
at org.eclipse.mylyn.internal.gitlab.core.GitlabOperation.processAndRelease(GitlabOperation.java:85)
at org.eclipse.mylyn.internal.gitlab.core.GitlabJSonArrayOperation.execute(GitlabJSonArrayOperation.java:54)
at org.eclipse.mylyn.internal.gitlab.core.GitlabJSonArrayOperation.execute(GitlabJSonArrayOperation.java:1)
at org.eclipse.mylyn.internal.gitlab.core.GitlabOperation.run(GitlabOperation.java:53)
at org.eclipse.mylyn.internal.gitlab.core.GitlabRestClient.getProjectMilestones(GitlabRestClient.java:1549)
at org.eclipse.mylyn.internal.gitlab.core.GitlabRestClient.getConfiguration(GitlabRestClient.java:1317)
at org.eclipse.mylyn.internal.gitlab.core.GitlabRepositoryConnector.lambda$2(GitlabRepositoryConnector.java:142)
at com.github.benmanes.caffeine.cache.LocalLoadingCache.lambda$newMappingFunction$3(LocalLoadingCache.java:183)
... 40 more
Turns out that GitLab responds with 403 Forbidden for GET /projects/:id/milestones in such case.
GitLab Connector (introduced in #37) fails to initialize it's configuration when user account lists repository with issues disabled in repository setting.
Steps to reproduce:
Expected Result
Actual Result
Turns out that GitLab responds with 403 Forbidden for
GET /projects/:id/milestones
in such case.