[Don't Merge] Upgrade innkeper plugin for aca-py v1.0.0
This is a WIP branch for upgrading the innkeeper plugin to work with aca-py 1.0.0 and python 3.12. Also changes some devcontainer stuff.
I'm not too sure about the decorators for the endpoints.
@loneil This is in a better spot now. Note it is pointing to both my forked repo for aries-cloudagent and the plugin repos. I've changed the naming for the classes.
We won't be able to switch to wallet per tenant for existing applications without a script :/
I still need to test the decorators are correct and for other related documentation that needs to be updated. When we are comfortable with this and after the v1.0.0 has been released for aca-py and plugins we can change the references, update the poetry lock files and this should work smoothly :crossed_fingers:
This seems to be working well. Can just leave it here until v1 is released.
Rebased in main and resolved conflicts with other version updates (main had since gone to 0.12.2, poetry updates)
| Deployment | Resource | Location |
|---|---|---|
| Traction | ||
| Tenant UI | https://pr-1260-traction-tenant-ui-dev.apps.silver.devops.gov.bc.ca | |
| Innkeeper UI | https://pr-1260-traction-tenant-ui-dev.apps.silver.devops.gov.bc.ca/innkeeper | |
| Aca-Py | ||
| Admin Swagger | https://pr-1260-traction-acapy-admin-dev.apps.silver.devops.gov.bc.ca/api/doc | |
| Tenant Proxy Swagger | https://pr-1260-traction-tenant-proxy-dev.apps.silver.devops.gov.bc.ca/api/doc |
Deployment URLs ready for review.
@jamshale I pulled this locally and don't get this issue, but on the deployment here I'm getting issues calling Innkeeper endpoints (like can try logging in with innkeeper/change-me)
Not sure but one difference is locally my docker was an existing 0.12.2 updated whereas this PR would be net new Innkeeper wallet created
Any thoughts on what would cause this?:
2024-08-14 14:37:40,736 TENANT: None ERROR /home/aries/.venv/lib/python3.12/site-packages/aiohttp/web_protocol.py:421 Error handling request
Traceback (most recent call last):
File "/home/aries/.venv/lib/python3.12/site-packages/aries_cloudagent/askar/profile.py", line 248, in _setup
self._handle = await asyncio.wait_for(self._opener, 10)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
return await fut
^^^^^^^^^
File "/home/aries/.venv/lib/python3.12/site-packages/aries_askar/store.py", line 733, in _open
await bindings.session_start(self._store, self._profile, self._is_txn),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/aries/.venv/lib/python3.12/site-packages/aries_askar/bindings/__init__.py", line 262, in session_start
handle = await invoke_async(
^^^^^^^^^^^^^^^^^^^
File "/home/aries/.venv/lib/python3.12/site-packages/aries_askar/bindings/lib.py", line 362, in invoke_async
return await self.loaded.invoke_async(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/futures.py", line 287, in __await__
yield self # This tells Task to wait for completion.
^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/tasks.py", line 385, in __wakeup
future.result()
File "/usr/local/lib/python3.12/asyncio/futures.py", line 203, in result
raise self._exception.with_traceback(self._exception_tb)
aries_askar.error.AskarError: Profile not found
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/aries/.venv/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/aries/.venv/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
resp = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/aries/.venv/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/aries/.venv/lib/python3.12/site-packages/aries_cloudagent/admin/server.py", line 141, in ready_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/aries/.venv/lib/python3.12/site-packages/aries_cloudagent/admin/server.py", line 212, in debug_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/aries/.venv/lib/python3.12/site-packages/aries_cloudagent/admin/server.py", line 359, in setup_context
return await task
^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/futures.py", line 287, in __await__
yield self # This tells Task to wait for completion.
^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/tasks.py", line 385, in __wakeup
future.result()
File "/usr/local/lib/python3.12/asyncio/futures.py", line 203, in result
raise self._exception.with_traceback(self._exception_tb)
File "/usr/local/lib/python3.12/asyncio/tasks.py", line 316, in __step_run_and_handle_result
result = coro.throw(exc)
^^^^^^^^^^^^^^^
File "/home/aries/.venv/lib/python3.12/site-packages/aries_cloudagent/admin/server.py", line 183, in upgrade_middleware
async with context.profile.session() as session:
File "/home/aries/.venv/lib/python3.12/site-packages/aries_cloudagent/core/profile.py", line 197, in __aenter__
await self._setup()
File "/home/aries/.venv/lib/python3.12/site-packages/aries_cloudagent/askar/profile.py", line 250, in _setup
raise ProfileError("Error opening store session") from err
aries_cloudagent.core.error.ProfileError: Error opening store session
Hmm. Not really sure. Is there anyway to access the startup logs? It looks like perhaps it's failing to create the innkeeper profile for some reason. I'm not sure if I had tried starting this from a clean env.
I'll try and look at a fresh wallet startup and see if I can reproduce it.
@jamshale do you mind checking the helm changes under charts\traction when you have a min?
This is what was causing the issue above if that seems like it makes sense for that error.
In the server config on local Docker it had
"multitenant.wallet_type": "single-wallet-askar",
which was missing from deployed