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

Only upgrade jupyterhub in user env when upgrading tljh, ensure pip>=23.1.2 in user env #890

Conversation

consideRatio
Copy link
Member

@consideRatio consideRatio commented May 13, 2023

  • Closes Proposal to minimize what TLJH installs in the user environment #872 with a compromise: to not upgrade things in the user environment besides whats truly essential but still install misc things by default on the initial setup. This translates to upgrading jupyterhub based on the hub env specification which should make them match to the latest jupyterhub within the version constraints.

Additional changes

  • hub env will always get pip upgraded to latest, user env will get it upgraded to latest if pip is below 23.1.2
  • extracted inlined dependencies to a requirements-hub-env.txt file
  • added lower bounds to requirements-hub-env.txt to help users understand what they at least have installed from version control
  • refactored a section to improve readability

tljh/installer.py Outdated Show resolved Hide resolved
tljh/installer.py Outdated Show resolved Hide resolved
@consideRatio
Copy link
Member Author

consideRatio commented May 16, 2023

From live meeting chat with input from Min and Simon

  • We should pip install pip>=(current latest) in both hub env and user env.

EDIT: I did pip install --upgrade pip in hub env, but pip install pip>=23.1.2 in user env.

@consideRatio consideRatio force-pushed the pr/only-upgrade-whats-unconditionally-required branch 3 times, most recently from 27323ab to 36a78ca Compare May 18, 2023 15:09
@consideRatio consideRatio force-pushed the pr/only-upgrade-whats-unconditionally-required branch from b5a9215 to 5683e52 Compare May 18, 2023 21:55
@consideRatio consideRatio force-pushed the pr/only-upgrade-whats-unconditionally-required branch from 9727e3a to 21312b2 Compare May 18, 2023 21:56
@consideRatio consideRatio changed the title Only upgrade jupyterhub in user env when upgrading tljh Only upgrade jupyterhub in user env when upgrading tljh, ensure pip>=23.1.2 in user env May 18, 2023
@consideRatio
Copy link
Member Author

@minrk @manics modified the git history of this PR to make it a bit more slimmed and easy to follow after trying some things and going back on them.

I've updated the title and PR description to reflect this.

Note that it was messy to inspect the hub env as we install the hub env after user env, and that we have unit test for ensure_user_environment function that runs without assumptions on a hub env. So, I went for pip install --upgrade <jupyterhub version constraint from hub env requirements file> instead.

Copy link
Member

@minrk minrk left a comment

Choose a reason for hiding this comment

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

Looks sensible to me. I don't love parsing the jupyterhub requirement with such a strict pattern, but I understand it.

If we impose restrictions on e.g. jupyter-server version in the user env, I'm not sure where that would go.

@consideRatio consideRatio merged commit c6c3c96 into jupyterhub:main May 22, 2023
10 checks passed
@consideRatio consideRatio self-assigned this Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal to minimize what TLJH installs in the user environment
3 participants