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

Check release & publish release workflow errors #42

Closed
Rmarieta opened this issue Aug 17, 2023 · 7 comments
Closed

Check release & publish release workflow errors #42

Rmarieta opened this issue Aug 17, 2023 · 7 comments
Labels
bug Something isn't working maintenance Change related to maintenance of the repository

Comments

@Rmarieta
Copy link

Description

Could not find any related issues despite getting this error with the most simple extension and after the first commit. My issue is that some of the workflows are failing with errors that seem a bit strange to me. The error that interrupts both the Populate Release step of the Step 2: Publish Release workflow and the Check Release of the Check Release workflow is the following :

...
npm notice === Tarball Details ===
npm notice name:          releasetest
npm notice version:       0.1.1
npm notice filename:      releasetest-0.1.1.tgz
npm notice package size:  4.3 kB
npm notice unpacked size: 11.7 kB
npm notice shasum:        a0e9f2b30fd7526837dd7e3ad359125de3316641
npm notice integrity:     sha512-GKXIuibxBSRAr[...]O+H2SEBPnV85g==
npm notice total files:   8
npm notice
releasetest-0.1.1.tgz
stderr:
 npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/runner/work/jupyterlab-test-release/jupyterlab-test-release/.jupyter_releaser_checkout/dist/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/runner/work/jupyterlab-test-release/jupyterlab-test-release/.jupyter_releaser_checkout/dist/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
...

To explore whether that could be caused by my extension in itself, I created a new empty extension with the last version of JupyterLab, and created a new public GitHub repository to host that extension, and ended up with the same error. The Check Release and Step 2: Publish Release workflows are both still failing with the same error.

Reproduce

  1. Create new public GitHub repository
  2. Create new extension and seed the project with the template :
conda create -n release-test --override-channels --strict-channel-priority -c conda-forge -c nodefaults jupyterlab=4 nodejs=18 git copier jinja2-time
conda activate release-test
mkdir release-test
cd release-test
copier copy --UNSAFE https://github.com/jupyterlab/extension-template .
pip install -ve .
jupyter labextension develop . --overwrite
  1. Push code to GitHub repository :
git init
git add .
git commit -m "First commit"
git branch -M main
git remote add origin https://github.com/<path-to-repo>.git
git push -u origin main
  1. Then this triggers the Check Release workflow. Set up job, Checkout and Base Setup pass but Check Release does not. Full log can be seen at : GitHub Actions job link.
  2. If I now also try to manually trigger both Step 1: Prep Release and Step 2: Publish Release by providing my ADMIN_GITHUB_TOKEN, NPM_TOKEN and PYPI_TOKEN in my secrets, I also get the same error during the Step 2: Publish Release workflow.

Expected behavior

I would expect the template extension Check Release and Step 2: Publish Release workflows to pass without errors if I haven't modified the source code of my extension yet.

Context

  • Operating System and version: Windows 11
  • Browser and version: Chrome 115.0
  • JupyterLab version: 4.0.5 (but I get the same with 4.0.1)
Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here.
You may want to sanitize the paths in the output.
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here, if applicable.
@Rmarieta Rmarieta added the bug Something isn't working label Aug 17, 2023
@JasonWeill JasonWeill added the maintenance Change related to maintenance of the repository label Aug 22, 2023
@welcome
Copy link

welcome bot commented Aug 24, 2023

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@jtpio jtpio transferred this issue from jupyterlab/jupyterlab Aug 24, 2023
@jtpio
Copy link
Member

jtpio commented Aug 24, 2023

Thanks @Rmarieta for reporting 👍

Looks like this will be fixed by jupyter-server/jupyter_releaser#522.

@jtpio
Copy link
Member

jtpio commented Aug 24, 2023

Actually the issue might be related to the workspaces entry in package.json:

"workspaces": [
"ui-tests"
],{% endif %}

@Rmarieta would you be able to try without the workspaces field in package.json to see if it fixes the check release?

@Rmarieta
Copy link
Author

I just tried removing the workspaces field and the check release still does not complete, but this time with a different error (see the full log here on my repository) :

...
➤ YN0000: ┌ Resolution step
Resolution step
  ➤ YN0002: │ @jupyterlab/services@npm:7.0.5 doesn't provide react (p4d970), requested by @jupyterlab/settingregistry
  ➤ YN0002: │ @jupyterlab/testutils@npm:4.0.5 doesn't provide typescript (pd72c2), requested by @jupyterlab/testing
  ➤ YN0002: │ releasetest@workspace:. doesn't provide webpack (p371b1), requested by css-loader
  ➤ YN0002: │ releasetest@workspace:. doesn't provide webpack (p47c78), requested by source-map-loader
  ➤ YN0002: │ releasetest@workspace:. doesn't provide webpack (p14490), requested by style-loader
  ➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 0s 402ms
➤ YN0000: ┌ Post-resolution validation
Post-resolution validation
  ➤ YN0028: │ The lockfile would have been modified by this install, which is explicitly forbidden.
➤ YN0000: └ Completed
➤ YN0000: Failed with errors in 0s 515ms
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.4/x64/bin/jupyter-releaser", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/jupyter_releaser/cli.py", line 119, in invoke
    util.run(hook)
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/jupyter_releaser/util.py", line 94, in run
    raise e
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/jupyter_releaser/util.py", line 86, in run
    process = tee(cmd, **kwargs)
              ^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/jupyter_releaser/tee.py", line 159, in run
    raise subprocess.CalledProcessError(
subprocess.CalledProcessError: Command 'jlpm' returned non-zero exit status 1.
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/jupyter_releaser/actions/populate_release.py", line 38, in <module>
    run_action("jupyter-releaser build-npm")
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/jupyter_releaser/actions/common.py", line 25, in run_action
    _run(target, *args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/jupyter_releaser/util.py", line 94, in run
    raise e
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/jupyter_releaser/util.py", line 86, in run
    process = tee(cmd, **kwargs)
              ^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/jupyter_releaser/tee.py", line 159, in run
    raise subprocess.CalledProcessError(
subprocess.CalledProcessError: Command 'jupyter-releaser build-npm' returned non-zero exit status 1.

@jtpio
Copy link
Member

jtpio commented Aug 24, 2023

➤ YN0028: │ The lockfile would have been modified by this install, which is explicitly forbidden.

This time it looks like the yarn.lock file changes on CI.

You can try to run jlpm locally and it will likely modify that yarn.lock file. Then commit and push the changes.

@krassowski
Copy link
Member

If there are no changes locally, you may also want to ensure that you use the JupyterLab and Node.js version as on the CI. I am not sure if a different operating system could also have an impact.

@Rmarieta
Copy link
Author

➤ YN0028: │ The lockfile would have been modified by this install, which is explicitly forbidden.

This time it looks like the yarn.lock file changes on CI.

You can try to run jlpm locally and it will likely modify that yarn.lock file. Then commit and push the changes.

It worked, thank you for your help !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working maintenance Change related to maintenance of the repository
Projects
None yet
Development

No branches or pull requests

4 participants