-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the missing forward slash to run relative url #369
Add the missing forward slash to run relative url #369
Conversation
(looking at the test failure -- Edit: fixed) |
955ed8d
to
dd87c38
Compare
dd87c38
to
2c92a4e
Compare
@@ -43,7 +43,7 @@ | |||
<td class="stage-start"> | |||
<div class="cell-color"> | |||
<div class="cell-box"> | |||
<div class="jobName"><span class="badge"><a href="{{this.id}}">{{this.name}}</a></span></div> | |||
<div class="jobName"><span class="badge"><a href="{{#if this.id}}{{this.id}}/{{/if}}">{{this.name}}</a></span></div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of just doing "{{this.id}}/"
I have added the #if...
because in the test fixtures there are blanks expected;
pipeline-stage-view-plugin/ui/src/test/resources/view/pipeline_staged/render/expected.html
Line 50 in 296c306
<div class="jobName"><span class="badge"><a href="">#3</a></span></div> pipeline-stage-view-plugin/ui/src/test/resources/view/pipeline_staged/render/expected.html
Line 108 in 296c306
<div class="jobName"><span class="badge"><a href="">#2</a></span></div> pipeline-stage-view-plugin/ui/src/test/resources/view/pipeline_staged/render/expected.html
Line 163 in 296c306
<div class="jobName"><span class="badge"><a href="">#1</a></span></div>
I am not sure if it is correct or not; how the runId can be null or empty 🤔 while the run name is there..
I thought I would simply update the blank href to corresponding runIds, and also fix the fixture json files;
but then I wasn't sure if it was deliberately made like this..
@olamy please release, or better yet https://www.jenkins.io/doc/developer/publishing/releasing-cd/ |
A Run object URL in Jenkins should end with a forward slash. Pipeline stage view run object is not attaching the forward slash - Jenkins has a mechanism to automatically redirect from the non forward slash to with forward slash so it is not a visible problem to the user.
Redirection happening in Jenkins core
However as we can see it still wastes a network call.
This issue was found via the CBCI high availability controller we noticed it was flagged for builds currently in execution (these kind of cases are deliberately caught so to fix in the upstream source).
Fixing it in here would be the correct fix, as it also reduces one network call to the server.
Testing
Screenshots before and after
Submitter checklist