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

Consider where/when to use frozen environments #857

Open
minrk opened this issue Mar 21, 2023 · 1 comment
Open

Consider where/when to use frozen environments #857

minrk opened this issue Mar 21, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@minrk
Copy link
Member

minrk commented Mar 21, 2023

Proposed change

I think we should probably use frozen environments for the bootstrap step.
We've learned from experience on Binder that pinning only direct dependencies is the absolute best way to ensure broken environments. Right now, tljh has a few loose pins (not exact versions), which are likely to work for much longer, but as soon as they start rejecting the latest version (i.e. as soon as the pin has any effect at all), it is likely to start breaking things.

We can use conda-lock and/or pip-compile (they are hard to combine, unfortunately). Installing from lockfile (especially for conda) can also be quite a bit quicker, because there's no dependency-solve step, and ensures a stable, reliable starting point for the bootstrap.

Alternative options

Don't do this, and make sure the pins we use are:

  1. loose (e.g. major versions only)
  2. only applied where required
  3. frequently updated, and always point to a 'currently supported' version of every pinned package

Who would use this feature?

Maintainers, because stabilising the bootstrap versions reduces pressure to keep things always updated, as updates are opt-in. Users,

(Optional): Suggest a solution

Move package specifications from bootstrap into a file. If we still need to include them in bootstrap for single-file installation, run the standard freeze step and then include the frozen spec in a generated block in bootstrap.py.

@minrk minrk added the enhancement New feature or request label Mar 21, 2023
@consideRatio
Copy link
Member

I think we should probably use frozen environments for the bootstrap step.

A bit confused about the environments, is my understanding correct that you consider the "hub environment" to be setup using a frozen environment, and there are the following environments?

  • "os environment" running the bootstrap script
  • "hub environment" setup by the bootstrap script with virtualenv provided by apt-get install python3 python3-venv python3-pip, running jupyterhub and tljh.installer
  • "user environment" setup by the tljh.installer, running user servers and software

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants