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

Hotfix: Modify process that reads SIN & CRA verification response files if required #3745

Closed
8 tasks
JasonCTang opened this issue Sep 26, 2024 · 3 comments
Closed
8 tasks
Assignees
Labels
Devops Devops

Comments

@JasonCTang
Copy link
Collaborator

JasonCTang commented Sep 26, 2024

The transmission SIN verification & CRA income verification request files to their respective federal agencies will be handled by SFAS as there is a file sequencing number that must align between our two systems. The data itself, will not be merged and our file will be sent as is. However, we will be receiving individual response files for both SIMS and SFAS and there will be no way to distinguish between the two.

We need to ensure the SIMS jobs that read the response files can handle the SFAS response files gracefully. In other words, make sure when the SIMS job reads the SFAS response file and fails to find a corresponding record, the job will report the error but continue processing the remaining records in the file until the end and then move the file to the archive folder as if it were completed successfully.

Also, with the SIN file specifically, we attempt to match the SIMS Reference_IDX which will not be present in the SFAS file. We want to disable to error reporting of this particular error.

Acceptance Criteria

  • Jobs must continue processing remaining records in a file after it fails to process a record.
  • SIN and CRA response files will need to be archived after processing even where there are failed records. (IMB staff will need to monitor the jobs to confirm if errors occur processing SIMS response files and address them accordingly)
  • Disable error reporting when SIMS Reference_IDX fails to match.
  • If records are identified as SIMS records (based on the project area information being present), errors will be generated as usual.
    • If records are identified as SFAS records (based on the project area information NOT being present), records should be skipped.
  • For the SIN validation (source reference), if the referenceIndex is not found on SIMS, assume the record is from SFAS and do not log as an error.
  • For income verifications, the records should already be skipped. Execute a manual test to ensure that a file with records that do not contain the VERIFICATION_ID in the free project area is skipped. Consider creating an E2E to execute the test.
  • Demo for both cases with a sample file.
@JasonCTang JasonCTang added the Dev & Architecture Development and Architecture label Sep 26, 2024
@sslaws
Copy link
Contributor

sslaws commented Sep 27, 2024

@JasonCTang to complete ticket with ACs and then this will go to Decomp and merge #3746 into this ticket as well.

@JasonCTang JasonCTang added this to the 2.0 Part-Time Students MVP milestone Oct 8, 2024
@CarlyCotton CarlyCotton changed the title Investigate and modify process that reads SIN verificaiton response file if required Investigate and modify process that reads SIN & CRA verification response files if required Oct 8, 2024
@andrewsignori-aot andrewsignori-aot removed the Dev & Architecture Development and Architecture label Oct 8, 2024
@michesmith michesmith changed the title Investigate and modify process that reads SIN & CRA verification response files if required Modify process that reads SIN & CRA verification response files if required Oct 9, 2024
@michesmith michesmith added the Devops Devops label Oct 16, 2024
@bidyashish bidyashish self-assigned this Oct 21, 2024
bidyashish added a commit that referenced this issue Oct 29, 2024
github-merge-queue bot pushed a commit that referenced this issue Oct 30, 2024
…es (#3835)

***Acceptance Criteria***
- [x] Jobs must continue processing remaining records in a file after it
fails to process a record.
- [x] SIN and CRA response files will need to be archived after
processing even where there are failed records. (IMB staff will need to
monitor the jobs to confirm if errors occur processing SIMS response
files and address them accordingly)
- [x] Disable error reporting when SIMS Reference_IDX fails to match.
- [x] If records are identified as SIMS records (based on the project
area information being present), errors will be generated as usual.
- [x] If records are identified as SFAS records (based on the project
area information NOT being present), records should be skipped.
- [x] For the SIN validation ([source
reference](https://github.com/bcgov/SIMS/blob/8864eaa8a5f62360f5e3c91c6de06f319e008250/sources/packages/backend/libs/integrations/src/services/sin-validation/sin-validation.service.ts#L119)),
if the `referenceIndex` is not found on SIMS, assume the record is from
SFAS and do not log as an error.
- [x] For income verifications, the records should already be skipped.
Execute a manual test to ensure that a file with records that do not
contain the `VERIFICATION_ID` in the free project area is skipped.
Consider creating an E2E to execute the test.
- [x] Demo for both cases with a sample file.
@ninosamson ninosamson changed the title Modify process that reads SIN & CRA verification response files if required Hotfix: Modify process that reads SIN & CRA verification response files if required Oct 30, 2024
dheepak-aot pushed a commit that referenced this issue Oct 30, 2024
…es (#3835)

***Acceptance Criteria***
- [x] Jobs must continue processing remaining records in a file after it
fails to process a record.
- [x] SIN and CRA response files will need to be archived after
processing even where there are failed records. (IMB staff will need to
monitor the jobs to confirm if errors occur processing SIMS response
files and address them accordingly)
- [x] Disable error reporting when SIMS Reference_IDX fails to match.
- [x] If records are identified as SIMS records (based on the project
area information being present), errors will be generated as usual.
- [x] If records are identified as SFAS records (based on the project
area information NOT being present), records should be skipped.
- [x] For the SIN validation ([source
reference](https://github.com/bcgov/SIMS/blob/8864eaa8a5f62360f5e3c91c6de06f319e008250/sources/packages/backend/libs/integrations/src/services/sin-validation/sin-validation.service.ts#L119)),
if the `referenceIndex` is not found on SIMS, assume the record is from
SFAS and do not log as an error.
- [x] For income verifications, the records should already be skipped.
Execute a manual test to ensure that a file with records that do not
contain the `VERIFICATION_ID` in the free project area is skipped.
Consider creating an E2E to execute the test.
- [x] Demo for both cases with a sample file.
dheepak-aot added a commit that referenced this issue Oct 30, 2024
## Cherry pick commits

The following commits are cherry picked and committed into
`file-integration-fix/cherry-pick-branch` branch from `main` branch.

- #3833 - SIN Validation - Gender Field Limit - Commit:8040205 - SHA:
8040205
- #3831 - SINF restriction bridge mapping and rename to SINR -
Commit:3ed8c2e - SHA: 3ed8c2e
- #3825 - Virus Scanning - Not functioning PROD - Commit: 5bb5050 - SHA:
5bb5050
- #3745 - Modify process that reads SIN & CRA verification response
files - Commit: 20fcda4 - SHA: 20fcda4
@CarlyCotton
Copy link
Collaborator

CarlyCotton commented Nov 1, 2024

CRA response file with non-SIM records was read with no errors.
SIN response file with non-SIM records was read in and the correct SIMS records verified. (And not moving to Archive)
HOWEVER, the mixed file is failing the hash check.

@CarlyCotton
Copy link
Collaborator

Alll good to go. Processed SIN file with mixed records after I fixed my incoming test file to the right spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Devops Devops
Projects
None yet
Development

No branches or pull requests

7 participants