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

[#IC-303] Add Message View to User Data Extract and Delete #186

Merged
merged 2 commits into from
Apr 29, 2022

Conversation

AleDore
Copy link
Contributor

@AleDore AleDore commented Mar 31, 2022

List of Changes

  • Add Message View delete on DeleteUserDataActivity
  • Add Message View data on ExtractUserDataActivity

Motivation and Context

This PR is needed by legal behaviour in order to manage new message-view collection, introduced by pagination.

How Has This Been Tested?

Unit tests

Screenshots (if appropriate):

Types of changes

  • Chore (nothing changes by a user perspective)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@AleDore AleDore requested a review from a team as a code owner March 31, 2022 16:33
@AleDore AleDore requested review from michaeldisaro, domenicoventriglia, CaraDune, fabriziopapi and gquadrati and removed request for a team March 31, 2022 16:33
@pagopa-github-bot
Copy link
Contributor

Warnings
⚠️

Please include a Pivotal story at the beginning of the PR title (see below).

Example of PR titles that include pivotal stories:

  • single story: [#123456] my PR title
  • multiple stories: [#123456,#123457,#123458] my PR title

Generated by 🚫 dangerJS

Copy link
Collaborator

@CaraDune CaraDune left a comment

Choose a reason for hiding this comment

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

perfect, thanks guys!

@fabriziopapi
Copy link
Contributor

I'm not sure if the "extract" part is strictly required.

Copy link
Contributor

@gquadrati gquadrati left a comment

Choose a reason for hiding this comment

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

Just few comments

Comment on lines 410 to 427
messagesView: pipe(
messageViewModel.getQueryIterator({
parameters: [
{
name: "@fiscalCode",
value: fiscalCode
}
],
query: `SELECT * FROM m WHERE m.fiscalCode = @fiscalCode
ORDER BY m.fiscalCode, m.id DESC`
}),
TE.of,
TE.chain(iterable =>
TE.tryCatch(
() => asyncIterableToArray(iterable),
toCosmosErrorResponse
)
),
Copy link
Contributor

Choose a reason for hiding this comment

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

asyncIterableToArray or asyncIteratorToArray?

expect(E.isRight(result)).toBe(true);
});

it("should stop if there is an error while looking for a message View (404)", async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Add

expect(mockDeleteMessageView).not.toHaveBeenCalled();

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@AleDore AleDore merged commit 7abb9eb into master Apr 29, 2022
@AleDore AleDore deleted the IC-303_add_message_view_to_user_data_processing branch April 29, 2022 14:48
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.

5 participants