Skip to content

Conversation

ecamellini
Copy link
Collaborator

@ecamellini ecamellini commented Oct 6, 2025

Issue

PIN-7824

Impacted Services

m2m-event-dispatcher

Tests

Added automated tests, working ✅

Base automatically changed from feature/PIN-7853_writing-agreement-m2m-events to develop October 8, 2025 14:45
await insertIfVersionNotPresent(
event,
eserviceInM2MEvent,
eq(eserviceInM2MEvent.eserviceId, event.eserviceId)
Copy link
Contributor

Choose a reason for hiding this comment

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

should the filter include the resourceVersion?
If I'm not missing something, this limit may take a different resource version, despite the existence of the current event

await insertIfVersionNotPresent(
event,
agreementInM2MEvent,
eq(agreementInM2MEvent.agreementId, event.agreementId)
Copy link
Contributor

Choose a reason for hiding this comment

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

same

await insertIfVersionNotPresent(
event,
attributeInM2MEvent,
eq(attributeInM2MEvent.attributeId, event.attributeId)
Copy link
Contributor

Choose a reason for hiding this comment

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

same

@ecamellini
Copy link
Collaborator Author

@galales you're right! It was still working because limit 1 was getting the latest event, so the one with the highest version, but indeed it was missing a check on the version. Now it should be fixed, I added it to the helper function instead of adding it to all filters you mentioned, see 103a175

@ecamellini ecamellini requested a review from galales October 17, 2025 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants