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

Fix jupyterlab downgrade issue on extension installation #15650

Merged
merged 1 commit into from Jan 30, 2024

Conversation

Sarthug99
Copy link
Contributor

@Sarthug99 Sarthug99 commented Jan 17, 2024

References

Fixes #15277

Code changes

Created a temporary constraint file using tempfile.NamedTemporaryFile. I obtained the current JupyterLab version and enforced it as a constraint. This constraint is then passed to the pip install command using the --constraint flag, so that any plugin installation is in line with the existing JupyterLab version.

User-facing changes

User won't face the issue of JupyterLab getting downgraded on installation of certain plugins, as was the case before.

Backwards-incompatible changes

Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

Copy link

welcome bot commented Jan 17, 2024

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@Sarthug99 Sarthug99 marked this pull request as draft January 17, 2024 08:08
@Sarthug99 Sarthug99 marked this pull request as ready for review January 17, 2024 08:10
@krassowski krassowski added the bug label Jan 17, 2024
@krassowski krassowski changed the title fixed jupyterlab downgrade issue on plugin installation #15277 Fix jupyterlab downgrade issue on extension installation Jan 17, 2024
@krassowski krassowski added this to the 4.0.x milestone Jan 17, 2024
@krassowski
Copy link
Member

@fcollonval can you help me out here, I did not catch why we need to use constrain here over just a requirement?

@jtpio jtpio requested a review from fcollonval January 26, 2024 12:16
@fcollonval
Copy link
Member

@fcollonval can you help me out here, I did not catch why we need to use constrain here over just a requirement?

in this specific case we could use a requirement. But what we want to achieve is actually add the extension as requirement with some constraints on the dependencies.

As stated in the documentation:

Constraints files are requirements files that only control which version of a requirement is installed, not whether it is installed or not.

So using a constraint is more aligned with the intent here.

Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

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

Thanks @Sarthug99

@krassowski krassowski merged commit 26677ad into jupyterlab:main Jan 30, 2024
80 of 81 checks passed
Copy link

welcome bot commented Jan 30, 2024

Congrats on your first merged pull request in this project! 🎉
congrats
Thank you for contributing, we are very proud of you! ❤️

@krassowski
Copy link
Member

@meeseeksdev please backport to 4.0.x

Copy link

lumberbot-app bot commented Jan 30, 2024

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 4.0.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 26677ad4e0654f5fc7627c44b3c4d98707bbd0b2
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #15650: Fix jupyterlab downgrade issue on extension installation'
  1. Push to a named branch:
git push YOURFORK 4.0.x:auto-backport-of-pr-15650-on-4.0.x
  1. Create a PR against branch 4.0.x, I would have named this PR:

"Backport PR #15650 on branch 4.0.x (Fix jupyterlab downgrade issue on extension installation)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

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

Successfully merging this pull request may close these issues.

Installing plugin results in jupyterlab version change after restart
3 participants