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

#4079 - Queue Monitoring - Schedulers Refactor (Part 7) #4179

Merged
merged 9 commits into from
Dec 27, 2024

Conversation

andrewsignori-aot
Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot commented Dec 26, 2024

Refactored the below schedulers and E2E tests.

  • ece-process-integration
  • ece-process-response-integration
    • Note: some errors were converted to warnings because they are not recoverable and the job should not retry because those conditions would not be resolved.
  • ier12-integration

@andrewsignori-aot andrewsignori-aot changed the title Refactor ECE upload #4079 - Queue Monitoring - Schedulers Refactor (Part 7) Dec 26, 2024
@andrewsignori-aot andrewsignori-aot marked this pull request as ready for review December 27, 2024 00:15
@dheepak-aot dheepak-aot self-requested a review December 27, 2024 17:02
this.logger.log("ECE request file generation completed.");

if (!uploadResults.length) {
return "No eligible COEs found.";
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

Comment on lines +37 to +41
const locationResultSummary = new ProcessSummary();
processSummary.children(locationResultSummary);
result.summary.forEach((info) => locationResultSummary.info(info));
result.warnings.forEach((error) => locationResultSummary.warn(error));
result.errors.forEach((error) => locationResultSummary.error(error));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a particular reason why we did not use the process summary inside the processing service here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The service is heavily relying in the current summary and replacing it by the ProcessSummary would demand way more refactor, which I considered completely outside the target of this effort.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Makes sense. Can we have a ticket created to not lose the track of that effort?

} catch (error: unknown) {
const errorMessage = "Error while uploading content for IER 12.";
this.logger.error(errorMessage, error);
processSummary.error(errorMessage, error);
Copy link
Collaborator

Choose a reason for hiding this comment

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

What could be the benefit of not throwing the error here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

First, the previous log that stated "processing must continue for the next institution without aborting." was misleading because this block is the last one before wrapping up the operation.
Throwing or not throwing here will not change the fact that the job will retry, but not throwing will allow the IER12UploadResult to be returned and logged before the job fails.

@dheepak-aot
Copy link
Collaborator

Good Job @andrewsignori-aot. Only minor comments.

Copy link

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 22.22% ( 3783 / 17024 )
Methods: 10.19% ( 219 / 2149 )
Lines: 25.66% ( 3278 / 12773 )
Branches: 13.61% ( 286 / 2102 )

Copy link

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 65.59% ( 589 / 898 )
Methods: 59.63% ( 65 / 109 )
Lines: 68.72% ( 468 / 681 )
Branches: 51.85% ( 56 / 108 )

Copy link

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 86.15% ( 1238 / 1437 )
Methods: 82.32% ( 135 / 164 )
Lines: 88.44% ( 1025 / 1159 )
Branches: 68.42% ( 78 / 114 )

Copy link

E2E SIMS API Coverage Report

Totals Coverage
Statements: 67.4% ( 5922 / 8787 )
Methods: 65.09% ( 729 / 1120 )
Lines: 71.33% ( 4647 / 6515 )
Branches: 47.4% ( 546 / 1152 )

Copy link
Collaborator

@dheepak-aot dheepak-aot left a comment

Choose a reason for hiding this comment

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

Thanks for making the changes. Looks good. 👍

Copy link
Collaborator

@guru-aot guru-aot left a comment

Choose a reason for hiding this comment

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

LGTM, nice work @andrewsignori-aot

@andrewsignori-aot andrewsignori-aot added this pull request to the merge queue Dec 27, 2024
Merged via the queue into main with commit c0f253c Dec 27, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants