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

Incorrect file.parent in ontology result #64

Closed
ed4wg opened this issue Apr 19, 2023 · 4 comments
Closed

Incorrect file.parent in ontology result #64

ed4wg opened this issue Apr 19, 2023 · 4 comments
Assignees
Labels
assess We still haven't decided if this will be worked on or not bug Something isn't working ontology

Comments

@ed4wg
Copy link

ed4wg commented Apr 19, 2023

Describe the bug
The file.parent element in the ontology result points to the root file of the submission rather than the actual parent.

To Reproduce
Take a file that has child files extracted, and further children extracted from those files so you have a hierarchy 3 or more deep. When retrieving the ontology results for that submission via /api/v4/ontology/submission/<sid>, the file.parent element of a level 2 or more child file is specifying the root file hash of the submission rather than the actual parent of the extracted file.

Expected behavior
The file.parent element of an ontology result should point to the direct parent of that file.

@ed4wg ed4wg added assess We still haven't decided if this will be worked on or not bug Something isn't working labels Apr 19, 2023
@cccs-rs
Copy link
Contributor

cccs-rs commented May 17, 2023

If memory serves, this was a design decision as services aren't aware of the parent of a file and that a file, even within the same submission, could have multiple parents (and currently the model assumes there's a single parent per file).

Since this information is populated by the API, we opt'd to use the absolute parent (root/submitted file) to avoid putting unnecessary strain on the API containers.

@ed4wg
Copy link
Author

ed4wg commented May 18, 2023

Perhaps the property name should be something other than file.parent to avoid confusion. Maybe file.submissionrootparent or something like that?

@cccs-rs
Copy link
Contributor

cccs-rs commented May 18, 2023

Perhaps, although if that were the case, it would probably go into the submission block rather than the file block and be called root_file or submitted_file?

(Just thinking aloud 😅)

@ed4wg
Copy link
Author

ed4wg commented May 18, 2023

yeah that makes more sense :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assess We still haven't decided if this will be worked on or not bug Something isn't working ontology
Projects
None yet
Development

No branches or pull requests

4 participants