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

PIMS-2135 Bulk Upload Worker Bug #2723

Merged
merged 2 commits into from
Oct 16, 2024
Merged

PIMS-2135 Bulk Upload Worker Bug #2723

merged 2 commits into from
Oct 16, 2024

Conversation

dbarkowsky
Copy link
Collaborator

@dbarkowsky dbarkowsky commented Oct 11, 2024

🎯 Summary

PIMS-2135

There was an issue with the bulk upload that was caused when moving the authentication checks out of Keycloak.
Two problems:

  • The user passed into the worker now had the hasOneOfRoles function attached. Workers apparently cannot pass functions, promises, steams, etc.
  • The role was initially sending the name, but later checks expected the Id.

Changes

  • Formatted a date on the Bulk Upload page to make it more human readable.
  • Made sure that the Role and Agency properties of the User records are marked as potentially undefined (when you get the record without doing the JOIN)
  • Updated the user object to remove the hasOneOfRoles function before it is passed into the worker. It's not used further in this process, and the type is marked only as User to reflect that.
  • Corrected how the role is passed to the worker.

Testing

  • Upload a file to bulk upload an make sure it works.

🔰 Checklist

  • I have read and agree with the following checklist and am following the guidelines in our Code of Conduct document.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation where required.
  • I have tested my changes to the best of my ability.
  • My changes generate no new warnings.

Copy link

codeclimate bot commented Oct 11, 2024

Code Climate has analyzed commit 559db32 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 50.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 93.4%.

View more on Code Climate.

Copy link

🚀 Deployment Information

The Express API Image has been built with the tag: 2723. Please make sure to utilize this specific tag when promoting these changes to the TEST and PROD environments during the API deployment. For more updates please monitor Image Tags Page on Wiki.

Copy link

🚀 Deployment Information

The React APP Image has been built with the tag: 2723. Please make sure to utilize this specific tag when promoting these changes to the TEST and PROD environments during the APP deployment. For more updates please monitor Image Tags Page on Wiki.

Copy link
Collaborator

@TaylorFries TaylorFries left a comment

Choose a reason for hiding this comment

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

Updates to process fix the error that was occurring.
One side note to devs (made in Teams chat) to ensure their import_result table is cleaned before attempting to use the bulk upload feature.
No new issues detected.

@dbarkowsky dbarkowsky merged commit 63ebf37 into main Oct 16, 2024
12 checks passed
@dbarkowsky dbarkowsky deleted the PIMS-2135-Bulk-Upload-Bug branch October 16, 2024 18:56
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.

2 participants