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 fails on PRs against forks #550

Open
krassowski opened this issue Feb 1, 2024 · 0 comments
Open

check_release fails on PRs against forks #550

krassowski opened this issue Feb 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@krassowski
Copy link
Collaborator

A common workflow is to create a PR against one's own fork first to avoid generating noise and burdening the main CI queue (or just to get the CI time earlier). This has recently became really annoying on JupyterLab because on every commit check_release fails due to a check introduced with provenance compatibility.
Could we automatically detect if a running on a non-detached fork (e.g. using GitHub's API on action level and pass it down to the script) so that this check can be skipped?

Extracting 101 packages...
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.7/x64/bin/jupyter-releaser", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/jupyter_releaser/cli.py", line 121, in invoke
    super().invoke(ctx)
  File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/jupyter_releaser/cli.py", line 521, in check_npm
    npm.check_dist(dist_dir, npm_install_options, repo)
  File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/jupyter_releaser/npm.py", line 127, in check_dist
    names = extract_dist(dist_dir, staging, repo)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/jupyter_releaser/npm.py", line 90, in extract_dist
    raise ValueError(msg)
ValueError: package.json for '@jupyterlab/application' does not define a 'repository.url' matching the cloned repository 'krassowski/jupyterlab'.
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.7/x64/lib/python3.11/site-packages/jupyter_releaser/actions/populate_release.py", line 39, in <module>
    run_action("jupyter-releaser check-npm")
  File "/opt/hostedtoolcache/Python/3.11.7/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.7/x64/lib/python3.11/site-packages/jupyter_releaser/util.py", line 94, in run
    raise e
  File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/jupyter_releaser/util.py", line 86, in run
    process = tee(cmd, **kwargs)
              ^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/jupyter_releaser/tee.py", line 159, in run
    raise subprocess.CalledProcessError(
subprocess.CalledProcessError: Command 'jupyter-releaser check-npm' returned non-zero exit status 1.
@krassowski krassowski added the bug Something isn't working label Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant