Skip to content

EDFIAL-576 Make unmatched-student-file-specific download url endpoint - #116

Open
rtavernaea wants to merge 5 commits into
developmentfrom
EDFIAL-576
Open

EDFIAL-576 Make unmatched-student-file-specific download url endpoint#116
rtavernaea wants to merge 5 commits into
developmentfrom
EDFIAL-576

Conversation

@rtavernaea

Copy link
Copy Markdown
Collaborator

ticket

  • Changes the endpoint for downloadUrlForOutputFile to :jobId/output-files/input_no_student_id_match.csv and removes the fileName param
  • Remove unmatchedStudentsFile getter
  • Add hasUnmatchedtudents getter that reads from unmatchedStudentsInfo for hiding/displaying the Unmatched Students component on the front end

@amazon-inspector-ohio

Copy link
Copy Markdown

⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done

@snyk-io-us

snyk-io-us Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@amazon-inspector-ohio

Copy link
Copy Markdown

✅ I finished the code review, and didn't find any security or code quality issues.

@rtavernaea rtavernaea changed the title remove filename param EDFIAL-576 Make unmatched-student-file-specific download url endpoint Aug 18, 2026
@rtavernaea
rtavernaea marked this pull request as ready for review August 18, 2026 19:57

@edandylytics edandylytics left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Overall, this is very good! Haven't tested yet, but I expect it'll test well. I made a couple small notes, mostly thinking about code we might want to keep as is so we can use it in the next PR for allowing the download of output files

}) => {
const url = await apiClient.get<string, string>(
`/jobs/${jobId}/output-files/${encodeURIComponent(fileName)}`
`/jobs/${jobId}/output-files/input_no_student_id_match.csv`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think we'll still want this front-end query to take a parameterized file name, though the file name would be hard coded in UnmatchedStudents.tsx. That'll allow us to use this query for the other run output files we'll want to enable for download, too.


get unmatchedStudentsFile() {
return this.lastRun?.unmatchedStudentsFile;
get hasUnmatchedStudents() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I like this! One thing we should check on is when we added the unmatchedStudentsInfo. I think it was long enough ago that backwards compatibility isn't a big concern, but at was added after the app was live in prod.

}

@Get(':jobId/output-files/:fileName')
@Get(':jobId/output-files/input_no_student_id_match.csv')

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'd lean towards adding this as a new endpoint, alongside (and above, so it matches first) the parameterized version, as you'd need to re-implement that anyway in the next PR. I don't feel strongly about that.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Though including it in this PR would allow you to add some tests in a fairly natural spot: test asserting that no special permission is need for accessing the input_no_student_id_match.csv handler, but you do need permissions to access the output files.

@rtavernaea rtavernaea Aug 19, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Would that test just cover that 'read:jobs:output-files' is required for @Get(':jobId/output-files/:fileName'), but not required for @Get(':jobId/output-files/input_no_student_id_match.csv')?
Or is there something further I'm missing here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants