Closed uhafner closed 5 months ago
🤔 I assume that removing BlueOcean would solve the URL problem, but can't be sure. We might want to try on release.ci or infra.ci.
This is a good point that you make given the state of BlueOcean. (Personnaly it will be hard for me to not have Blue Ocean. The Jenkins "classic" UI is barely usable for viewing pipelines but maybe I should start learning to use the pipeline graph view from Tim).
Pipeline graph is very much WIP and really needs someone with more time to look into it.
blueocean had a whole team of people to build it...
Personally I use the Blue Ocean view a lot still...
I have no idea how to setup the URL of the GitHub checks, in the scenario of "keeping BlueOcean". Where should I look? (e.g. is it the "check" plugin, or th" github check" plugin, or "github" or jenkins management page, or something else)
Seems to be configurable with the JENKINS_DISPLAYURL_PROVIDER
environment variable or the jenkins.displayurl.provider
Java property: JENKINS-41578, https://github.com/jenkinsci/display-url-api-plugin/pull/7, https://github.com/jenkinsci/display-url-api-plugin/blob/f306dd90f7aa7117a446adbc116e0b9693a54d84/src/main/java/org/jenkinsci/plugins/displayurlapi/DisplayURLProvider.java#L178-L184
The implementation rereads the property every time, so if you call System.setProperty('jenkins.displayurl.provider', 'org.jenkinsci.plugins.displayurlapi.ClassicDisplayURLProvider')
in the script console, then that should take effect immediately. Unless the HTTP redirect response is cached somewhere.
I think this should probably be discussed on the mailing list.
+1 from me for changing the default from Blue Ocean to the standard UI. I almost always switch from Blue Ocean to the standard UI, so this would save me a click. I still do use Blue Ocean occasionally when I need to read the console log of a build with parallel stages, so I do not think we should remove the Blue Ocean plugin yet.
Delaying this issue due to not enough bandwidth.
We've not seen any "no" answer (here and mailing list). Since this change is revertable, we'll proceed to apply it.
Change appplied successfully (and automatically) on ci.jenkins.io. Many thanks @smerle33 .
Check: https://github.com/jenkins-infra/pipeline-library/runs/6349066600 => click on the link View more details on ci.jenkins.io
redirects to https://ci.jenkins.io/job/Infra/job/pipeline-library/job/master/255/ which is the classic UI.
Huh, that link doesn't even redirect; rather, it points directly to the classic UI. So if this change is ever reverted, then these links on GitHub will keep pointing to the classic UI.
the GitHub links will still use the display/redirect url.
Which depending on the instance setting and the per user setting will redirect to either blue ocean, pipeline graph view or classic
There is no display/redirect
suffix at https://github.com/jenkins-infra/pipeline-library/runs/6349066600:
<a class="text-small color-fg-muted" target="_blank" rel="noopener noreferrer" data-hydro-click="{"event_type":"check_suite.external_click","payload":{"check_suite_id":6426637249,"check_run_id":6349066600,"link_url":"https://ci.jenkins.io/job/Infra/job/pipeline-library/job/master/255/","link_text":"View more details on","originating_url":"https://github.com/jenkins-infra/pipeline-library/runs/6349066600","user_id":46201428}}" data-hydro-click-hmac="9b597c7bbadefda29921b5c3f227af3ad4cdd0cb1fb15a127f82b04226817337" href="https://ci.jenkins.io/job/Infra/job/pipeline-library/job/master/255/">
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external mr-2">
<path fill-rule="evenodd" d="M10.604 1h4.146a.25.25 0 01.25.25v4.146a.25.25 0 01-.427.177L13.03 4.03 9.28 7.78a.75.75 0 01-1.06-1.06l3.75-3.75-1.543-1.543A.25.25 0 0110.604 1zM3.75 2A1.75 1.75 0 002 3.75v8.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 12.25v-3.5a.75.75 0 00-1.5 0v3.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-8.5a.25.25 0 01.25-.25h3.5a.75.75 0 000-1.5h-3.5z"></path>
</svg>View more details on ci.jenkins.io
</a>
Interesting you're right.
something is wrong here.
I set my preferences to be blue ocean and I didn't get sent there. =/
It might be best to revert this for now, and file a bug on display-url-api-plugin
DisplayURLProvider.DisplayURLProviderImpl (source) overrides methods to append DISPLAY_POSTFIX = "display/redirect", and classes like RunDisplayAction (source) then call AbstractDisplayAction.lookupProvider(StaplerRequest) (source) to choose the provider that selects the redirect URL. But if the jenkins.displayurl.provider property points to org.jenkinsci.plugins.displayurlapi.ClassicDisplayURLProvider (source), then DisplayURLProvider.DisplayURLProviderImpl is not used and does not get a chance to add DISPLAY_POSTFIX.
@KalleOlaviNiemitalo do you mind opening an issue on the plugin tracker?
@dduportal I don't currently have an instance in which I could safely verify the incorrect behavior.
@dduportal I don't currently have an instance in which I could safely verify the incorrect behavior.
Fair, but I have no idea which plugin, which tracker it is (I'm not a Java developer) so I need your help on this to at least open the issue in the correct location
I'm not really a Java developer either 😉 Anyway, I filed https://issues.jenkins.io/browse/JENKINS-69006 now.
@dduportal , if I'm reading the source correctly, this is a regression in Display URL API 2.3.4, but older versions would keep the display/redirect
suffixes even if you configure -Djenkins.displayurl.provider=org.jenkinsci.plugins.displayurlapi.ClassicDisplayURLProvider
. Is it possible to downgrade to 2.3.3 in ci.jenkins.io? I guess that would cause dependency problems and complicate future security patching….
@dduportal , if I'm reading the source correctly, this is a regression in Display URL API 2.3.4, but older versions would keep the
display/redirect
suffixes even if you configure-Djenkins.displayurl.provider=org.jenkinsci.plugins.displayurlapi.ClassicDisplayURLProvider
. Is it possible to downgrade to 2.3.3 in ci.jenkins.io? I guess that would cause dependency problems and complicate future security patching….
Many thanks for checking! Alas downgrading a plugin in the context of ci.jenkins.io could create stability issues. Let's wait for the fix instead
FYI the issue that prevented this change was fixed in https://github.com/jenkinsci/display-url-api-plugin/releases/tag/display-url-api-2.3.9
this fix did not help for me, neither any of the provided workarounds. Any other ideas? its quite annoying
this fix did not help for me, neither any of the provided workarounds. Any other ideas? its quite annoying
Can you explain steps to reproduce?
As I'd like these display/redirect
links to redirect to the main build pages instead of the pipeline graph views, I tried again, checking first by changing only my user settings, then by temporarily changing the default notification URL setting of infra.ci.jenkins.io (private instance) from "default" to "Jenkins Classic":
Using the following redirect link as example: https://infra.ci.jenkins.io/job/kubernetes-jobs/job/kubernetes-management/job/main/34726/display/redirect
Here are the redirections depending on the setting value:
(I've reverted infra.ci.jenkins.io to its original setting value after the check)
As it now works as intended, I propose to set default notification URL on ~all instances~ ci.jenkins.io, infra.ci.jenkins.io and weekly.ci.jenkins.io to "Jenkins Classic", any objection?
+1 from me
+1
+1
Change applied on infra.ci.jenkins.io and weekly.ci.jenkins.io but rollbacked on ci.jenkins.io as I encountered the following error:
Deferring issue to the 2024-06-11 milestone, time for Jay to get ready around JCasc.
Update:
Update:
ci.jenkins.io is also set up with the specified setting: we can close.
Congrats @jayfranco999 on your first finished issue!
Service(s)
ci.jenkins.io
Summary
All our plugin builds on ci.jenkins.io use GitHub checks to report builds results directly in pull requests. The checks provide a details URL in the pull request to directly navigate to the results in Jenkins. Currently, the display URL of the Jenkins instance is shown here. However, this details URL currently is configured to show the Blue Ocean view in Jenkins rather than the classic Jenkins view. Can you please change that so that the Blue Ocean view is not shown by default anymore. (In my opinion we can remove Blue Ocean totally, as this project has been abandoned years ago.)
(And yes: I know that I can customize the URL when logged in. But this is the main entry point for PR contributors and they should actually see Jenkins without logging in by using the current version without struggling with the deprecated Blue Ocean views.)
Reproduction steps
Example: