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

Do not hard-code the deployment form URL #6

Closed
krassowski opened this issue Sep 30, 2024 · 1 comment
Closed

Do not hard-code the deployment form URL #6

krassowski opened this issue Sep 30, 2024 · 1 comment
Labels
needs: triage 🚦 Someone needs to have a look at this issue and triage

Comments

@krassowski
Copy link
Member

Context

The form URL is currently hard-coded in:

if (currentNotebookPath !== '') {
deployUrl = `/services/japps/create-app?filepath=${encodeURIComponent(currentNotebookPath)}`;
} else {
deployUrl = '/services/japps/create-app';
}

Value and/or benefit

To alleviate the concerns about potentially blocking releases when jhub-apps changes its routes, we could instead establish a contract with jhub-apps that it populates the form URL in pageConfig or in the settings with URL that this extension then reads.

For context, JupyterHub itself adds to pageConfig here - this hook would need to be extended on the jhub-apps side if we go with page config approach. Then this extension would read it like this:

import { PageConfig } from '@jupyterlab/coreutils';
// ...
PageConfig.getOption('deploymentFormUrl')

Alternatively we could:

  • use JSON settings and populate them in nebari (not so great as it couples it with nebari!)
  • add a configuration URL endpoint in jhub-apps that shares mapping to public API URLs (this feels like an overkill)

Or:

  • we could decide that this URL is safe enough and jhub-apps could mark it as a stable API (which will only change with enough heads up to adopt this extension),
  • we could merge this repo into jhub-apps repo to develop in a monorepo
    • that would be potentially harder to maintain as copier allows us to keep this repo in sync with the template easier when it is standalone

Anything else?

CC @aktech

@krassowski krassowski added the needs: triage 🚦 Someone needs to have a look at this issue and triage label Sep 30, 2024
@krassowski
Copy link
Member Author

Closing as solved in #12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: triage 🚦 Someone needs to have a look at this issue and triage
Projects
None yet
Development

No branches or pull requests

1 participant