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

[Issue] Docs failing after benchmarking #47

Open
andgoldschmidt opened this issue Aug 7, 2024 · 2 comments
Open

[Issue] Docs failing after benchmarking #47

andgoldschmidt opened this issue Aug 7, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@andgoldschmidt
Copy link
Owner

The most recent build of docs failed after PR #46, with the warning:

We encountered a problem with a command while building your project. To resolve this error, double check your project configuration and installed dependencies are correct and have not changed recently.

@andgoldschmidt andgoldschmidt added the bug Something isn't working label Aug 7, 2024
@Jacob-Stevens-Haas
Copy link
Collaborator

Interesting. It looks like there was a problem when IPython imported typing_extensions.

I can try to reproduce locally in a fresh environment, but this is odd, as it doesn't appear related to anything changed by the PR.

@Jacob-Stevens-Haas
Copy link
Collaborator

Jacob-Stevens-Haas commented Aug 26, 2024

Did a bit more investigating. I can't reproduce, even with Ubuntu 22.04, python 3.9.19, poetry 1.2.1. Instead, I get the following error on the "poetry install -E docs":

Poetry error -- DBus... freedesktop secrets?
(env) jmsh@kutz-Lambda-Matrix:~/github/derivative$ poetry install -E docs -v
Using virtualenv: /home/jmsh/github/derivative/env
Updating dependencies
Resolving dependencies... (0.1s)

  DBusErrorResponse

  [org.freedesktop.DBus.Error.UnknownMethod] ('Object does not exist at path “/org/freedesktop/secrets/collection/login”',)

  at env/lib/python3.9/site-packages/secretstorage/util.py:48 in send_and_get_reply
       44│     def send_and_get_reply(self, msg: Message) -> Any:
       45│         try:
       46│             resp_msg: Message = self._connection.send_and_get_reply(msg)
       47│             if resp_msg.header.message_type == MessageType.error:
    →  48│                 raise DBusErrorResponse(resp_msg)
       49│             return resp_msg.body
       50│         except DBusErrorResponse as resp:
       51│             if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT):
       52│                 raise ItemNotFoundException('Item does not exist!') from resp

The following error occurred when trying to handle this error:


  ItemNotFoundException

  Item does not exist!

  at env/lib/python3.9/site-packages/secretstorage/util.py:52 in send_and_get_reply
       48│                 raise DBusErrorResponse(resp_msg)
       49│             return resp_msg.body
       50│         except DBusErrorResponse as resp:
       51│             if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT):
    →  52│                 raise ItemNotFoundException('Item does not exist!') from resp
       53│             elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED,
       54│                                DBUS_NO_REPLY):
       55│                 data = resp.data
       56│                 if isinstance(data, tuple):

The following error occurred when trying to handle this error:


  PromptDismissedException

  Prompt dismissed.

  at env/lib/python3.9/site-packages/secretstorage/collection.py:159 in create_collection
      155│     if len(collection_path) > 1:
      156│         return Collection(connection, collection_path, session=session)
      157│     dismissed, result = exec_prompt(connection, prompt)
      158│     if dismissed:
    → 159│         raise PromptDismissedException('Prompt dismissed.')
      160│     signature, collection_path = result
      161│     assert signature == 'o'
      162│     return Collection(connection, collection_path, session=session)
      163│

The following error occurred when trying to handle this error:


  InitError

  Failed to create the collection: Prompt dismissed..

  at env/lib/python3.9/site-packages/keyring/backends/SecretService.py:64 in get_preferred_collection
       60│                 collection = secretstorage.Collection(bus, self.preferred_collection)
       61│             else:
       62│                 collection = secretstorage.get_default_collection(bus)
       63│         except exceptions.SecretStorageException as e:
    →  64│             raise InitError(f"Failed to create the collection: {e}.") from e
       65│         if collection.is_locked():
       66│             collection.unlock()
       67│             if collection.is_locked():  # User dismissed the prompt
       68│                 raise KeyringLocked("Failed to unlock the collection!")

Bumping the poetry version helps. Also, it looks like the crux of the matter was IPython's import of typing_extensions. Ipython changed their build process more recently than 8.18.1, which was used in the failed build. BUT, it wasn't directly required... it was likely required by ipykernel, which we have pinned to 5.x series.

Differences between passing and failing builds:
(env) jmsh@kutz-Lambda-Matrix:~/github/derivative$ diff pass.txt fail.txt
8c8
<   • Installing exceptiongroup (1.2.1)
---
>   • Installing exceptiongroup (1.2.2)
12d11
<   • Installing importlib-resources (6.4.0)
22c21
<   • Installing matplotlib (3.9.1)
---
>   • Installing matplotlib (3.9.0)
34c33
<   • Installing pure-eval (0.2.2)
---
>   • Installing pure-eval (0.2.3)
37c36
<   • Installing pyzmq (26.0.3)
---
>   • Installing pyzmq (26.1.0)
46d44
<   • Installing typing-extensions (4.12.2)
49,51c47,48
<   • Updating importlib-metadata (4.13.0 -> 7.2.1)
<   • Updating platformdirs (2.6.2 -> 4.2.2)
<   • Updating sphinx (7.3.7 -> 5.3.0)
---
>   • Updating importlib-metadata (8.0.0 -> 7.2.1)
>   • Updating sphinx (7.4.7 -> 5.3.0)

So TL;DR is that this is some weird build dependency issue that is unrelated to benchmarking. Perhaps there's a compound of problems: ipython 8.18.1 didn't require typing-extensions correctly, but another package did, and that package got upgraded in between builds to no longer require it (e.g. exceptiongroup, pure-eval, or pyzmq). Or the opposite happened via matplotlib, which looks like it downgraded between builds. Maybe the PR on importlib metadata fixes this, but I'd like to (a) handle doc installs via readthedocs.yaml, and (b) loosen the range of doc dependencies.

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