Bug 1169838

Summary: job page is broken when visiting /jobs/<id>/ instead of /jobs/<id>
Product: [Retired] Beaker Reporter: PaulB <pbunyan>
Component: web UIAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.18CC: bpeck, dcallagh, dowang, ebaak, jburke, pbunyan, rjoost
Target Milestone: 23.0Keywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-07 23:12:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1263917    
Bug Blocks:    
Attachments:
Description Flags
Beaker_BZ1169838 none

Description PaulB 2014-12-02 14:45:08 UTC
Description of problem:
 Selecting "Show Results" in web UI displays "Internal error".

Version-Release number of selected component (if applicable):
 Beaker 0.18.4 

How reproducible:
 Unknown

Steps to Reproduce:
1. Look at the following job:
   https://beaker.engineering.redhat.com/jobs/801440/
2. Click on display results for any of the three recipes.
  
Actual results:
 See attached pic

Expected results:
 The recipe task results displayed.

Additional info:

Comment 1 PaulB 2014-12-02 14:46:40 UTC
Created attachment 963771 [details]
Beaker_BZ1169838

Comment 2 Dan Callaghan 2014-12-02 23:13:31 UTC
Paul, the problem is with the URL you are visiting. It has a trailing slash.

https://beaker.engineering.redhat.com/jobs/801440/

If you remove the trailing slash it will work:

https://beaker.engineering.redhat.com/jobs/801440

This is the same as bug 1019860. TurboGears will happily serve up the same page either with or without a trailing slash, but relative links will be broken in one case or the other. In this case it is the relative URLs for the AJAX results loading. Flask handles this better by redirecting to the trailing slash URL if appropriate.

Comment 3 Nick Coghlan 2014-12-03 08:09:46 UTC
Dan, assuming the results reporting update happens for Beaker 20, I'm guessing this will be converted to Flask at that point?

Comment 4 PaulB 2014-12-03 13:45:53 UTC
(In reply to Dan Callaghan from comment #2)
> Paul, the problem is with the URL you are visiting. It has a trailing slash.
> 
> https://beaker.engineering.redhat.com/jobs/801440/
> 
> If you remove the trailing slash it will work:
> 
> https://beaker.engineering.redhat.com/jobs/801440
> 
> This is the same as bug 1019860. TurboGears will happily serve up the same
> page either with or without a trailing slash, but relative links will be
> broken in one case or the other. In this case it is the relative URLs for
> the AJAX results loading. Flask handles this better by redirecting to the
> trailing slash URL if appropriate.

Apologies - Dan :/

Thank you for the explanation.

Best,
-pbunyan

Comment 5 Dan Callaghan 2015-11-13 04:25:26 UTC
This is "fixed" by the new job page implementation in bug 1263917, in the sense that accidentally visiting /jobs/1234/ (with trailing slash) will give you a 404 page.

Comment 8 Dan Callaghan 2016-04-07 22:37:55 UTC
(In reply to wangdong from comment #7)

Ahhh that's an unintended consequence of the user pref we put in for opting out of the new job page. We are going to need to add some code to explicitly handle this I think, since this new behaviour is even worse than the original problem described in comment 2.

Comment 9 Dan Callaghan 2016-04-18 01:59:16 UTC
http://gerrit.beaker-project.org/4814

Comment 12 Dan Callaghan 2016-07-07 23:12:09 UTC
Beaker 23.0 has been released.