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 CI #221

Merged
merged 10 commits into from
Dec 12, 2023
Merged

Fix CI #221

merged 10 commits into from
Dec 12, 2023

Conversation

davidbrochart
Copy link
Collaborator

@davidbrochart davidbrochart commented Dec 11, 2023

It seems that the CI is broken:

error This project's package.json defines "packageManager": "[email protected]". However the current global version of Yarn is 1.22.21.

Presence of the "packageManager" field indicates that the project is meant to be used with Corepack, a tool included by default with all official Node.js distributions starting from 16.9 and 14.19.
Corepack must currently be enabled by running corepack enable in your terminal. For more information, check out https://yarnpkg.com/corepack.

Any idea why Yarn v1 is installed instead of v3?

@davidbrochart davidbrochart marked this pull request as draft December 11, 2023 09:53
Copy link
Contributor

Binder 👈 Launch a Binder on branch davidbrochart/jupyter_collaboration/test

@trungleduc
Copy link
Member

you can remove the "packageManager" field in the package,json file

@davidbrochart
Copy link
Collaborator Author

Thanks @trungleduc, that seems to have solved the issue. I'll investigate the next issues.

@davidbrochart
Copy link
Collaborator Author

If I commit the changes to yarn.lock reported here, it fails.
Any idea? Otherwise I am going to merge.

@krassowski
Copy link
Member

This is the typescript patch applied by yarn. If you change yarn version (directly or by changing updating some jupyterlab versions, e.g. from 4.0 to 4.1.0a4 which changes yarn pin in jlpm) a different patch version gets used leading to this problem. See jupyterlab/jupyterlab#15503

@krassowski
Copy link
Member

So you basically need to ensure that your local environment and CI use the same yarn/jlpm/jupyterlab version.

@davidbrochart
Copy link
Collaborator Author

Thanks @krassowski.
I tried to have the same environment with pixi add nodejs=18 yarn=1.22 pip python=3.11, but pip install -e ".[test]" doesn't update yarn.lock locally.

@krassowski
Copy link
Member

What about exact jupyterlab version?

@krassowski
Copy link
Member

Wait, it fails on pip install --pre -e ".[test]" (emphasis on --pre) so that must be pulling JupyterLab 4.1.0a4, so this is exactly the issue jupyterlab/jupyterlab#15503

@davidbrochart
Copy link
Collaborator Author

davidbrochart commented Dec 12, 2023

I don't know, hatch requires jupyterlab>=4.0.0 but how can I know the exact version in the CI?

@davidbrochart
Copy link
Collaborator Author

Wait, it fails on pip install --pre -e ".[test]" (emphasis on --pre) so that must be pulling JupyterLab 4.1.0a4, so this is exactly the issue jupyterlab/jupyterlab#15503

Ah ok, so it seems that the solution was to merge the yarn.lock changes (jupyter/notebook#7170). I tried that in baf7ac1 and it also fails.

@krassowski
Copy link
Member

Yes, you get the failure in different jobs. With the old patch version you get failure in Tests / Test Prereleases which uses pip install --pre -e ".[test]" (with --pre) and with the new patch version you get a failure in all other jobs as these use pip install -e ".[test]" (without --pre).

This is like super silly yarn/ts situation which keeps going for like four years now? In every other yarn release they have a PR like yarnpkg/berry#5916 which just pull the latest version of microsoft/TypeScript#35206 after re-basing on latest.

@davidbrochart
Copy link
Collaborator Author

Thanks @krassowski, that was indeed the issue. I removed --pre and now tests pass 👍

@davidbrochart davidbrochart merged commit 7ae9c62 into jupyterlab:main Dec 12, 2023
20 checks passed
@martinRenou
Copy link
Member

meeseeksdev please backport to 1.x

Copy link

lumberbot-app bot commented Dec 19, 2023

Awww, sorry martinRenou you do not seem to be allowed to do that, please ask a repository maintainer.

@davidbrochart
Copy link
Collaborator Author

meeseeksdev please backport to 1.x

Copy link

lumberbot-app bot commented Dec 19, 2023

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 1.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 7ae9c62d3b6b4dd3a4615091d74b924a2bc55467
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #221: Fix CI'
  1. Push to a named branch:
git push YOURFORK 1.x:auto-backport-of-pr-221-on-1.x
  1. Create a PR against branch 1.x, I would have named this PR:

"Backport PR #221 on branch 1.x (Fix CI)"

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.

martinRenou pushed a commit to martinRenou/jupyter-collaboration that referenced this pull request Dec 19, 2023
* Remove packageManager entry

* Fix for Python 3.12

* Remove use of pytest-asyncio

* Fix mypy

* Re-enable Python 3.11

* Don't test win/py3.12

* Fix URLs in package.json

* Update yarn.lock

* Revert previous commit

* Remove pip --pre
davidbrochart added a commit that referenced this pull request Dec 19, 2023
* Fix CI (#221)

* Remove packageManager entry

* Fix for Python 3.12

* Remove use of pytest-asyncio

* Fix mypy

* Re-enable Python 3.11

* Don't test win/py3.12

* Fix URLs in package.json

* Update yarn.lock

* Revert previous commit

* Remove pip --pre

* Missing hub command

* Issue while cherry picking

* Fix

* Switch to gh

* Fix pip install cmd

---------

Co-authored-by: David Brochart <[email protected]>
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.

4 participants