-
Notifications
You must be signed in to change notification settings - Fork 3
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
SIMSBIOHUB-424: Support Artifact Intake + Misc Enhancements #230
Conversation
- Update submission intake endpoint and related service/repo functions - Update artifact intake endpoint and related service/repo functions - Update database schema to add source_id and uuid columns
Fix submission intake
Openshift URLs for the PR Deployment: |
Openshift URLs for the PR Deployment: |
Working on unit tests: artifact-service.ts (Nick - done) code-repository.ts (Curtis - done) submission-service.ts (Nick - done) search-index-repository.ts (Curtis - done) artifact/intake.ts (Nick - done) |
Make uuid a source submitted field for submission. make source_id optional for submission_features.
…atform into SIMSBIOHUB-424
Add required_value column to feature_type_property to mark feature properties as required vs optional. Update validation logic to account for required vs optional properties. Add env var toggle to all seed files.
…atform into SIMSBIOHUB-424
Adjust get unreviewed/completed/published submission SQL. Misc comment additions
…f original raw properties.
Unpublish other submissions on publish patch operation.
api/src/paths/administrative/security/submission/{submissionId}.ts
Outdated
Show resolved
Hide resolved
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.
Code looks good to me!
Quality Gate failedFailed conditions 3.0% Duplication on New Code (required ≤ 3%) |
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.
ran this locally and things are working as expected 🌯
Links to Jira Tickets
https://apps.nrs.gov.bc.ca/int/jira/browse/SIMSBIOHUB-424
Description of Changes
Added a call to clamav to app.ts, alongside the multer middleware, so that we shouldn't have to call it in the endpoint anymore. Endpoint code should just be able to assume any files getting that far have already been checked and are safe.
Update submission/intake endpoint/service/repo
parent_submission_feature_id
when inserting submission featuresUpdate submission search indexing
.find
repeatedly, when it probably should just pre-parse all of the codes ahead of time, and then do direct object de-referencing. It was doing this before, but the codes response object got more complicated and I just skipped optimizing it for now in order to get this PR out quicker.Update codes endpoint/service/repo
Update artifact/intake endpoint/service/repo
Add
required_value
column to feature_type_property table to indicate if properties are required or optional when running validation.Added
additionalProperties: false
to most endpoints, and fixed response validation issues.Update get submission features endpoint to replace the original
data
object with one populated fromsearch_*
rows.Update submission patch function to also unpublish all other submissions for the same
uuid
onpublish=true
Testing Notes
If running both SIMS and BioHub branches, should be able to publish a survey that has 0 or more attachments. Attachments should have their corresponding submission feature records created, and matching search_string s3_key records added, and the file should be uploaded the S3.
Related PR for the SIMS changes: bcgov/biohubbc#1193