Skip to content

Commit

Permalink
♻️ Sync development with main and ✨ improve logging (#8)
Browse files Browse the repository at this point in the history
* ⬆️ Upgrade python-dateutil

Resolves calling deprecated `datetime.utcfromtimestamp` method

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Rename class to resolve PytestCollectionWarning

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Replace deprecated `open_binary` method with `files`

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Replace deprecated `scope` keyword with `loop_scope`

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Filter Aries RFC 0160 DeprecationWarning in tests

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Filter Pydantic UserWarning in test

Signed-off-by: ff137 <ff137@proton.me>

* ⬆️ Upgrade aiohttp to latest release and update lock file

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Remove unnecessary asyncio pytest markers

Resolves unclosed event loop warnings.

Signed-off-by: ff137 <ff137@proton.me>

* chore(deps-dev): Bump ruff from 0.7.3 to 0.7.4 (openwallet-foundation#3341)

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.7.3 to 0.7.4.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@0.7.3...0.7.4)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump aiohttp from 3.11.0 to 3.11.2 (openwallet-foundation#3340)

Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.11.0 to 3.11.2.
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](aio-libs/aiohttp@v3.11.0...v3.11.2)

---
updated-dependencies:
- dependency-name: aiohttp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump pyjwt from 2.9.0 to 2.10.0 (openwallet-foundation#3339)

Bumps [pyjwt](https://github.com/jpadilla/pyjwt) from 2.9.0 to 2.10.0.
- [Release notes](https://github.com/jpadilla/pyjwt/releases)
- [Changelog](https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst)
- [Commits](jpadilla/pyjwt@2.9.0...2.10.0)

---
updated-dependencies:
- dependency-name: pyjwt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* did:tdw resolver (openwallet-foundation#3237)

* did:tdw resolver

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Update unit tests

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Update poetry.lock

Signed-off-by: jamshale <jamiehalebc@gmail.com>

---------

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* chore(deps): Bump aiohttp (openwallet-foundation#3342)

Bumps the pip group with 1 update in the /scenarios directory: [aiohttp](https://github.com/aio-libs/aiohttp).


Updates `aiohttp` from 3.10.5 to 3.10.11
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](aio-libs/aiohttp@v3.10.5...v3.10.11)

---
updated-dependencies:
- dependency-name: aiohttp
  dependency-type: indirect
  dependency-group: pip
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jamshale <31809382+jamshale@users.noreply.github.com>

* 🎨 Refactor `register_plugin` steps for maintainability

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 improve logging in register_package

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Rename method and remove redundant main call

Signed-off-by: ff137 <ff137@proton.me>

* 🎨

Signed-off-by: ff137 <ff137@proton.me>

* 🔊 Add debug logging to Context Builder

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Deduplicate registering list of plugins

Signed-off-by: ff137 <ff137@proton.me>

* 🎨

Signed-off-by: ff137 <ff137@proton.me>

* 🔊 Add debug logging to init_context

Signed-off-by: ff137 <ff137@proton.me>

* 🔊 Add debug logging to load_protocol_version

Signed-off-by: ff137 <ff137@proton.me>

* 🔊 Add debug logging to load_protocols

Signed-off-by: ff137 <ff137@proton.me>

* 🔊 Add debug logging to register_admin_routes

Signed-off-by: ff137 <ff137@proton.me>

* 🔊 Add debug logging to register_protocol_events

Signed-off-by: ff137 <ff137@proton.me>

* 🔊 Add debug logging to post_process_routes

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Replace print statements with info logs

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Replace almost all print statements with info logs

Signed-off-by: ff137 <ff137@proton.me>

* 🔊 Expand logging for Conductor setup

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Correct to uphold previous "Module doesn't exist" log behaviour

Signed-off-by: ff137 <ff137@proton.me>

* ✅ Fix test by using assertLogs instead of capturing stdout

Signed-off-by: ff137 <ff137@proton.me>

* Revert "🎨 Rename method and remove redundant main call"

This reverts commit 2f6526d.

Signed-off-by: ff137 <ff137@proton.me>

* 🎨

Signed-off-by: ff137 <ff137@proton.me>

* ✅ Fix test by adding __name__ to mock object

Signed-off-by: ff137 <ff137@proton.me>

* 🎨

Signed-off-by: ff137 <ff137@proton.me>

* ✨ Add custom trace log level

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Ensure trace level can only be added once

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Add Logger

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Update newly added logs to be trace level instead of debug

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Update newly added logs to be trace level instead of debug

Signed-off-by: ff137 <ff137@proton.me>

* 🔊 Expand logging for Conductor start and stop

Signed-off-by: ff137 <ff137@proton.me>

* ✅ Add unit tests for adding trace level functionality

Signed-off-by: ff137 <ff137@proton.me>

* ✅ Reset the logging states before and after TestLoggingUtils is run

Signed-off-by: ff137 <ff137@proton.me>

* 🎨

Signed-off-by: ff137 <ff137@proton.me>

* 🧪 Debug log assertion test failing sporadically

Filter the logs being read by module name, and add short sleep to allow log handlers to flush

Signed-off-by: ff137 <ff137@proton.me>

* ✅ Modify log assertion to be more robust

Signed-off-by: ff137 <ff137@proton.me>

* 🎨

Signed-off-by: ff137 <ff137@proton.me>

* 🐛 Handle case that load_module return type is Optional

Signed-off-by: ff137 <ff137@proton.me>

* 🔊 Expand logging for ClassLoader

Signed-off-by: ff137 <ff137@proton.me>

* 🔊 Log a warning if resource not found, instead of passing

Signed-off-by: ff137 <ff137@proton.me>

* 🎨

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Enable trace logs for remaining modules

Signed-off-by: ff137 <ff137@proton.me>

* 🐛 Fix registering and loading of modules

Signed-off-by: ff137 <ff137@proton.me>

* 🔊 Expand logging for Ledger Configuration

Signed-off-by: ff137 <ff137@proton.me>

* Fix tails upload for anoncreds multitenancy

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Update unit test

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Make sonarcloud happy with https in test

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Add anoncreds issuance and presentation format (openwallet-foundation#3331)

* Add anoncreds issuance and presentation formats

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Fix unit tests

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Fix error in _formats_attach

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Fix AnoncredsDID validation pattern

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Fix name

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Fix scenario test

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Update demo with anoncreds format

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Fix the scenario test and add better description

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Add service_healthy check for indy agent

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Fix/update BDD tests

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Add issuer askar to holder anoncreds support

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Update BDD tests

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Remove commented code

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Expand scenario test

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Add better comments for format compatibilty imports

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Add anocnreds compatibilty bdd test to PR workflow

Signed-off-by: jamshale <jamiehalebc@gmail.com>

---------

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Fix handling of base_wallet_routes startup parameter in auth decorator

Signed-off-by: Emiliano Suñé <emiliano.sune@gmail.com>

* Restore --base-wallet-extra-routes argument functionality

Signed-off-by: Emiliano Suñé <emiliano.sune@gmail.com>

* Correctly handle null value for --base-wallet-routes

Signed-off-by: Emiliano Suñé <emiliano.sune@gmail.com>

* Fix typo

Signed-off-by: Emiliano Suñé <emiliano.sune@gmail.com>

* Fix subwallet anoncreds upgrade check (openwallet-foundation#3345)

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Fix/universal resolver (openwallet-foundation#3354)

* Update universal resolver response handling

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Update universal resolver unit test

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Add reverse compatibility handling

Signed-off-by: jamshale <jamiehalebc@gmail.com>

---------

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* chore(deps-dev): Bump ruff from 0.7.4 to 0.8.0 (openwallet-foundation#3348)

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.7.4 to 0.8.0.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@0.7.4...0.8.0)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jamshale <31809382+jamshale@users.noreply.github.com>

* chore(deps): Bump mkdocs-material from 9.5.44 to 9.5.46 (openwallet-foundation#3352)

Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.44 to 9.5.46.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](squidfunk/mkdocs-material@9.5.44...9.5.46)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump uuid-utils from 0.9.0 to 0.10.0 (openwallet-foundation#3351)

Bumps [uuid-utils](https://github.com/aminalaee/uuid-utils) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/aminalaee/uuid-utils/releases)
- [Commits](aminalaee/uuid-utils@0.9.0...0.10.0)

---
updated-dependencies:
- dependency-name: uuid-utils
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): Bump debugpy from 1.8.8 to 1.8.9 (openwallet-foundation#3350)

Bumps [debugpy](https://github.com/microsoft/debugpy) from 1.8.8 to 1.8.9.
- [Release notes](https://github.com/microsoft/debugpy/releases)
- [Commits](microsoft/debugpy@v1.8.8...v1.8.9)

---
updated-dependencies:
- dependency-name: debugpy
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump aiohttp from 3.11.2 to 3.11.7 (openwallet-foundation#3349)

Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.11.2 to 3.11.7.
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](aio-libs/aiohttp@v3.11.2...v3.11.7)

---
updated-dependencies:
- dependency-name: aiohttp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⏪ Revert `trace` log changes, and move to debug level

Signed-off-by: ff137 <ff137@proton.me>

* ✨ Add caching to ClassLoader.load_module

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Improve log

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Sync Ruff version in configs and apply formatting (openwallet-foundation#3358)

* ⬆️ Upgrade ruff version in pre-commit config and lint workflow

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Apply ruff formatting

Signed-off-by: ff137 <ff137@proton.me>

* ⬆️ Upgrade pre-commit hook version

Signed-off-by: ff137 <ff137@proton.me>

---------

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Replace deprecated ABC decorators (openwallet-foundation#3357)

Signed-off-by: ff137 <ff137@proton.me>
Co-authored-by: jamshale <31809382+jamshale@users.noreply.github.com>

* 🎨 Reduce log verbosity

Signed-off-by: ff137 <ff137@proton.me>

* ✨ Add `lru_cache` to load_class and set maxsize

Signed-off-by: ff137 <ff137@proton.me>

* ⚡ Add class caching to DeferLoad

Resolves openwallet-foundation#3360

Signed-off-by: ff137 <ff137@proton.me>

* ⏪ Revert addition of lru caching

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Update logs / reduce verbosity

Signed-off-by: ff137 <ff137@proton.me>

* Revert "Don't pass rekey to sub_wallet_profile"

This reverts commit e59d275.

* Fixes openwallet-foundation#3202: new suppress banner and replace print by logging statements

Signed-off-by: Ricky Ng-Adam <ricky.ng-adam-ext@mcn.gouv.qc.ca>

* 🎨 Print agent label and version even if banner suppressed

Signed-off-by: ff137 <ff137@proton.me>

* ✅ Fix pagination assertions

Signed-off-by: ff137 <ff137@proton.me>

* 👷 Upload Python Package to TestPyPI (#4)

* 👷 Upload Python Package to TestPyPI

Signed-off-by: ff137 <ff137@proton.me>

* 👷 Update project name and version for testpypi

Signed-off-by: ff137 <ff137@proton.me>

* 🎨

Signed-off-by: ff137 <ff137@proton.me>

---------

Signed-off-by: ff137 <ff137@proton.me>

* Version 1.1.1-20241115

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Deprecate count/start query params and implement limit/offset (#6)

* art: Modify count/start query params to be Integers, not Strings

Signed-off-by: ff137 <ff137@proton.me>

* memo: Update openapi spec

Signed-off-by: ff137 <ff137@proton.me>

* rewind: Revert start/count field to remain String type; mark as deprecated

Signed-off-by: ff137 <ff137@proton.me>

* sparkles: Implement limit/offset alongside deprecated count/start

Signed-off-by: ff137 <ff137@proton.me>

* art: Standardise naming convention from count/start to limit/offset

Signed-off-by: ff137 <ff137@proton.me>

* rewind: Revert start/count field to remain String type; mark as deprecated

Signed-off-by: ff137 <ff137@proton.me>

* sparkles: Implement limit/offset alongside deprecated count/start

Signed-off-by: ff137 <ff137@proton.me>

* art: Remove unused query string schema from `w3c_creds_list`

Signed-off-by: ff137 <ff137@proton.me>

* art: Rename args

Signed-off-by: ff137 <ff137@proton.me>

* memo: Update openapi specs

Signed-off-by: ff137 <ff137@proton.me>

* white_check_mark:

Signed-off-by: ff137 <ff137@proton.me>

---------

Signed-off-by: ff137 <ff137@proton.me>

* sparkles: add `order_by` and `descending` options to query / scan and fetch_all methods

Signed-off-by: ff137 <ff137@proton.me>

* sparkles: add `order_by` and `descending` options to PaginatedQuerySchema

Signed-off-by: ff137 <ff137@proton.me>

* sparkles: modify `get_limit_offset` to `get_paginated_query_params`

Signed-off-by: ff137 <ff137@proton.me>

* construction: test in-progress aries-askar PR: openwallet-foundation/askar#291

Signed-off-by: ff137 <ff137@proton.me>

* arrow_up: Update lock file

Signed-off-by: ff137 <ff137@proton.me>

* art: fix ruff warning

Signed-off-by: ff137 <ff137@proton.me>

* white_check_mark: fix assertions

Signed-off-by: ff137 <ff137@proton.me>

* construction: test aries-askar with TestPyPI package

Signed-off-by: ff137 <ff137@proton.me>

* construction: test latest askar testpypi package

Signed-off-by: ff137 <ff137@proton.me>

* art: Update order_by description and default value. Include in schema

Signed-off-by: ff137 <ff137@proton.me>

* bug: fix deserialisation of descending: bool parameter

Signed-off-by: ff137 <ff137@proton.me>

* rewind: revert to testing 0.3.3b0 askar test package

Signed-off-by: ff137 <ff137@proton.me>

* fire: remove unnecessary record sorts (now that askar sorts by id == sorting by created_at)

Signed-off-by: ff137 <ff137@proton.me>

* white_check_mark: fix test assertions -- wallet_list and connections_list no longer does additional sorting

Signed-off-by: ff137 <ff137@proton.me>

* arrow_up: Update lock file

Signed-off-by: ff137 <ff137@proton.me>

* art: Modify count/start query params to be Integers, not Strings

Signed-off-by: ff137 <ff137@proton.me>

* memo: Update openapi spec

Signed-off-by: ff137 <ff137@proton.me>

* rewind: Revert start/count field to remain String type; mark as deprecated

Signed-off-by: ff137 <ff137@proton.me>

* sparkles: Implement limit/offset alongside deprecated count/start

Signed-off-by: ff137 <ff137@proton.me>

* art: Standardise naming convention from count/start to limit/offset

Signed-off-by: ff137 <ff137@proton.me>

* rewind: Revert start/count field to remain String type; mark as deprecated

Signed-off-by: ff137 <ff137@proton.me>

* sparkles: Implement limit/offset alongside deprecated count/start

Signed-off-by: ff137 <ff137@proton.me>

* art: Remove unused query string schema from `w3c_creds_list`

Signed-off-by: ff137 <ff137@proton.me>

* art: Rename args

Signed-off-by: ff137 <ff137@proton.me>

* memo: Update openapi specs

Signed-off-by: ff137 <ff137@proton.me>

* white_check_mark:

Signed-off-by: ff137 <ff137@proton.me>

* art: Update start/count keywords to offset/limit

Signed-off-by: ff137 <ff137@proton.me>

* 🐛 Fix IndyVdrLedgerPool RuntimeWarning

Resolves openwallet-foundation#3328

Signed-off-by: ff137 <ff137@proton.me>

* 🧪 Update tests

Signed-off-by: ff137 <ff137@proton.me>

* Revert "did:tdw resolver (openwallet-foundation#3237)"

This reverts commit f5c49b0.

Signed-off-by: ff137 <ff137@proton.me>

* 1.1.1b5

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Propagate the async changes

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Propagate the async changes

Signed-off-by: ff137 <ff137@proton.me>

* Add test wallet config option (openwallet-foundation#3355)

* Add test wallet config option

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Change wallet test arg to store true / Fix tests

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Add unit test with test wallet config

Signed-off-by: jamshale <jamiehalebc@gmail.com>

---------

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Week 49 Library upgrades (openwallet-foundation#3368)

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* ⚡ Add class caching to DeferLoad (openwallet-foundation#3361)

Resolves openwallet-foundation#3360

Signed-off-by: ff137 <ff137@proton.me>
Co-authored-by: jamshale <31809382+jamshale@users.noreply.github.com>

* fix: check routing keys on endpoint refresh

Previously we were only checking if the endpoint value had changed but
it is possible for the routing keys to update and not the endpoint. This
resulted in new attrib txns not getting published when there were new
routing keys.

Signed-off-by: Daniel Bluhm <dbluhm@pm.me>

* 1.1.1rc0

Signed-off-by: Stephen Curran <swcurran@gmail.com>

* Make vc libraries mandatory (openwallet-foundation#3356)

* Make vc libraries mandatory

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Make indy-vdr library required

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Update dockerfiles after removed extras

Signed-off-by: jamshale <jamiehalebc@gmail.com>

---------

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Update the PR for release

Signed-off-by: Stephen Curran <swcurran@gmail.com>

* Repair release bdd tests

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Add in PR to Changelog

Signed-off-by: Stephen Curran <swcurran@gmail.com>

* 🎨 Reduce repetition

Signed-off-by: ff137 <ff137@proton.me>

* Fix for demo initial cred_type override (openwallet-foundation#3378)

Signed-off-by: Ian Costanzo <ian@anon-solutions.ca>

* chore(deps): Bump dawidd6/action-download-artifact (openwallet-foundation#3370)

Bumps the all-actions group with 1 update: [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact).


Updates `dawidd6/action-download-artifact` from 6 to 7
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](dawidd6/action-download-artifact@v6...v7)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: all-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jamshale <31809382+jamshale@users.noreply.github.com>

* 🎨 Log warning when StorageNotFoundError encountered, instead of exception stacktrace

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Set Shutdown log level to fatal, with exc_info

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Log warning for bad credential format, instead of always exception stacktrace

Signed-off-by: ff137 <ff137@proton.me>

* 🚧 Add exc_info to error log for debugging

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Make `ensure_supported_did` method public

Signed-off-by: ff137 <ff137@proton.me>

* 🐛 Ensure supported DID before calling Rotate

Resolves: openwallet-foundation#3379
Signed-off-by: ff137 <ff137@proton.me>

* ✅ Fix existing tests

Signed-off-by: ff137 <ff137@proton.me>

* ✅ Test coverage for new DID validation

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Shorten config key

* 🎨 Fix lying method return type

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Replace AskarError with ProfileError

Signed-off-by: ff137 <ff137@proton.me>

* 🚧 Skip exception log for ProfileError

Signed-off-by: ff137 <ff137@proton.me>

* 🐛 Fix message type class mapping

Signed-off-by: ff137 <ff137@proton.me>

* 🚧 Debug message parse error

Signed-off-by: ff137 <ff137@proton.me>

* 🚧 Log warning instead of error for MessageParseError

Signed-off-by: ff137 <ff137@proton.me>

* ⬆️ Bump version

Signed-off-by: ff137 <ff137@proton.me>

* ⬆️ Update lock file

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Fix model name for consistency

From Anoncred to Anoncreds

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 Set wallet upgrade exception log to warning

Signed-off-by: ff137 <ff137@proton.me>

* Update anoncreds format names (openwallet-foundation#3374)

* Update anoncreds format names

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Add a unit test

Signed-off-by: jamshale <jamiehalebc@gmail.com>

---------

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* 🎨 Fix model name for consistency (openwallet-foundation#3382)

From Anoncred to Anoncreds

Signed-off-by: ff137 <ff137@proton.me>
Co-authored-by: jamshale <31809382+jamshale@users.noreply.github.com>

---------

Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: jamshale <jamiehalebc@gmail.com>
Signed-off-by: Emiliano Suñé <emiliano.sune@gmail.com>
Signed-off-by: Ricky Ng-Adam <ricky.ng-adam-ext@mcn.gouv.qc.ca>
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Signed-off-by: Stephen Curran <swcurran@gmail.com>
Signed-off-by: Ian Costanzo <ian@anon-solutions.ca>
Co-authored-by: Daniel Bluhm <dbluhm@pm.me>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jamshale <31809382+jamshale@users.noreply.github.com>
Co-authored-by: jamshale <jamiehalebc@gmail.com>
Co-authored-by: Stephen Curran <swcurran@gmail.com>
Co-authored-by: Emiliano Suñé <emiliano.sune@gmail.com>
Co-authored-by: Ricky Ng-Adam <ricky.ng-adam-ext@mcn.gouv.qc.ca>
Co-authored-by: Ian Costanzo <ian@anon-solutions.ca>
  • Loading branch information
9 people authored Dec 5, 2024
1 parent 765e281 commit b72569e
Show file tree
Hide file tree
Showing 257 changed files with 14,951 additions and 8,636 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ jobs:
- name: Ruff Format and Lint Check
uses: chartboost/ruff-action@v1
with:
version: 0.5.7
version: 0.8.0
args: "format --check"
4 changes: 2 additions & 2 deletions .github/workflows/sonar-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
fetch-depth: 0
- name: Download PR number artifact
uses: dawidd6/action-download-artifact@v6
uses: dawidd6/action-download-artifact@v7
with:
workflow: Tests
run_id: ${{ github.event.workflow_run.id }}
Expand All @@ -26,7 +26,7 @@ jobs:
with:
path: ./PR_NUMBER
- name: Download Test Coverage
uses: dawidd6/action-download-artifact@v6
uses: dawidd6/action-download-artifact@v7
with:
workflow: Tests
run_id: ${{ github.event.workflow_run.id }}
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
repos:
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.16.0
rev: v9.18.0
hooks:
- id: commitlint
stages: [commit-msg]
args: ["--config", ".commitlint.config.js"]
additional_dependencies: ['@commitlint/config-conventional']
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ensure this is synced with pyproject.toml
rev: v0.5.7
rev: v0.8.1
hooks:
# Run the linter
- id: ruff
Expand Down
74 changes: 74 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,79 @@
# Aries Cloud Agent Python Changelog

## 1.1.1rc0

### December 3, 2024

Release 1.1.1 is a patch update to ACA-Py that contains a lengthy list of adjustments, improvements and fixes, with a focus on removing Technical Debt. The most visible change is the removal of the "in-memory wallet" implementation in favour of using the SQLite in-memory wallet (`sqlite://:memory:`), including removing the logic for handling that extra wallet type. While arguably a breaking change (and we mention it below), we're confident no one is using the in-memory wallet (right?!?) any where other than in tests. In removing the in-memory wallet, all of the unit and integration tests that used the in-memory wallet were updated to use SQLite's in-memory wallet.

The first step to full support of [did:tdw](https://identity.foundation/trustdidweb/) (soon to be renamed to `did:webvh` for "`did:web` + Verifiable History") has been added to ACA-Py -- a resolver. We're working on adding new DID Registration for it and other DID Methods, enabling ACA-Py to be used easily with a variety of DID Methods.

The move to the [OpenWallet Foundation](https://openwallet.foundation/) is now complete. For up to date details on what the repo move means for ACA-Py users, including steps for updating deployments, please see latest in [GitHub Issue #3250].

[GitHub Issue #3250]: https://github.com/hyperledger/aries-cloudagent-python/issues/3250

### 1.1.1 Deprecation Notices

The same **[deprecation notices](#101-deprecation-notices)** from the [1.1.0](#110) release about AIP 1.0 protocols still apply. The protocols remain in the 1.1.1 release, but will be moved out of the core and into plugins soon. Please review these notifications carefully!

### 1.1.1 Breaking Changes

While there are no breaking changes in this release that might impact production deployments, the removal of the "in-memory" wallet implementation might be break some test scripts. Rather than using the in-memory wallet, tests should be updated to use SQLite's special `sqlite://:memory:` database instead. This results in a better alignment between tests and a production environment.


#### 1.1.1 Categorized List of Pull Requests

- AnonCreds VC Issuance and Presentation Enhancement / Fixes
- Repair release bdd tests [\#3376](https://github.com/openwallet-foundation/acapy/pull/3376) [jamshale](https://github.com/jamshale)
- Fix tails upload for anoncreds multitenancy [\#3346](https://github.com/openwallet-foundation/acapy/pull/3346) [jamshale](https://github.com/jamshale)
- Fix subwallet anoncreds upgrade check [\#3345](https://github.com/openwallet-foundation/acapy/pull/3345) [jamshale](https://github.com/jamshale)
- Add anoncreds issuance and presentation format [\#3331](https://github.com/openwallet-foundation/acapy/pull/3331) [jamshale](https://github.com/jamshale)
- Fix endorsement setup with existing connection [\#3309](https://github.com/openwallet-foundation/acapy/pull/3309) [jamshale](https://github.com/jamshale)
- Update accumulator value in wallet on repair [\#3299](https://github.com/openwallet-foundation/acapy/pull/3299) [jamshale](https://github.com/jamshale)

- Middleware Handling and Multi-tenancy
- Restore `--base-wallet-routes` flag functionality [\#3344](https://github.com/openwallet-foundation/acapy/pull/3344) [esune](https://github.com/esune)
- :white_check_mark: Re-add ready_middleware unit tests [\#3330](https://github.com/openwallet-foundation/acapy/pull/3330) [ff137](https://github.com/ff137)
- :sparkles: Handle NotFound and UnprocessableEntity errors in middleware [\#3327](https://github.com/openwallet-foundation/acapy/pull/3327) [ff137](https://github.com/ff137)
- :art: Refactor Multitenant Manager errors and exception handling [\#3323](https://github.com/openwallet-foundation/acapy/pull/3323) [ff137](https://github.com/ff137)
- Don't pass rekey to sub_wallet_profile [\#3312](https://github.com/openwallet-foundation/acapy/pull/3312) [jamshale](https://github.com/jamshale)

- DID Registration and Resolution
- fix: check routing keys on indy_vdr endpoint refresh [\#3371](https://github.com/openwallet-foundation/acapy/pull/3371) [dbluhm](https://github.com/dbluhm)
- Fix/universal resolver [\#3354](https://github.com/openwallet-foundation/acapy/pull/3354) [jamshale](https://github.com/jamshale)
- More robust verification method selection by did [\#3279](https://github.com/openwallet-foundation/acapy/pull/3279) [dbluhm](https://github.com/dbluhm)
- did:tdw resolver [\#3237](https://github.com/openwallet-foundation/acapy/pull/3237) [jamshale](https://github.com/jamshale)

- DIDComm Updates and Enhancements
- :bug: Rearrange connection record deletion after hangup [\#3310](https://github.com/openwallet-foundation/acapy/pull/3310) [ff137](https://github.com/ff137)
- :bug: Handle failure to resolve DIDComm services in DIDXManager [\#3298](https://github.com/openwallet-foundation/acapy/pull/3298) [ff137](https://github.com/ff137)

- Test Suite Updates and Artifact Publishing
- Add test wallet config option [\#3355](https://github.com/openwallet-foundation/acapy/pull/3355) [jamshale](https://github.com/jamshale)
- :art: Fix current test warnings [\#3338](https://github.com/openwallet-foundation/acapy/pull/3338) [ff137](https://github.com/ff137)
- :construction_worker: Fix Nightly Publish to not run on forks [\#3333](https://github.com/openwallet-foundation/acapy/pull/3333) [ff137](https://github.com/ff137)

- Internal Improvements / Cleanups / Tech Debt Updates
- :zap: Add class caching to DeferLoad [\#3361](https://github.com/openwallet-foundation/acapy/pull/3361) [ff137](https://github.com/ff137
- :art: Sync Ruff version in configs and apply formatting [\#3358](https://github.com/openwallet-foundation/acapy/pull/3358) [ff137](https://github.com/ff137)
- :art: Replace deprecated ABC decorators [\#3357](https://github.com/openwallet-foundation/acapy/pull/3357) [ff137](https://github.com/ff137)
- :art: Refactor the logging module monolith [\#3319](https://github.com/openwallet-foundation/acapy/pull/3319) [ff137](https://github.com/ff137)
- :wrench: set default fixture scope for pytest-asyncio [\#3318](https://github.com/openwallet-foundation/acapy/pull/3318) [ff137](https://github.com/ff137)
- Docs (devcontainer) Change folder names [\#3317](https://github.com/openwallet-foundation/acapy/pull/3317) [loneil](https://github.com/loneil)
- :art: Refactor string concatenation in model descriptions [\#3313](https://github.com/openwallet-foundation/acapy/pull/3313) [ff137](https://github.com/ff137)
- Remove in memory wallet [\#3311](https://github.com/openwallet-foundation/acapy/pull/3311) [jamshale](https://github.com/jamshale)

- Consolidate Dependabot updates and other library/dependency updates
- Week 49 Library upgrades [\#3368](https://github.com/openwallet-foundation/acapy/pull/3368) [jamshale](https://github.com/jamshale)
- :arrow_up: Update lock file [\#3296](https://github.com/openwallet-foundation/acapy/pull/3296) [ff137](https://github.com/ff137)

- Release management pull requests:
- 1.1.1rc0 [\#3372](https://github.com/openwallet-foundation/acapy/pull/3372) [swcurran](https://github.com/swcurran)

- Dependabot PRs
- [Link to list of Dependabot PRs in this release](https://github.com/openwallet-foundation/acapy/pulls?q=is%3Apr+is%3Amerged+merged%3A2024-10-15..2024-12-03+author%3Aapp%2Fdependabot+)


## 1.1.0

### October 15, 2024
Expand Down
4 changes: 2 additions & 2 deletions Managing-ACA-Py-Doc-Site.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ and mkdocs configuration.

When the GitHub Action fires, it runs a container that carries out the following steps:

- Checks out the triggering branch, either `main` or `docs-v<version>` (e.g `docs-v1.1.0`).
- Checks out the triggering branch, either `main` or `docs-v<version>` (e.g `docs-v1.1.1`).
- Runs the script [scripts/prepmkdocs.sh], which moves and updates some of the
markdown files so that they fit into the generated site. See the comments in
the scripts for details about the copying and editing done via the script. In
Expand Down Expand Up @@ -97,7 +97,7 @@ To delete the documentation version, do the following:
- Check your `git status` and make sure there are no changes in the branch --
e.g., new files that shouldn't be added to the `gh-pages` branch. If there are
any -- delete the files so they are not added.
- Remove the folder for the RC. For example `rm -rf 1.1.0`
- Remove the folder for the RC. For example `rm -rf 1.1.1rc0`
- Edit the `versions.json` file and remove the reference to the RC release in
the file.
- Push the changes via a PR to the ACA-Py `gh-pages` branch (don't PR them into
Expand Down
20 changes: 10 additions & 10 deletions PUBLISHING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ a major, minor or patch release, per [semver](https://semver.org/) rules.

Once ready to do a release, create a local branch that includes the following updates:

1. Create a local PR branch from an updated `main` branch, e.g. "1.1.0".
1. Create a local PR branch from an updated `main` branch, e.g. "1.1.1".

2. See if there are any Document Site `mkdocs` changes needed. Run the script
`./scripts/prepmkdocs.sh; mkdocs`. Watch the log, noting particularly if
Expand All @@ -27,7 +27,7 @@ Once ready to do a release, create a local branch that includes the following up
github account. Do not include `dependabot` PRs. For those, we put a live
link for the date range of the release (guidance below).

To generate the list, run the script `genChangeLog.sh` command (requires you
To generate the list, run the `./scripts/genChangeLog.sh` scripts (requires you
have [gh] and [jq] installed), with the date of the day before the last
release. The day before is picked to make sure you get all of the changes.
The script generates the list of all PRs, minus the dependabot ones, merged since
Expand Down Expand Up @@ -78,17 +78,17 @@ Once you have the list of PRs:
- Check the dates in the `dependabot` URL to make sure the full period between the previous non-RC release to the date of the non-RC release you are preparing.
- Include a PR in the list for this soon-to-be PR, initially with the "next to be issued" number for PRs/Issues. At the end output of the script is the highest numbered PR and issue. Your PR will be one higher than the highest of those two numbers. Note that you still might have to correct the number after you create the PR if someone sneaks an issue or PR in before you submit your PR.

5. Check to see if there are any other PRs that should be included in the release.
1. Check to see if there are any other PRs that should be included in the release.

6. Update the ReadTheDocs in the `/docs` folder by following the instructions in
2. Update the ReadTheDocs in the `/docs` folder by following the instructions in
the `docs/UpdateRTD.md` file. That will likely add a number of new and modified
files to the PR. Eliminate all of the errors in the generation process,
either by mocking external dependencies or by fixing ACA-Py code. If
necessary, create an issue with the errors and assign it to the appropriate
developer. Experience has demonstrated to use that documentation generation
errors should be fixed in the code.

7. Search across the repository for the previous version number and update it
3. Search across the repository for the previous version number and update it
everywhere that makes sense. The CHANGELOG.md entry for the previous release
is a likely exception, and the `pyproject.toml` in the root **MUST** be
updated. You can skip (although it won't hurt) to update the files in the
Expand All @@ -101,28 +101,28 @@ Once you have the list of PRs:
have dropped the previously used `-` in the release candidate version string
to better follow the semver rules.

8. Regenerate openapi.json and swagger.json by running
4. Regenerate openapi.json and swagger.json by running
`scripts/generate-open-api-spec` from within the `acapy_agent` folder.

Command: `cd acapy_agent;../scripts/generate-open-api-spec;cd ..`

Folders may not be cleaned up by the script, so the following can be run, likely with `sudo` -- `rm -rf open-api/.build`. The folder is `.gitignore`d, so there is not a danger they will be pushed, even if they are not deleted.

9. Double check all of these steps above, and then submit a PR from the branch.
5. Double check all of these steps above, and then submit a PR from the branch.
Add this new PR to CHANGELOG.md so that all the PRs are included.
If there are still further changes to be merged, mark the PR as "Draft",
repeat **ALL** of the steps again, and then mark this PR as ready and then
wait until it is merged. It's embarrassing when you have to do a whole new
release just because you missed something silly...I know!

10. Immediately after it is merged, create a new GitHub tag representing the
6. Immediately after it is merged, create a new GitHub tag representing the
version. The tag name and title of the release should be the same as the
version in [pyproject.toml](https://github.com/openwallet-foundation/acapy/tree/main/pyproject.toml). Use
the "Generate Release Notes" capability to get a sequential listing of the
PRs in the release, to complement the manually curated Changelog. Verify on
PyPi that the version is published.

11. New images for the release are automatically published by the GitHubAction
7. New images for the release are automatically published by the GitHubAction
Workflows: [publish.yml] and [publish-indy.yml]. The actions are triggered
when a release is tagged, so no manual action is needed. The images are
published in the [OpenWallet Foundation Package Repository under
Expand All @@ -140,7 +140,7 @@ Once you have the list of PRs:
[publish-indy.yml]: https://github.com/openwallet-foundation/acapy/blob/main/.github/workflows/publish-indy.yml

1. When a new release is tagged, create a new branch at the same commit with
the branch name in the format `docs-v<version>`, for example, `docs-v1.1.0`.
the branch name in the format `docs-v<version>`, for example, `docs-v1.1.1`.
The creation of the branch triggers the execution of the [publish-docs]
GitHub Action which generates the documentation for the new release,
publishing it at [https://aca-py.org]. The GitHub Action also executes when
Expand Down
13 changes: 9 additions & 4 deletions acapy_agent/__main__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
"""acapy_agent package entry point."""

import logging
import os
import sys

LOGGER = logging.getLogger(__name__)


def init_debug(args):
"""Initialize debugging environment."""
Expand All @@ -26,16 +29,18 @@ def init_debug(args):
import debugpy

debugpy.listen((DAP_HOST, DAP_PORT))
print(f"=== Waiting for debugger to attach to {DAP_HOST}:{DAP_PORT} ===")
LOGGER.info(
f"=== Waiting for debugger to attach to {DAP_HOST}:{DAP_PORT} ==="
)
debugpy.wait_for_client()
except ImportError:
print("debugpy library was not found")
LOGGER.error("debugpy library was not found")

if ENABLE_PYDEVD_PYCHARM or "--debug-pycharm" in args:
try:
import pydevd_pycharm

print(
LOGGER.info(
"aca-py remote debugging to "
f"{PYDEVD_PYCHARM_HOST}:{PYDEVD_PYCHARM_AGENT_PORT}"
)
Expand All @@ -47,7 +52,7 @@ def init_debug(args):
suspend=False,
)
except ImportError:
print("pydevd_pycharm library was not found")
LOGGER.error("pydevd_pycharm library was not found")


def run(args):
Expand Down
30 changes: 30 additions & 0 deletions acapy_agent/admin/decorators/auth.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""Authentication decorators for the admin API."""

import functools
import re
from typing import Optional, Pattern

from aiohttp import web

Expand Down Expand Up @@ -48,6 +50,8 @@ def tenant_authentication(handler):
- check for a valid bearer token in the Autorization header if running
in multi-tenant mode
- check for a valid x-api-key header if running in single-tenant mode
- check if the base wallet has access to the requested path if running
in multi-tenant mode
"""

@functools.wraps(handler)
Expand All @@ -61,11 +65,15 @@ async def tenant_auth(request):
)
insecure_mode = bool(profile.settings.get("admin.admin_insecure_mode"))
multitenant_enabled = profile.settings.get("multitenant.enabled")
base_wallet_allowed_route = _base_wallet_route_access(
profile.settings.get("multitenant.base_wallet_routes"), request.path
)

# CORS fix: allow OPTIONS method access to paths without a token
if (
(multitenant_enabled and authorization_header)
or (not multitenant_enabled and valid_key)
or (multitenant_enabled and valid_key and base_wallet_allowed_route)
or insecure_mode
or request.method == "OPTIONS"
):
Expand All @@ -78,3 +86,25 @@ async def tenant_auth(request):
)

return tenant_auth


def _base_wallet_route_access(additional_routes: str, request_path: str) -> bool:
"""Check if request path matches additional routes."""
additional_routes_pattern = _build_additional_routes_pattern(additional_routes)
return _matches_additional_routes(additional_routes_pattern, request_path)


def _build_additional_routes_pattern(pattern_string: str) -> Optional[Pattern]:
"""Build pattern from space delimited list of paths."""
# create array and add word boundary to avoid false positives
if pattern_string:
paths = pattern_string.split(" ")
return re.compile("^((?:)" + "|".join(paths) + ")$")
return None


def _matches_additional_routes(pattern: Pattern, path: str) -> bool:
"""Matches request path to provided pattern."""
if pattern and path:
return bool(pattern.match(path))
return False
Loading

0 comments on commit b72569e

Please sign in to comment.