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

Jupyter server #711

Merged
merged 1 commit into from
Aug 31, 2021
Merged

Jupyter server #711

merged 1 commit into from
Aug 31, 2021

Conversation

oliver-sanders
Copy link
Member

@oliver-sanders oliver-sanders commented Jul 29, 2021

jupyter_server: support Cylc UIS Jupyter Server extension

Requirements check-list

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Does not need tests (why?).
  • Appropriate change log entry included.
  • Docs: architecture reference docs cylc-doc#285

@oliver-sanders
Copy link
Member Author

Rebased onto 0.6.0

@codecov-commenter
Copy link

codecov-commenter commented Aug 2, 2021

Codecov Report

Merging #711 (ed64bb4) into master (a973097) will decrease coverage by 0.01%.
The diff coverage is 90.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #711      +/-   ##
==========================================
- Coverage   90.41%   90.39%   -0.02%     
==========================================
  Files          83       83              
  Lines        1575     1583       +8     
  Branches      105      105              
==========================================
+ Hits         1424     1431       +7     
- Misses        121      122       +1     
  Partials       30       30              
Flag Coverage Δ
e2e 77.82% <90.90%> (+0.04%) ⬆️
unittests 80.33% <45.45%> (-0.33%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/graphql/graphiql.js 53.33% <ø> (ø)
src/graphql/index.js 96.55% <85.71%> (-3.45%) ⬇️
src/mixins/graphql.js 100.00% <100.00%> (ø)
src/model/User.model.js 100.00% <100.00%> (ø)
src/services/user.service.js 100.00% <100.00%> (ø)

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 a973097...ed64bb4. Read the comment docs.

@kinow
Copy link
Member

kinow commented Aug 13, 2021

Ready for review @oliver-sanders ?

@oliver-sanders
Copy link
Member Author

Sorry, getting behind, yep I think so.

Copy link
Member

@kinow kinow left a comment

Choose a reason for hiding this comment

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

Looks good @oliver-sanders ! Couple comments, but no blockers.

The endpoint is now cylc/#/ rather than #/

Just checking, but I think it didn't require any change in Cylc UI since it (VueRouter) is only responsible for the part after /#/? Thanks! 👍

@@ -46,7 +46,7 @@ describe('GraphQL mixin', () => {
})
const variables = component.vm.variables
const expected = {
workflowId: `${user.username}|${workflowName}`
workflowId: `${user.owner}|${workflowName}`
Copy link
Member

Choose a reason for hiding this comment

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

With this I think this PR supersedes #724

this.username = username
this.groups = groups
this.created = created
this.admin = admin
this.server = server
this.server = server || '?' // server can be unset
Copy link
Member

Choose a reason for hiding this comment

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

Could we just leave it blank? Or is the ? necessary or used elsewhere?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think I made this change because I was getting undefined errors from somewhere in the code.

Copy link
Member

Choose a reason for hiding this comment

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

Quite sure this can be removed @oliver-sanders . Maybe it was the unit test that failed when it was undefined?

From what I recall, I used this server in the past to craft the GraphQL endpoint URL. But then we ran into problems after a user reported s/he couldn't get /extra-path/users/blabla/#/ to work, and then I stopped using server and used the window.location to create the URL.

Only reason the value is still saved, I think, is because it's returned from the JupyterHub REST service, so no harm in leaving it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah that might have been it, will take a look...

@oliver-sanders
Copy link
Member Author

Just checking, but I think it didn't require any change in Cylc UI since it (VueRouter) is only responsible for the part after /#/? Thanks! +1

I started this branch a few months back and had to rebase it recently, I think it's smaller now thanks to other UI improvements (like the URL creation thinggy) 👍 so this is probably outdated now.

* cylc/cylc-uiserver#230
* The UIS is now a Jupyter Server extension.
* The endpoint is now `cylc/#/` rather than `#/`
* Authentication via token/cookie is now supported.
* Sets XSRF header to support new hubless single-user mode.
@oliver-sanders
Copy link
Member Author

Rebased and fixed GraphiQL.

Copy link
Contributor

@datamel datamel left a comment

Choose a reason for hiding this comment

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

Works smoothly for me.

@datamel datamel merged commit 3938fc4 into cylc:master Aug 31, 2021
@oliver-sanders oliver-sanders deleted the jupyter-server branch August 31, 2021 09:24
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.

workflow subscriptions when the hub user != uis user
4 participants