INFRA-597-input-metadata-fix#390
Merged
Merged
Conversation
Why these changes are being introduced: * Input metadata was not being added to valid items as it was with invalid items How this addresses that need: * Update validate_aip_bulk_worker to include all input metadata for valid items * Add TestValidateAipBulkWorker class with associated unit tests * Update test_validate_secret_mismatch to address linting error * Update dependencies Side effects of this change: * None Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/INFRA-597
ghukill
approved these changes
Dec 12, 2025
ghukill
left a comment
Contributor
There was a problem hiding this comment.
Nice catch and update! Looks good.
Comment on lines
+377
to
+393
| updated_row = row.to_dict() | ||
| updated_row.update( | ||
| { | ||
| "bucket": result.get("bucket"), | ||
| "aip_uuid": result.get("aip_uuid", aip_uuid), | ||
| "aip_s3_uri": result.get("aip_s3_uri", s3_uri), | ||
| "valid": bool(result.get("valid", False)), | ||
| "error": result.get("error"), | ||
| "error_details": ( | ||
| json.dumps(result.get("error_details")) | ||
| if result.get("error_details") is not None | ||
| else None | ||
| ), | ||
| "elapsed": result.get("elapsed"), | ||
| } | ||
| ) | ||
| results_df.loc[row_index] = updated_row |
Contributor
There was a problem hiding this comment.
Ahhhh, assuming in the previous approach it was setting columns to None or np.NaN if they weren't part of the update? Either way, if this fixes it, awesome.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose and background context
Bug fix based on this Jira ticket. It also revealed there were no unit tests for
validate_aip_bulk_workerso those were added as well.How can a reviewer manually see the effects of these changes?
View unit tests, I did a run on
prodwith a CSV from Charlie that confirmed all input fields are now presentIncludes new or updated dependencies?
YES
Changes expectations for external applications?
NO
What are the relevant tickets?
Developer
Code Reviewer(s)