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

IMN-268 - Fixing readmodel writer DELETE & UPDATE Descriptor document #210

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

ecamellini
Copy link
Collaborator

@ecamellini ecamellini commented Feb 13, 2024

Closes IMN-268

The issues were happening for two reasons:

  1. both UPDATE and DELETE are implemented using more than one subsequent MongoDB updateOne operations. With the first operation updating the version to the new msg.version and the second operation using the same filter "metadata.version": { $lt: msg.version }, the second operation was not being executed.
  2. one of the arrayFilters was causing an error as shown in the Jira card: being a filter on two different top-level fields, it must be separated into two different filters

Tests

Manually tested.

Starting model:

image

1) Updating document

image

2) Updating interface

image

3) Deleting interface

image

4) Deleting document

image

@ecamellini ecamellini marked this pull request as ready for review February 13, 2024 16:51
@ecamellini
Copy link
Collaborator Author

@taglioni-r FYI since you worked on the same functionalities in the last weeks (#179 and #185).

I noticed these issues while working on #198 and testing manually. Unfortunately, the *-readmodel-writer logic is not covered by tests (yet), so these issues can be caught only through manual testing 😢

I remember we discussed also covering readmodel-writer modules with our integration tests - do you know if someone is investigating if/how to do it? In the meantime, I would perform also manual testing on each PR, to catch bugs like this one

@ecamellini ecamellini changed the title IMN-268 - Fixing readmodel write for DELETE & UPDATE Descriptor document IMN-268 - Fixing readmodel writer DELETE & UPDATE Descriptor document Feb 13, 2024
@taglioni-r
Copy link
Contributor

@taglioni-r FYI since you worked on the same functionalities in the last weeks (#179 and #185).

I noticed these issues while working on #198 and testing manually. Unfortunately, the *-readmodel-writer logic is not covered by tests (yet), so these issues can be caught only through manual testing 😢

I remember we discussed also covering readmodel-writer modules with our integration tests - do you know if someone is investigating if/how to do it? In the meantime, I would perform also manual testing on each PR, to catch bugs like this one

Hey @ecamellini, thanks for the fix!
For the topic you are raising, I have had #116 and #117 in draft for quite some time: I would definitely add tests there as well. We can just start the conversation with the team.

Copy link
Contributor

@galales galales left a comment

Choose a reason for hiding this comment

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

thanks!

Copy link
Collaborator

@MalpenZibo MalpenZibo left a comment

Choose a reason for hiding this comment

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

🚀

@ecamellini ecamellini force-pushed the IMN-268-fixing-delete-update-descriptor-document branch from 1c6d03d to ed55b35 Compare February 14, 2024 16:29
@ecamellini ecamellini merged commit 826bba6 into main Feb 14, 2024
5 checks passed
@ecamellini ecamellini deleted the IMN-268-fixing-delete-update-descriptor-document branch February 14, 2024 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants