-
Notifications
You must be signed in to change notification settings - Fork 0
EEDFIAL-375 update job payload to slack #5
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
EEDFIAL-375 update job payload to slack #5
Conversation
rtavernaea
commented
Jan 5, 2026
edandylytics
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can get this there pretty quickly. There are a number of comments, but really just three main themes:
- Let's tighten up the typing. There's a prisma generator that'll help with that. That will catch some of the cases where this code might bomb out.
- Refactoring the
resourceErrorsgetter a bit should allow us to simplify things - Let's optimize the summary for concision and scan-ability. It's OK if it doesn't read like a sentence.
| const allProcessedRecordsFailed = | ||
| runSummary.studentAssessments.records_processed === | ||
| runSummary.studentAssessments.records_failed; | ||
| const unmatchedStudentsInfo = run.unmatchedStudentsInfo as any; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use the prisma generator to type this more specifically. The as any causes us to miss the case where unmatchedStudentsInfo can be null.
edandylytics
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Submitting with some notes from our pairing
edandylytics
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good. Just a few small things and we're there.
app/models/src/dtos/job.dto.ts
Outdated
| resource: reportableFailedResource, | ||
| failed: this.resourceSummaries?.[reportableFailedResource]?.failed ?? 0, | ||
| total: | ||
| this.resourceSummaries?.[reportableFailedResource]?.success! + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to assert the presence of success?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh hm that may have been an ai autocomplete that was unintentional. But i think it's because resourceSummaries is possibly undefined. I can change this line to
this.resourceSummaries?.[reportableFailedResource].success ?? 0 +
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good 👍
edandylytics
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems we lost the PrismaJson types at some point. Once those are back in and the app builds, should be good to go
edandylytics
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Let's get this in!