Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: add agent context #920

Conversation

TimoGlastra
Copy link
Contributor

@TimoGlastra TimoGlastra commented Jul 3, 2022

Signed-off-by: Timo Glastra [email protected]

This is the same PR as #881, but based off the 0.3.0-pre branch instead of main. There's no changes compared to #881 except for making it work with this branch (making the new w3c services stateless). Due to the breaking changes we don't want to have this in main just yet.

BREAKING CHANGE: To make AFJ multi-tenancy ready, all services and repositories have been made stateless. A new AgentContext is introduced that holds the current context, which is passed to each method call. The public API hasn't been affected, but due to the large impact of this change it is marked as breaking.

@TimoGlastra TimoGlastra requested a review from a team as a code owner July 3, 2022 11:12
@TimoGlastra TimoGlastra added multitenancy Tasks related to multi-tenancy breaking change PR that introduces a breaking change labels Jul 3, 2022
@TimoGlastra TimoGlastra force-pushed the refactor/add-agent-context-030 branch from 999a888 to eae5f82 Compare July 3, 2022 11:20
@codecov-commenter
Copy link

Codecov Report

Merging #920 (eae5f82) into 0.3.0-pre (938a889) will increase coverage by 0.11%.
The diff coverage is 86.80%.

@@              Coverage Diff              @@
##           0.3.0-pre     #920      +/-   ##
=============================================
+ Coverage      86.51%   86.62%   +0.11%     
=============================================
  Files            512      515       +3     
  Lines          12468    12542      +74     
  Branches        2103     2131      +28     
=============================================
+ Hits           10787    10865      +78     
+ Misses          1585     1582       -3     
+ Partials          96       95       -1     
Impacted Files Coverage Δ
packages/core/src/agent/AgentConfig.ts 90.16% <ø> (-0.47%) ⬇️
packages/core/src/constants.ts 100.00% <ø> (ø)
...les/credentials/formats/CredentialFormatService.ts 100.00% <ø> (ø)
...cation/handlers/V1RevocationNotificationHandler.ts 71.42% <ø> (ø)
...cation/handlers/V2RevocationNotificationHandler.ts 71.42% <ø> (ø)
...ges/core/src/modules/credentials/services/index.ts 100.00% <ø> (ø)
...ore/src/modules/dids/methods/web/WebDidResolver.ts 60.00% <ø> (ø)
...c/modules/routing/handlers/MediationDenyHandler.ts 62.50% <0.00%> (+6.94%) ⬆️
...ckages/core/src/transport/HttpOutboundTransport.ts 9.75% <0.00%> (-1.88%) ⬇️
packages/core/src/transport/WsOutboundTransport.ts 9.23% <0.00%> (-2.37%) ⬇️
... and 98 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 938a889...eae5f82. Read the comment docs.

Signed-off-by: Timo Glastra <[email protected]>

BREAKING CHANGE: To make AFJ multi-tenancy ready, all services and repositories have been made stateless. A new `AgentContext` is introduced that holds the current context, which is passed to each method call. The public API hasn't been affected, but due to the large impact of this change it is marked as braking.

Signed-off-by: Timo Glastra <[email protected]>
@TimoGlastra TimoGlastra force-pushed the refactor/add-agent-context-030 branch from eae5f82 to 017d2b7 Compare July 5, 2022 14:51
@berendsliedrecht
Copy link
Contributor

I assume the test will succeed once #935 is merged.

@TimoGlastra
Copy link
Contributor Author

I assume the test will succeed once #935 is merged.

Yes, locally that's the only tests failing

@TimoGlastra
Copy link
Contributor Author

Merging as the only failed test is the one as fixed in #935 so we can keep the PR review going

@TimoGlastra TimoGlastra merged commit 65579dd into openwallet-foundation:0.3.0-pre Jul 6, 2022
@TimoGlastra TimoGlastra deleted the refactor/add-agent-context-030 branch July 6, 2022 14:37
TimoGlastra added a commit that referenced this pull request Aug 11, 2022
Signed-off-by: Timo Glastra <[email protected]>

BREAKING CHANGE: To make AFJ multi-tenancy ready, all services and repositories have been made stateless. A new `AgentContext` is introduced that holds the current context, which is passed to each method call. The public API hasn't been affected, but due to the large impact of this change it is marked as breaking.
TimoGlastra added a commit that referenced this pull request Aug 26, 2022
Signed-off-by: Timo Glastra <[email protected]>

BREAKING CHANGE: To make AFJ multi-tenancy ready, all services and repositories have been made stateless. A new `AgentContext` is introduced that holds the current context, which is passed to each method call. The public API hasn't been affected, but due to the large impact of this change it is marked as breaking.
TimoGlastra added a commit that referenced this pull request Aug 26, 2022
Signed-off-by: Timo Glastra <[email protected]>

BREAKING CHANGE: To make AFJ multi-tenancy ready, all services and repositories have been made stateless. A new `AgentContext` is introduced that holds the current context, which is passed to each method call. The public API hasn't been affected, but due to the large impact of this change it is marked as breaking.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change PR that introduces a breaking change multitenancy Tasks related to multi-tenancy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants