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 suddenly failing on main branch #830

Closed
dlqqq opened this issue Jun 12, 2024 · 5 comments
Closed

Check release suddenly failing on main branch #830

dlqqq opened this issue Jun 12, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@dlqqq
Copy link
Member

dlqqq commented Jun 12, 2024

Description

The check-release workflow is suddenly failing on the main branch after #826 was merged. #826 shouldn't have introduced any changes that cause this:

https://github.com/jupyterlab/jupyter-ai/actions/runs/9487573058/job/26144875409

The important error message seems to be:

RuntimeError: failed to build image pip, setuptools, wheel because:
Traceback (most recent call last):
  File
"/opt/pipx/venvs/hatch/lib/python3.11/site-packages/virtualenv/seed/embed/via_ap
p_data/via_app_data.py", line 54, in _install
    with parent.non_reentrant_lock_for_key(wheel_img.name):
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/contextlib.py",
line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File
"/opt/pipx/venvs/hatch/lib/python3.11/site-packages/virtualenv/util/lock.py",
line 142, in non_reentrant_lock_for_key
    with _CountedFileLock(str(self.path / f"{name}.lock")):
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File
"/opt/pipx/venvs/hatch/lib/python3.11/site-packages/virtualenv/util/lock.py",
line 22, in __init__
    super().__init__(lock_file)
TypeError: object.__init__() takes exactly one argument (the instance to
initialize)

Traceback (most recent call last):
  File
"/opt/pipx/venvs/hatch/lib/python3.11/site-packages/virtualenv/seed/embed/via_ap
p_data/via_app_data.py", line 54, in _install
    with parent.non_reentrant_lock_for_key(wheel_img.name):
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/contextlib.py",
line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File
"/opt/pipx/venvs/hatch/lib/python3.11/site-packages/virtualenv/util/lock.py",
line 142, in non_reentrant_lock_for_key
    with _CountedFileLock(str(self.path / f"{name}.lock")):
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File
"/opt/pipx/venvs/hatch/lib/python3.11/site-packages/virtualenv/util/lock.py",
line 22, in __init__
    super().__init__(lock_file)
TypeError: object.__init__() takes exactly one argument (the instance to
initialize)

Traceback (most recent call last):
  File
"/opt/pipx/venvs/hatch/lib/python3.11/site-packages/virtualenv/seed/embed/via_ap
p_data/via_app_data.py", line 54, in _install
    with parent.non_reentrant_lock_for_key(wheel_img.name):
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/contextlib.py",
line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File
"/opt/pipx/venvs/hatch/lib/python3.11/site-packages/virtualenv/util/lock.py",
line 142, in non_reentrant_lock_for_key
    with _CountedFileLock(str(self.path / f"{name}.lock")):
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File
"/opt/pipx/venvs/hatch/lib/python3.11/site-packages/virtualenv/util/lock.py",
line 22, in __init__
    super().__init__(lock_file)
TypeError: object.__init__() takes exactly one argument (the instance to
initialize)

Exception ignored in: <function BaseFileLock.__del__ at 0x7f7f8[648](https://github.com/jupyterlab/jupyter-ai/actions/runs/9487573058/job/26144875409#step:4:651)d3a0>
Traceback (most recent call last):
  File "/opt/pipx/venvs/hatch/lib/python3.11/site-packages/filelock/_api.py", line 365, in __del__
    self.release(force=True)
  File "/opt/pipx/venvs/hatch/lib/python3.11/site-packages/virtualenv/util/lock.py", line 34, in release
    with self.thread_safe:
         ^^^^^^^^^^^^^^^^
AttributeError: '_CountedFileLock' object has no attribute 'thread_safe'
Exception ignored in: <function BaseFileLock.__del__ at 0x7f7f8648d3a0>
Traceback (most recent call last):
  File "/opt/pipx/venvs/hatch/lib/python3.11/site-packages/filelock/_api.py", line 365, in __del__
    self.release(force=True)
  File "/opt/pipx/venvs/hatch/lib/python3.11/site-packages/virtualenv/util/lock.py", line 34, in release
    with self.thread_safe:
         ^^^^^^^^^^^^^^^^
AttributeError: '_CountedFileLock' object has no attribute 'thread_safe'
Exception ignored in: <function BaseFileLock.__del__ at 0x7f7f8648d3a0>
Traceback (most recent call last):
  File "/opt/pipx/venvs/hatch/lib/python3.11/site-packages/filelock/_api.py", line 365, in __del__
    self.release(force=True)
  File "/opt/pipx/venvs/hatch/lib/python3.11/site-packages/virtualenv/util/lock.py", line 34, in release
    with self.thread_safe:
         ^^^^^^^^^^^^^^^^
AttributeError: '_CountedFileLock' object has no attribute 'thread_safe'
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.9/x64/bin/jupyter-releaser", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/cli.py", line 121, in invoke
    super().invoke(ctx)
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/click/core.py", line 1[688](https://github.com/jupyterlab/jupyter-ai/actions/runs/9487573058/job/26144875409#step:4:691), in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.9/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.9/x64/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/cli.py", line 385, in bump_version
    lib.bump_version(
  File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/lib.py", line 28, in bump_version
    util.bump_version(version_spec, version_cmd=version_cmd, changelog_path=changelog_path)
  File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/util.py", line 351, in bump_version
    return get_version()
           ^^^^^^^^^^^^^
  File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/util.py", line 175, in get_version
    return run(cmd).split("\n")[-1]
           ^^^^^^^^
  File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/util.py", line 94, in run
    raise e
  File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/util.py", line 86, in run
    process = tee(cmd, **kwargs)
              ^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/tee.py", line 159, in run
    raise subprocess.CalledProcessError(
subprocess.CalledProcessError: Command 'hatch version' 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 "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/actions/prep_release.py", line 25, in <module>
    run_action("jupyter-releaser bump-version")
  File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/actions/common.py", line 25, in run_action
    _run(target, *args, **kwargs)
  File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/util.py", line 94, in run
    raise e
  File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/util.py", line 86, in run
    process = tee(cmd, **kwargs)
              ^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/_actions/jupyter-server/jupyter_releaser/v2/jupyter_releaser/tee.py", line 159, in run
    raise subprocess.CalledProcessError(
subprocess.CalledProcessError: Command 'jupyter-releaser bump-version' returned non-zero exit status 1.
@dlqqq dlqqq added the bug Something isn't working label Jun 12, 2024
@krassowski
Copy link
Member

We are seeing it across projects: tox-dev/filelock#337

@krassowski
Copy link
Member

Pinning filelock to <=3.14.0 might help. Not sure where to pin it though.

@dlqqq
Copy link
Member Author

dlqqq commented Jun 12, 2024

@krassowski Thank you so much for posting this lead. I would have never been able to find this myself. Let me see what I can do now, since I very much would like to do a release of Jupyter AI today.

@dlqqq
Copy link
Member Author

dlqqq commented Jun 12, 2024

Looks like filelock==3.14.0 was yanked. jupyter releaser prep-git && jupyter releaser bump-version works for me locally now. Re-running check-release on main to see if it passes now.

@dlqqq
Copy link
Member Author

dlqqq commented Jun 12, 2024

Looks like the re-run passed. Thank you @krassowski for the context! Closing this issue for now.

@dlqqq dlqqq closed this as completed Jun 12, 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

2 participants