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

[TTAHUB-3860] Prevent unnecessary throwing of error from grant update - CDI replacements #2655

Merged
merged 9 commits into from
Feb 18, 2025

Conversation

AdamAdHocTeam
Copy link
Collaborator

@AdamAdHocTeam AdamAdHocTeam commented Feb 14, 2025

Description of change

The purpose of this ticket was to investigate an error that was being thrown during the AM grant replacement job.

"updateGrantsRecipients: Error updating grants: Expected one region and recipient for grant 9612, got 0 valid grants"

This error was being thrown when updating CDI grants to replace existing grants. The problem here is that the code doesn't take into account that there might not be any valid grant replacements for that CDI grant. So in this case the solution is to prevent an error from being thrown when there is nothing valid to process.

Upon looking at the code it's apparent that we may need to update some of the logic to handle cases when a single CDI grant replaces multiple normal grants. However I will create another ticket to check with OHS on this use case.

This ticket was created for the many to one CDI replacement: https://jira.acf.gov/browse/TTAHUB-3912

How to test

  • Review the code.
  • Run the job and make sure the error no longer shows.

Note: I have attached the zip files to process to the ticket. You will need to create a CLI to run this in the package.json.

Issue(s)

Checklists

Every PR

  • Meets issue criteria
  • JIRA ticket status updated
  • Code is meaningfully tested
  • Meets accessibility standards (WCAG 2.1 Levels A, AA)
  • API Documentation updated
  • Boundary diagram updated
  • Logical Data Model updated
  • Architectural Decision Records written for major infrastructure decisions
  • UI review complete
  • QA review complete

Before merge to main

  • OHS demo complete
  • Ready to create production PR

Production Deploy

  • Staging smoke test completed

After merge/deploy

  • Update JIRA ticket status

@AdamAdHocTeam AdamAdHocTeam marked this pull request as ready for review February 14, 2025 16:48
@thewatermethod
Copy link
Collaborator

Should we log a message saying something like "Grant X has no replacement grants"?

@AdamAdHocTeam
Copy link
Collaborator Author

AdamAdHocTeam commented Feb 14, 2025

Should we log a message saying something like "Grant X has no replacement grants"?

I went back and fourth on this, but I added something in case we need it.

@AdamAdHocTeam AdamAdHocTeam merged commit 6e3c4ec into main Feb 18, 2025
10 checks passed
@AdamAdHocTeam AdamAdHocTeam deleted the al-ttahub-3860-investigate-error-on-update-grants branch February 18, 2025 14:35
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.

2 participants