From c34644ed49960192582259708e8e8e49d82fd56d Mon Sep 17 00:00:00 2001 From: jamshale Date: Tue, 10 Dec 2024 21:06:14 +0000 Subject: [PATCH] Backport PR 3391 Signed-off-by: jamshale --- .github/workflows/publish.yml | 2 +- aries_cloudagent/askar/profile.py | 6 ++---- .../storage/vc_holder/tests/test_askar_vc_holder.py | 5 ++--- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 937c2e1bbd..23b3a0aaaf 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -80,7 +80,7 @@ jobs: uses: docker/metadata-action@v4 with: images: | - ghcr.io/${{ steps.info.outputs.repo-owner }}/aries-cloudagent-python + ghcr.io/hyperledger/aries-cloudagent-python tags: | type=raw,value=py${{ matrix.python-version }}-${{ inputs.tag || github.event.release.tag_name }} diff --git a/aries_cloudagent/askar/profile.py b/aries_cloudagent/askar/profile.py index e9b84db4e0..419a07ff90 100644 --- a/aries_cloudagent/askar/profile.py +++ b/aries_cloudagent/askar/profile.py @@ -5,7 +5,6 @@ import time # import traceback - from typing import Any, Mapping from weakref import ref @@ -26,8 +25,7 @@ from ..utils.multi_ledger import get_write_ledger_config_for_profile from ..wallet.base import BaseWallet from ..wallet.crypto import validate_seed - -from .store import AskarStoreConfig, AskarOpenStore +from .store import AskarOpenStore, AskarStoreConfig LOGGER = logging.getLogger(__name__) @@ -118,7 +116,7 @@ def bind_providers(self): VCHolder, ClassProvider( "aries_cloudagent.storage.vc_holder.askar.AskarVCHolder", - ref(self), + ClassProvider.Inject(Profile), ), ) if ( diff --git a/aries_cloudagent/storage/vc_holder/tests/test_askar_vc_holder.py b/aries_cloudagent/storage/vc_holder/tests/test_askar_vc_holder.py index 315a20f553..4d5a265be0 100644 --- a/aries_cloudagent/storage/vc_holder/tests/test_askar_vc_holder.py +++ b/aries_cloudagent/storage/vc_holder/tests/test_askar_vc_holder.py @@ -1,12 +1,10 @@ import pytest - from ....askar.profile import AskarProfileManager from ....config.injection_context import InjectionContext - +from ..askar import AskarVCHolder from ..base import VCHolder from ..vc_record import VCRecord - from . import test_in_memory_vc_holder as in_memory @@ -22,6 +20,7 @@ async def make_profile(): "key_derivation_method": "RAW", # much faster than using argon-hashed keys }, ) + profile.context.injector.bind_instance(VCHolder, AskarVCHolder(profile)) return profile