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

[ICC-201] Set ttl of message and message-status to 3 years for not registered users #230

Merged
merged 18 commits into from
Nov 9, 2022

Conversation

Garma00
Copy link
Contributor

@Garma00 Garma00 commented Oct 27, 2022

List of Changes

  • Added logic to set ttl to 3 years when user is not found;
  • Added unit test;

Motivation and Context

In order to remove messages sent to users not registered we want to set the
ttl to 3 years to message and message-status.

How Has This Been Tested?

Unit test

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.

@pagopa-github-bot
Copy link
Contributor

pagopa-github-bot commented Oct 27, 2022

Warnings
⚠️ This PR changes a total of 395 LOCs, that is more than a reasonable size of 250. Consider splitting the pull request into smaller ones.
⚠️ 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 against 4895b24

ProcessMessage/handler.ts Outdated Show resolved Hide resolved
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.

We also need to introduce this change under feature flag.

ProcessMessage/handler.ts Outdated Show resolved Hide resolved
ProcessMessage/handler.ts Outdated Show resolved Hide resolved
ProcessMessage/handler.ts Outdated Show resolved Hide resolved
ProcessMessage/handler.ts Outdated Show resolved Hide resolved
ProcessMessage/handler.ts Outdated Show resolved Hide resolved
ProcessMessage/__tests__/handler.test.ts Outdated Show resolved Hide resolved
utils/featureFlags.ts Outdated Show resolved Hide resolved
ProcessMessage/index.ts Outdated Show resolved Hide resolved
@@ -531,6 +548,8 @@ describe("getprocessMessageHandler", () => {
TE.of(O.some(messageData))
);
const processMessageHandler = getProcessMessageHandler({
TTL_FOR_USER_NOT_FOUND,
isUserForFeatureFlag,
Copy link
Contributor

Choose a reason for hiding this comment

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

Test this failing scenario without enabling FF, since we added a specific test right after for checking the new scenario.

Suggested change
isUserForFeatureFlag,
isUserForFeatureFlag: (_: FiscalCode) => false,

ProcessMessage/handler.ts Outdated Show resolved Hide resolved
utils/featureFlags.ts Outdated Show resolved Hide resolved
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 9, 2022

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

@Garma00 Garma00 marked this pull request as ready for review November 9, 2022 13:48
@Garma00 Garma00 requested a review from a team as a code owner November 9, 2022 13:48
@Garma00 Garma00 merged commit 1316192 into master Nov 9, 2022
@Garma00 Garma00 deleted the ICC-201 branch November 9, 2022 13:49
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