Skip to content
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

Fix 404 after jupyterhub 1.0.0 #39

Merged
merged 1 commit into from
May 10, 2019
Merged

Fix 404 after jupyterhub 1.0.0 #39

merged 1 commit into from
May 10, 2019

Conversation

kinow
Copy link
Member

@kinow kinow commented May 10, 2019

Finally found a way to fix this one. Tested locally.

It worked before when the button was pointing to /user/$USER/ with the trailing slash. Now it copies the behaviour of jupyterhub's AddSlashHandler.

@kinow kinow self-assigned this May 10, 2019
@kinow
Copy link
Member Author

kinow commented May 10, 2019

And later if we keep using JupyterHub as a dependency in the ui server (there is work-in-progress that may eliminate that dependency by @MartinRyan), we can remove our implementation and simply import theirs.

@codecov-io
Copy link

Codecov Report

Merging #39 into master will decrease coverage by 0.78%.
The diff coverage is 76.92%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #39      +/-   ##
==========================================
- Coverage   68.13%   67.34%   -0.79%     
==========================================
  Files           2        2              
  Lines          91       98       +7     
  Branches        6        6              
==========================================
+ Hits           62       66       +4     
- Misses         29       32       +3
Impacted Files Coverage Δ
cylc_singleuser.py 67.5% <100%> (ø) ⬆️
handlers.py 67.24% <72.72%> (-1.39%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8e089e8...f6fd952. Read the comment docs.

Copy link
Member

@dwsutherland dwsutherland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dwsutherland dwsutherland merged commit ef1ccd4 into cylc:master May 10, 2019
Copy link
Collaborator

@sadielbartholomew sadielbartholomew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @kinow, I am too late to the game on this one as I see it has already been merged, buy FYI & for future, there is a useful Tornado decorator, @tornado.web.addslash, which will automatically add in a / to the URL if not present.

(I discovered it & used it in my recent work for a Rose service (PR metomi/rose#2288 if you are interested, see https://github.com/metomi/rose/blob/2dd607f6ca8ed251c2559265a9e58a7fed2fe9f0/lib/python/rosie/ws.py#L166-L168.)

This is a neat custom solution for the problem though!

@kinow
Copy link
Member Author

kinow commented May 10, 2019

I think that worked @sadielbartholomew ! Much simpler, thanks!

@kinow kinow added this to the 0.1 milestone Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants