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

[#IP-154] UserDataProcessingDeleteOrchestrator can manage previous failed requests if they are resumed #156

Merged
merged 2 commits into from
Jul 26, 2021

Conversation

michaeldisaro
Copy link
Contributor

@michaeldisaro michaeldisaro commented Jul 23, 2021

List of Changes

  • Added activity to check if a request has previously failed
  • Added a spy on context mock
  • Changed the logic of UserDataProcessingDeleteOrchestrator
  • Added more tests

Motivation and Context

We want to run a recovery on FAILED delete requests by setting them to PENDING again and letting the orchestrator do the job.
There are 3 points to respect:

  • No grace period is waited for failed requests
  • No email is sent for failed requests
  • Everything must work as expected for new request

How Has This Been Tested?

It has been tested by performing:

  • yarn install --frozen-lockfile
  • yarn build
  • yarn lint
  • yarn test
  • tested on io-mock for the part regarding the new called activity to verify it's being called correctly

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

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

Comment on lines +59 to +69
tableService.retrieveEntity(
failedUserDataProcessingTable,
i.choice,
i.fiscalCode,
null,
(error: Error, result: TableEntry, response: ServiceResponse) =>
response.isSuccessful
? resolve(some(result))
: response.statusCode === 404
? resolve(none)
: reject(error)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we try to taskify this without manage explicitly a Promise?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I'd like that. Would you like to have a pair session?

Copy link
Contributor

@AleDore AleDore left a comment

Choose a reason for hiding this comment

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

LGTM

@michaeldisaro michaeldisaro merged commit 3636839 into master Jul 26, 2021
@michaeldisaro michaeldisaro deleted the ip-154 branch July 26, 2021 14:07
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.

3 participants