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

#3260 - CAS Integration 3A - Create new Supplier and Site - Retry on Error and Scheduler Time #3830

Merged
merged 8 commits into from
Oct 24, 2024

Conversation

andrewsignori-aot
Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot commented Oct 24, 2024

  • Changed the to allow throwing an error when some error is present in the process summary error attending the below AC.
If some error is present throw in the scheduler to allow it to be retried.
  • Added the below E2E to test the above change.
    • Should throw an error for the first student and process the second one when the CAS API call failed for the first student but worked for the second one.
  • Adjusted the scheduler to be executed during weekdays only attending the below AC (0 20 * * 1-5).
Schedule these to go once a day at noon during weekdays for now.

Rollback

image

Fix

  • COUNTRY_CANADA was defined as "canada" when it is defined as "Canada" is all form.io definitions leading to an incorrect logic.
  • SFTP issue while providing the file content as a string instead of a Buffer as identified by @dheepak-aot.

@andrewsignori-aot andrewsignori-aot self-assigned this Oct 24, 2024
@andrewsignori-aot andrewsignori-aot changed the title #3260 - CAS Integration 3A - Create new Supplier and Site - Retry on Error #3260 - CAS Integration 3A - Create new Supplier and Site - Retry on Error and Scheduler Time Oct 24, 2024
@andrewsignori-aot andrewsignori-aot added the DB DB migration involved label Oct 24, 2024
@andrewsignori-aot andrewsignori-aot marked this pull request as ready for review October 24, 2024 16:10
@sh16011993 sh16011993 self-requested a review October 24, 2024 16:13
@@ -63,19 +62,16 @@ export class CASSupplierIntegrationScheduler extends BaseScheduler<void> {
`Records updated: ${suppliersUpdated}.`,
],
processSummary,
{ throwOnError: true },
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@dheepak-aot dheepak-aot self-requested a review October 24, 2024 16:26
Copy link
Collaborator

@sh16011993 sh16011993 left a comment

Choose a reason for hiding this comment

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

Great work @andrewsignori-aot 👍 Thank You for explaining the mocks related to the e2e test. Very helpful.

sims.queue_configurations
SET
queue_configuration = '{
"cron": "0 19 * * 1-5",
Copy link
Collaborator

Choose a reason for hiding this comment

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

AC says noon. Either we can have the AC updated or change here.

image

Copy link
Collaborator

Choose a reason for hiding this comment

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

My bad. I missed the PT part. As we discussed noon PST should be 8PM UTC.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

My bad too. All schedulers on wiki are using PST as a reference.

Copy link
Collaborator Author

@andrewsignori-aot andrewsignori-aot Oct 24, 2024

Choose a reason for hiding this comment

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

Update to 8 PM UTC which will convert to 12 PM PST.
Updated the wik also.

Comment on lines +154 to +155
export function convertToASCIIString(rawContent?: string): string | null {
return convertToASCII(rawContent)?.toString() ?? null;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for the change.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for raising the issue 😉

Copy link

Copy link

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 22.56% ( 3662 / 16233 )
Methods: 10.16% ( 205 / 2018 )
Lines: 25.96% ( 3181 / 12255 )
Branches: 14.08% ( 276 / 1960 )

Copy link

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 58.64% ( 509 / 868 )
Methods: 52.88% ( 55 / 104 )
Lines: 62.27% ( 411 / 660 )
Branches: 41.35% ( 43 / 104 )

Copy link

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 83.81% ( 1170 / 1396 )
Methods: 83.94% ( 115 / 137 )
Lines: 84.74% ( 994 / 1173 )
Branches: 70.93% ( 61 / 86 )

Copy link

E2E SIMS API Coverage Report

Totals Coverage
Statements: 66.01% ( 5571 / 8439 )
Methods: 63.3% ( 683 / 1079 )
Lines: 70.12% ( 4401 / 6276 )
Branches: 44.93% ( 487 / 1084 )

sims.queue_configurations
SET
queue_configuration = '{
"cron": "0 20 * * 1-5",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks. Please update the PR description as well.

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 change. Looks good 👍

@andrewsignori-aot andrewsignori-aot added this pull request to the merge queue Oct 24, 2024
Merged via the queue into main with commit 0f8c1b3 Oct 24, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DB DB migration involved Queue Consumers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants