Skip to content

Commit 20cd9c5

Browse files
authored
🐛 Fix inefficient revocation (#1681)
* 🎨 Parametrize num creds in fixture * 🎨 Fix missing connection state "invitation-sent" * ⬆️ Upgrade acapy image Includes fix for openwallet-foundation/acapy#3792 * 📝 OpenAPI spec * 🎨 Fix up conn record to use correct rfc23 states
1 parent 11e30a9 commit 20cd9c5

File tree

5 files changed

+17
-25
lines changed

5 files changed

+17
-25
lines changed

app/tests/fixtures/credentials.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,9 @@ async def issue_alice_creds(
165165

166166
faber_conn_id = faber_and_alice_connection.faber_connection_id
167167

168+
num_creds = 3
168169
faber_cred_ex_ids = []
169-
for i in range(3):
170+
for i in range(num_creds):
170171
credential = {
171172
"connection_id": faber_conn_id,
172173
"save_exchange_record": True,
@@ -186,8 +187,8 @@ async def issue_alice_creds(
186187

187188
num_tries = 0
188189
num_credentials_returned = 0
189-
while num_credentials_returned != 3 and num_tries < 10:
190-
await asyncio.sleep(0.25)
190+
while num_credentials_returned != num_creds and num_tries < 10:
191+
await asyncio.sleep(1)
191192
alice_cred_ex_response = (
192193
await alice_member_client.get(
193194
f"{CREDENTIALS_BASE_PATH}?connection_id={faber_and_alice_connection.alice_connection_id}"
@@ -201,9 +202,9 @@ async def issue_alice_creds(
201202
num_credentials_returned = len(alice_cred_ex_response)
202203
num_tries += 1
203204

204-
if num_credentials_returned != 3:
205+
if num_credentials_returned != num_creds:
205206
pytest.fail(
206-
f"Expected 3 credentials to be issued; only got {num_credentials_returned}"
207+
f"Expected {num_creds} credentials to be issued; only got {num_credentials_returned}"
207208
)
208209

209210
for cred in alice_cred_ex_response:
@@ -231,7 +232,7 @@ async def issue_alice_creds(
231232
if record["credential_exchange_id"] in faber_cred_ex_ids
232233
]
233234

234-
assert len(cred_ex_response) == 3
235+
assert len(cred_ex_response) == num_creds
235236

236237
return [CredentialExchange(**cred) for cred in cred_ex_response]
237238

dockerfiles/agents/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/didx-xyz/acapy-agent:py3.12-1.3.0-20250611@sha256:5b3f12343bb2df3f83829fba3d78168d6dd10c3bab89f2f243fb5a4e97dda20c
1+
FROM ghcr.io/didx-xyz/acapy-agent:py3.12-1.3.0-20250625@sha256:b0cbe137c732ca5cedfd27c600ba767a7cdac0b7a555da4eeb799c481d41be11
22

33
USER root
44

docs/openapi/tenant-openapi.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,11 @@
170170
"anyOf": [
171171
{
172172
"enum": [
173-
"active",
174-
"response",
175-
"request",
176173
"start",
174+
"invitation-sent",
175+
"request-sent",
176+
"response-received",
177177
"completed",
178-
"init",
179-
"error",
180-
"invitation",
181178
"abandoned"
182179
],
183180
"type": "string"

docs/openapi/tenant-openapi.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,11 @@ paths:
108108
schema:
109109
anyOf:
110110
- enum:
111-
- active
112-
- response
113-
- request
114111
- start
112+
- invitation-sent
113+
- request-sent
114+
- response-received
115115
- completed
116-
- init
117-
- error
118-
- invitation
119116
- abandoned
120117
type: string
121118
- type: 'null'

shared/models/connection_record.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,11 @@
1414
Role = Literal["invitee", "requester", "inviter", "responder"]
1515

1616
State = Literal[
17-
"active",
18-
"response",
19-
"request",
2017
"start",
18+
"invitation-sent",
19+
"request-sent",
20+
"response-received",
2121
"completed",
22-
"init",
23-
"error",
24-
"invitation",
2522
"abandoned",
2623
]
2724

0 commit comments

Comments
 (0)