Skip to content

Commit

Permalink
⬆️ Upgrade ACA-Py and ✨ add NATS reconnect logic (#1183)
Browse files Browse the repository at this point in the history
* ⬆️ Upgrade to latest ACA-Py

* ⬆️ Update lock files

* 🐛 Nats reconnect logic (#1161)

* rework nats init

* 🎨

* remove broken test for now

* remove while loop

* reduce nats fetch timeout

* 🎨

* remove import

* re-add test

* ⬆️ Upgrade to 1.1.1b3 ACA-Py image + plugins

* ⬆️ Upgrade cloudcontroller to 1.1.1b3 release

* ⬆️ Update lock files

* ✨ Update to use new limit/offset params, instead of count/start

* ⬆️ Update version for next release

* test 1.1.1b4

* ⬆️ Upgrade protobuf version

* ✨ Use stable releases of acapy agent and plugins

* ⬆️ Upgrade aiohttp and update lock files

* 🎨 Correct acapy-wallet-groups-plugin version tag

* 🚧 test 1.1.1-20241115

* ✨ Enhance RichAsyncClient to retry on 502 errors as well

* 🎨 Parameterise the retry wait duration

* ⬆️ Upgrade plugins to next release

---------

Co-authored-by: cl0ete <[email protected]>
  • Loading branch information
ff137 and cl0ete authored Nov 14, 2024
1 parent f387da2 commit 01e1d67
Show file tree
Hide file tree
Showing 19 changed files with 612 additions and 624 deletions.
328 changes: 157 additions & 171 deletions app/poetry.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions app/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[tool.poetry]
name = "cloudapi-app"
version = "4.0.0"
version = "4.1.0"
description = "Main app submodule for cloudapi"
authors = ["Mourits de Beer <[email protected]>"]
package-mode = false

[tool.poetry.dependencies]
python = "^3.12"

aiohttp = "~3.10.5"
aries-cloudcontroller = "==1.1.1b1"
aiohttp = "~3.11.0"
aries-cloudcontroller = "==1.1.1b3"
base58 = "~2.1.1"
fastapi = "~0.115.0"
httpx = "~0.27.0"
Expand Down
4 changes: 2 additions & 2 deletions app/routes/verifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,8 @@ async def get_credentials_by_proof_id(
controller=aries_controller,
proof_id=proof_id,
referent=referent,
count=str(limit),
start=str(offset),
limit=limit,
offset=offset,
)
except CloudApiException as e:
bound_logger.info("Could not get matching credentials: {}.", e)
Expand Down
4 changes: 2 additions & 2 deletions app/routes/wallet/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ async def list_credentials(
results = await handle_acapy_call(
logger=logger,
acapy_call=aries_controller.credentials.get_records,
count=str(limit),
start=str(offset),
limit=limit,
offset=offset,
wql=wql,
)

Expand Down
8 changes: 4 additions & 4 deletions app/services/verifier/acapy_verifier_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ async def get_credentials_by_proof_id(
controller: AcaPyClient,
proof_id: str,
referent: Optional[str] = None,
count: Optional[str] = None,
start: Optional[str] = None,
limit: Optional[int] = None,
offset: Optional[int] = None,
) -> List[IndyCredPrecis]:
bound_logger = logger.bind(body={"proof_id": proof_id})
pres_ex_id = pres_id_no_version(proof_id=proof_id)
Expand All @@ -296,8 +296,8 @@ async def get_credentials_by_proof_id(
acapy_call=controller.present_proof_v2_0.get_matching_credentials,
pres_ex_id=pres_ex_id,
referent=referent,
count=count,
start=start,
limit=limit,
offset=offset,
)
except CloudApiException as e:
raise CloudApiException(
Expand Down
12 changes: 6 additions & 6 deletions app/tests/services/verifier/test_verifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ async def test_get_credentials_by_proof_id(
controller=mock_agent_controller,
proof_id="v2-abcd",
referent=None,
count="100",
start="0",
limit=100,
offset=0,
).thenReturn(to_async([cred_precis]))

result = await test_module.get_credentials_by_proof_id(
Expand All @@ -326,8 +326,8 @@ async def test_get_credentials_by_proof_id(
controller=mock_agent_controller,
proof_id="v2-abcd",
referent=None,
count="100",
start="0",
limit=100,
offset=0,
)


Expand Down Expand Up @@ -381,6 +381,6 @@ async def test_get_credentials_by_proof_id_with_limit_offset():
mock_aries_controller.present_proof_v2_0.get_matching_credentials.assert_called_once_with(
pres_ex_id="abcd",
referent=None,
count="2",
start="1",
limit=2,
offset=1,
)
2 changes: 1 addition & 1 deletion dockerfiles/agents/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/didx-xyz/acapy-agent-bbs:py3.12-1.1.1b3
FROM ghcr.io/didx-xyz/acapy-agent-bbs:py3.12-1.1.1-20241115

COPY configuration ./configuration
COPY scripts ./scripts
6 changes: 3 additions & 3 deletions dockerfiles/agents/Dockerfile.agent
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM ghcr.io/didx-xyz/acapy-agent-bbs:py3.12-1.1.1b3
FROM ghcr.io/didx-xyz/acapy-agent-bbs:py3.12-1.1.1-20241115

USER root

# Install Google Protobuf
ARG PROTOBUF_VERSION=5.28.1
ARG PROTOBUF_VERSION=5.28.3
RUN pip install --no-cache-dir protobuf==${PROTOBUF_VERSION}

# install nats-events plugin
RUN pip install --no-cache-dir git+https://github.com/didx-xyz/aries-acapy-plugins@test-refactor-multitenant-manager-errors#subdirectory=nats_events
RUN pip install --no-cache-dir git+https://github.com/didx-xyz/aries-acapy-plugins@1.1.1-20241115#subdirectory=nats_events

COPY scripts/startup.sh startup.sh
RUN chmod +x ./startup.sh
Expand Down
8 changes: 4 additions & 4 deletions dockerfiles/agents/Dockerfile.author.agent
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
FROM ghcr.io/didx-xyz/acapy-agent-bbs:py3.12-1.1.1b3
FROM ghcr.io/didx-xyz/acapy-agent-bbs:py3.12-1.1.1-20241115

USER root

# Install Google Protobuf
ARG PROTOBUF_VERSION=5.28.1
ARG PROTOBUF_VERSION=5.28.3
RUN pip install --no-cache-dir protobuf==${PROTOBUF_VERSION}

# Install wallet group id plugin
RUN pip install --no-cache-dir git+https://github.com/didx-xyz/acapy-wallet-groups-plugin@test-refactor-multitenant-manager-errors
RUN pip install --no-cache-dir acapy-wallet-groups-plugin==1.1.1.post20241115

# install nats-events plugin
RUN pip install --no-cache-dir git+https://github.com/didx-xyz/aries-acapy-plugins@test-refactor-multitenant-manager-errors#subdirectory=nats_events
RUN pip install --no-cache-dir git+https://github.com/didx-xyz/aries-acapy-plugins@1.1.1-20241115#subdirectory=nats_events

COPY scripts/startup.sh startup.sh
RUN chmod +x ./startup.sh
Expand Down
Loading

0 comments on commit 01e1d67

Please sign in to comment.