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

Import events from 3rd-party with respect for tenancy #1516

Merged
merged 4 commits into from
Jun 5, 2023

Conversation

armiol
Copy link
Contributor

@armiol armiol commented Jun 4, 2023

This changeset is a port of #1503 to master. Here is a full PR description for reviewer's convenience.

When it comes about importing the third-party events, the framework provides a ThirdPartyContext tool.

However, in a multi-tenant application, the imported events were dispatched in a straightforward manner, without specifying the TenantId via TenantAwareRunner.

The corresponding test was also flawed: in fact, it was dispatching the events to a single-tenant Bounded Context.

This PR addresses the issue by fixing the test and making IncomingEventObserver (part of IntegrationBroker, an intermediary between ThirdPartyContext and "domestic" Bounded Contexts) to explicitly use TenantAwareOperation during the event dispatch.

The version is set to 2.0.0-SNAPSHOT.146.

@armiol armiol self-assigned this Jun 4, 2023
@codecov
Copy link

codecov bot commented Jun 4, 2023

Codecov Report

Merging #1516 (1eef060) into master (5fc67d5) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1516   +/-   ##
=========================================
  Coverage     89.71%   89.71%           
- Complexity     4933     4934    +1     
=========================================
  Files           635      635           
  Lines         15453    15454    +1     
  Branches        888      888           
=========================================
+ Hits          13863    13864    +1     
  Misses         1286     1286           
  Partials        304      304           

@armiol armiol changed the base branch from prohibit-calling-state-from-apply to master June 4, 2023 15:21
@armiol armiol marked this pull request as ready for review June 4, 2023 15:21
@armiol
Copy link
Contributor Author

armiol commented Jun 4, 2023

@alexander-yevsyukov PTAL.

Copy link
Contributor

@alexander-yevsyukov alexander-yevsyukov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@armiol armiol added this pull request to the merge queue Jun 5, 2023
Merged via the queue into master with commit d6822a7 Jun 5, 2023
@armiol armiol deleted the third-party-events-with-tenancy branch June 5, 2023 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants