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

workflow subscriptions when the hub user != uis user #679

Closed
oliver-sanders opened this issue May 19, 2021 · 3 comments · Fixed by #711
Closed

workflow subscriptions when the hub user != uis user #679

oliver-sanders opened this issue May 19, 2021 · 3 comments · Fixed by #711
Assignees
Labels
bug Something isn't working
Milestone

Comments

@oliver-sanders
Copy link
Member

oliver-sanders commented May 19, 2021

The user from the store is used to construct the workflow ID for the tree view subscription:

return `${this.user.username}|${this.workflowName}`

This is fine so long as the user viewing the UI is the same as the user running the workflow.

However, the user in the store is the authenticated user which may be different. We need to capture and store the workflow owner somewhere so it can be used for this purpose later.

Note that the Jupyter Server plan (cylc/cylc-uiserver#219) means that we cannot get the workflow owner from the URL as that would only work when the UIS is run via the hub and not when it is run standalone.

Ideas:

  1. We could add a User field to the GraphQL schema.
  2. We could add an owner field to the userprofile.

I may try (2) as part of cylc/cylc-uiserver#219 as it should be quick.

Pull requests welcome!
This is an Open Source project - please consider contributing a bug fix
yourself (please read CONTRIBUTING.md before starting any work though).

@oliver-sanders oliver-sanders added the bug Something isn't working label May 19, 2021
@oliver-sanders oliver-sanders added this to the 0.5.0 milestone May 19, 2021
@oliver-sanders oliver-sanders self-assigned this May 19, 2021
oliver-sanders added a commit to oliver-sanders/cylc-ui that referenced this issue May 19, 2021
* closes cylc#679
* the authenticated user is the one who is viewing the app
* the owner is the account under which the UIS is running
* if running the UIS as a standalone app the two are the same
* if spawning the UIS via a hub the two may differ
@oliver-sanders
Copy link
Member Author

update: Option (2) seems to work ok.

oliver-sanders added a commit to oliver-sanders/cylc-ui that referenced this issue May 21, 2021
* closes cylc#679
* the authenticated user is the one who is viewing the app
* the owner is the account under which the UIS is running
* if running the UIS as a standalone app the two are the same
* if spawning the UIS via a hub the two may differ
@oliver-sanders oliver-sanders modified the milestones: 0.5.0, 0.6.0 Jul 28, 2021
@kinow
Copy link
Member

kinow commented Aug 8, 2021

@oliver-sanders realized just now that #724 appears to be related to this issue? Let me know if that PR is unnecessary with this new owner field in the UIS. Or if that approach could still be used (happy to close that PR if it'd be better to use the owner attribute in some way).

@oliver-sanders oliver-sanders mentioned this issue Aug 9, 2021
6 tasks
@oliver-sanders
Copy link
Member Author

Sorry, I'm falling behind with reviewing at the moment, haven't got around to #724 yet.

The tricky thing with the Jupyter Server conversion is dealing with standalone UI servers that use token authentication rather than JupyterHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants