Invalid error message about Unregistered Server Reopened
markperdue opened this issue · 3 comments
Jenkins and plugins versions report
Cloudbees CI Managed Controller 2.319.3.4-rolling
Bitbucket Branch Source Plugin 746.v350d2781c184 (currently latest in Cloudbees but doesn't seem to be latest in this repo)
What Operating System are you using (both controller, and any agents involved in the problem)?
Tenant controller running within CJOC in EKS k8s v1.21
Reproduction steps
- Delete any existing Bitbucket endpoints from global Jenkins controller configuration
- Add a single Bitbucket Server entry
- Save changes
- Create a new Multibranch Pipeline job
- From Branch Sources select Bitbucket
Expected Results
- Bitbucket Server entry is selected by default
- No error message related to 'Unregistered Server' is displayed
Actual Results
- Bitbucket Server entry is selected by default
- Error message related to 'Unregistered Server' is displayed
Anything else?
This is very related to #416 but the accepted fix there is for DSL pipelines. The 'bug' still exists through the default user-facing flow when using the UI.
Even with the error message displayed, the job does still work like as mentioned in #416 but it would be nice if the error message wasn't displayed. Some of our developers that don't manage the instance see the error message and take it at surface level that something is not working.
What might be a tip on what's going on here is the following addl repo steps:
-
Delete any existing Bitbucket endpoints from global Jenkins controller configuration
-
Add a Bitbucket Cloud entry
-
Save changes
-
Create a new Multibranch Pipeline job
-
From Branch Sources select Bitbucket
-
Bitbucket Cloud is selected by default and no error is displayed
-
Using dropdown select Bitbucket server entry from step 3
-
Bitbucket server entry displays as expected without any errors unlike the earlier steps.
The best guess I have at this without digging into code is that the initially selected value from choosing Bitbucket for Branch Sources isn't properly reading what is loaded into the list. This can sort of be seen by watching the network traffic as mentioned in #416 (comment)
e.g. The initially selected Bitbucket server passes an empty value to http://<jenkins-host>/job/<job>/descriptorByName/com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource/checkServerUrl?value=
. When selecting a secondary item in the server list, the value is properly read and included in the request parameter. When the initial value is a Bitbucket Cloud server, no error is displayed. When I add the Bitbucket Server entry that causes problems as the only Bitbucket server option, the error is displayed but the error goes away when that same server is not the default-selected server in the dropdown.
Hi, I got the same issue, Any progress?