gitlab-branch-source-plugin icon indicating copy to clipboard operation
gitlab-branch-source-plugin copied to clipboard

Owner is neither a user/group/subgroup

Open julianxhokaxhiu opened this issue 2 years ago • 15 comments

Jenkins and plugins versions report

Environment
Jenkins: 2.344
OS: Linux - 5.4.172-90.336.amzn2.x86_64
---
Office-365-Connector:4.16.1
PrioritySorter:4.1.0
ace-editor:1.1
active-directory:2.25.1
ansicolor:1.0.1
ant:475.vf34069fef73c
antisamy-markup-formatter:2.7
apache-httpcomponents-client-4-api:4.5.13-1.0
artifactory:3.16.2
authentication-tokens:1.4
authorize-project:1.4.0
basic-branch-build-strategies:1.3.2
blueocean:1.25.3
blueocean-autofavorite:1.2.5
blueocean-bitbucket-pipeline:1.25.3
blueocean-commons:1.25.3
blueocean-config:1.25.3
blueocean-core-js:1.25.3
blueocean-dashboard:1.25.3
blueocean-display-url:2.4.1
blueocean-events:1.25.3
blueocean-git-pipeline:1.25.3
blueocean-github-pipeline:1.25.3
blueocean-i18n:1.25.3
blueocean-jwt:1.25.3
blueocean-personalization:1.25.3
blueocean-pipeline-api-impl:1.25.3
blueocean-pipeline-editor:1.25.3
blueocean-pipeline-scm-api:1.25.3
blueocean-rest:1.25.3
blueocean-rest-impl:1.25.3
blueocean-web:1.25.3
bootstrap4-api:4.6.0-4
bootstrap5-api:5.1.3-6
bouncycastle-api:2.26
branch-api:2.1046.v0ca_37783ecc5
caffeine-api:2.9.2-29.v717aac953ff3
checks-api:1.7.3
cloudbees-bitbucket-branch-source:765.v5a_2d6a_23c01d
cloudbees-disk-usage-simple:0.10
cloudbees-folder:6.714.v79e858ef76a_2
command-launcher:1.6
config-file-provider:3.9.0
configuration-as-code:1429.v09b_044a_c93de
credentials:1126.ve05618c41e62
credentials-binding:523.vd859a_4b_122e6
display-url-api:2.3.6
dtkit-api:3.0.0
durable-task:496.va67c6f9eefa7
echarts-api:5.3.2-1
envinject:2.854.vfa_1657078c97
envinject-api:1.199.v3ce31253ed13
extended-read-permission:3.2
favorite:2.4.1
font-awesome-api:6.0.0-1
git:4.11.1
git-client:3.11.0
git-server:1.10
github:1.34.3
github-api:1.303-400.v35c2d8258028
github-branch-source:1598.v91207e9f9b_4a_
gitlab-api:5.0.1-69.vcdc19e779072
gitlab-branch-source:625.v85cf3a_400cfe
gradle:1.38
groovy:2.4
handlebars:3.0.8
handy-uri-templates-2-api:2.1.8-22.v77d5b_75e6953
hashicorp-vault-plugin:336.v182c0fbaaeb7
hidden-parameter:0.0.4
htmlpublisher:1.30
ivy:2.1
jackson2-api:2.13.2.20220328-273.v11d70a_b_a_1a_52
javadoc:217.v905b_86277a_2a_
javax-activation-api:1.2.0-2
javax-mail-api:1.6.2-5
jaxb:2.3.0.1
jdk-tool:1.5
jenkins-design-language:1.25.3
jersey2-api:2.35-7
jjwt-api:0.11.2-9.c8b45b8bb173
job-dsl:1.79
jquery3-api:3.6.0-3
jsch:0.1.55.2
junit:1.60
kubernetes:3580.v78271e5631dc
kubernetes-client-api:5.12.1-187.v577c3e368fb_6
kubernetes-credentials:0.9.0
lockable-resources:2.14
mailer:408.vd726a_1130320
matrix-auth:3.1.1
matrix-project:758.v7a_ea_491852f3
maven-plugin:3.18
metrics:4.1.6.2
momentjs:1.1.1
okhttp-api:4.9.3-105.vb96869f8ac3a
parameterized-scheduler:1.0
pipeline-build-step:2.18
pipeline-graph-analysis:195.v5812d95a_a_2f9
pipeline-input-step:448.v37cea_9a_10a_70
pipeline-milestone-step:101.vd572fef9d926
pipeline-model-api:2.2077.vc78ec45162f1
pipeline-model-definition:2.2077.vc78ec45162f1
pipeline-model-extensions:2.2077.vc78ec45162f1
pipeline-rest-api:2.24
pipeline-stage-step:293.v200037eefcd5
pipeline-stage-tags-metadata:2.2077.vc78ec45162f1
pipeline-stage-view:2.24
plain-credentials:1.8
plugin-util-api:2.16.0
popper-api:1.16.1-3
popper2-api:2.11.5-1
prometheus:2.0.11
pubsub-light:1.16
resource-disposer:0.19
scm-api:602.v6a_81757a_31d2
script-security:1158.v7c1b_73a_69a_08
snakeyaml-api:1.30.1
sse-gateway:1.25
ssh-credentials:1.19
ssh-slaves:1.814.vc82988f54b_10
sshd:3.228.v4c9f9e652c86
structs:318.va_f3ccb_729b_71
token-macro:293.v283932a_0a_b_49
trilead-api:1.57.v6e90e07157e1
uno-choice:2.6.1
variant:1.4
windows-slaves:1.8
workflow-aggregator:2.7
workflow-api:1144.v61c3180fa_03f
workflow-basic-steps:948.v2c72a_091b_b_68
workflow-cps:2687.v3f09155513c1
workflow-cps-global-lib:570.v21311f4951f8
workflow-durable-task-step:1130.v8fd69d0b_8857
workflow-job:1180.v04c4e75dce43
workflow-multibranch:712.vc169a_1387405
workflow-scm-step:399.v9b_8f4da_65061
workflow-step-api:625.vd896b_f445a_f8
workflow-support:819.v37d707a_71d9b_
ws-cleanup:0.42
xunit:3.0.6

What Operating System are you using (both controller, and any agents involved in the problem)?

Controller: Linux Agents: N/A ( issue happens on the controller )

Reproduction steps

  1. Install Jenkins
  2. Install gitlab-branch-source 1.5.9
  3. Add a workspace and set as owner the group name in Gitlab
  4. Scan the workspace
  5. Upgrade gitlab-branch-source to 625.v85cf3a_400cfe
  6. Scan the workspace again

Expected Results

The workspace is scanned successfully.

Actual Results

[Mon Apr 25 18:26:54 CEST 2022] Starting organization scan...
[Mon Apr 25 18:26:54 CEST 2022] Updating actions...
[Mon Apr 25 18:26:55 CEST 2022] Finished organization scan. Scan took 0.83 sec
FATAL: Failed to recompute children of REDACTED
java.lang.IllegalStateException: Owner 'REDACTED' is neither a user/group/subgroup
	at io.jenkins.plugins.gitlabbranchsource.helpers.GitLabOwner.fetchOwner(GitLabOwner.java:39)
	at io.jenkins.plugins.gitlabbranchsource.GitLabSCMNavigator.getGitlabOwner(GitLabSCMNavigator.java:201)
	at io.jenkins.plugins.gitlabbranchsource.GitLabSCMNavigator.getGitlabOwner(GitLabSCMNavigator.java:194)
	at io.jenkins.plugins.gitlabbranchsource.GitLabSCMNavigator.retrieveActions(GitLabSCMNavigator.java:390)
	at jenkins.scm.api.SCMNavigator.fetchActions(SCMNavigator.java:332)
	at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:487)
	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:278)
	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:166)
	at jenkins.branch.OrganizationFolder$OrganizationScan.run(OrganizationFolder.java:918)
	at hudson.model.ResourceController.execute(ResourceController.java:101)
	at hudson.model.Executor.run(Executor.java:442)
Finished: FAILURE

Anything else?

The group name used to work fine until v1.5.9. Then any other version after this one now fails with the error written above.

I think the main culprit of this change is this commit which bumps the Gitlab API plugin: https://github.com/jenkinsci/gitlab-branch-source-plugin/commit/76ac293ca978f4b5374ee52bc02021735e6ed76c

julianxhokaxhiu avatar Apr 26 '22 08:04 julianxhokaxhiu