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

#1501 - Process ECE Response file part 2 #1947

Merged
merged 14 commits into from
May 23, 2023

Conversation

dheepak-aot
Copy link
Collaborator

@dheepak-aot dheepak-aot commented May 18, 2023

Process ECE Response file part 2

Covered in the PR

  • Implementing the ECE Response processing service to read and process the ECE file.
  • Updated the downloadResponseFileLines in SFTPIntegrationBase to optionally check if the file exists before downloading it.
  • Created scheduler for ECE response file processing.
  • Addressed a comment mentioned by @andrewsignori-aot in the previous PR.

To be covered in upcoming PR

  • E2E tests

@dheepak-aot dheepak-aot self-assigned this May 18, 2023
@dheepak-aot dheepak-aot marked this pull request as ready for review May 19, 2023 00:17
* exist before downloading it.
* @returns parsed records from the file.
*/
protected async downloadResponseFileLines(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Using the overload signature just for the sake of the optional parameter can be avoided in this scenario IMO.

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 over load is actually used to return different types here.

The main intention of using overload is the return type is now changed to <string[] | false> from <string[]>

So most of the method consumers are using a forEach on the method return and we need to type cast everywhere if we are not using the overload.

image

Copy link
Contributor

Choose a reason for hiding this comment

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

but the 2nd overload signature is the same as the implementation signature right? so, does it make sense? and 1st overload signature is covered in the 2nd overload signature.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As per my understanding and what I saw(in one of the sync up with @andrewsignori-aot) if we use override to an implementation, the implementation becomes as good as private method, i.e it cannot be accessed directly from outside the class. Hence we need an override to the actual method with same arguments and return type.

Copy link
Collaborator

Choose a reason for hiding this comment

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

When overloading the first signature is not supposed to be exposed. If I am not wrong it does not even show in the VS Code IntelliSense.

image

image

I missed the part that the first and the second methods have different return types, so I am good.

Copy link
Contributor

@ann-aot ann-aot left a comment

Choose a reason for hiding this comment

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

Good work @dheepak-aot. Added some comment

}
if (hasErrors) {
throw new Error(
`The file consists invalid data and cannot be processed.`,
Copy link
Contributor

Choose a reason for hiding this comment

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

double quotes?

Copy link
Contributor

@ann-aot ann-aot left a comment

Choose a reason for hiding this comment

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

added two minor comment and replied to a comment

Copy link
Collaborator

@andrewsignori-aot andrewsignori-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 doing all the changes, looks good 👍
If possible let's ensure that the team is on the same page about this one #1947 (comment)

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.4% 0.4% Duplication

@github-actions
Copy link

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 17.7% ( 2052 / 11596 )
Methods: 7.86% ( 117 / 1489 )
Lines: 20.5% ( 1804 / 8798 )
Branches: 10.01% ( 131 / 1309 )

@github-actions
Copy link

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 33.02% ( 177 / 536 )
Methods: 22.08% ( 17 / 77 )
Lines: 40.1% ( 158 / 394 )
Branches: 3.08% ( 2 / 65 )

@github-actions
Copy link

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 68.15% ( 383 / 562 )
Methods: 57.75% ( 41 / 71 )
Lines: 70.27% ( 338 / 481 )
Branches: 40% ( 4 / 10 )

Copy link
Contributor

@ann-aot ann-aot left a comment

Choose a reason for hiding this comment

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

Good work @dheepak-aot 👍 Thanks for doing the changes

@github-actions
Copy link

E2E SIMS API Coverage Report

Totals Coverage
Statements: 40.97% ( 2851 / 6958 )
Methods: 34.11% ( 308 / 903 )
Lines: 46.31% ( 2406 / 5195 )
Branches: 15.93% ( 137 / 860 )

@dheepak-aot dheepak-aot merged commit e6f568a into main May 23, 2023
@dheepak-aot dheepak-aot temporarily deployed to DEV May 23, 2023 23:31 — with GitHub Actions Inactive
@dheepak-aot dheepak-aot temporarily deployed to DEV May 23, 2023 23:31 — with GitHub Actions Inactive
@dheepak-aot dheepak-aot temporarily deployed to DEV May 23, 2023 23:31 — with GitHub Actions Inactive
@dheepak-aot dheepak-aot temporarily deployed to DEV May 23, 2023 23:31 — with GitHub Actions Inactive
@dheepak-aot dheepak-aot temporarily deployed to DEV May 23, 2023 23:31 — with GitHub Actions Inactive
@dheepak-aot dheepak-aot temporarily deployed to DEV May 23, 2023 23:31 — with GitHub Actions Inactive
@dheepak-aot dheepak-aot temporarily deployed to DEV May 23, 2023 23:45 — with GitHub Actions Inactive
@dheepak-aot dheepak-aot temporarily deployed to DEV May 23, 2023 23:47 — with GitHub Actions Inactive
@dheepak-aot dheepak-aot temporarily deployed to DEV May 23, 2023 23:47 — with GitHub Actions Inactive
@dheepak-aot dheepak-aot temporarily deployed to DEV May 23, 2023 23:47 — with GitHub Actions Inactive
@dheepak-aot dheepak-aot temporarily deployed to DEV May 23, 2023 23:47 — with GitHub Actions Inactive
@dheepak-aot dheepak-aot deleted the feature/#1501-process-ece-response-part-2 branch May 24, 2023 15:46
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