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

BIH-39 Fix submit tests for BIH #1053

Merged
merged 5 commits into from
Aug 26, 2024
Merged

BIH-39 Fix submit tests for BIH #1053

merged 5 commits into from
Aug 26, 2024

Conversation

paulineribeyre
Copy link
Contributor

@paulineribeyre paulineribeyre commented Aug 23, 2024

Link to JIRA ticket if there is one: https://ctds-planx.atlassian.net/browse/BIH-39

Fixing the tests for an edge case found in the BIH dictionary.

Screenshot 2024-08-23 at 1 40 55 PM

The tests run this data-simulator command, using image_annotation because that's the "leaf node" the bash script found:

Running command: poetry run data-simulator submission_order --url https://s3.amazonaws.com/dictionary-artifacts/bih_dictionary/0.1.0/schema.json --path /home/jenkins/agent/workspace/DIS_GitHub_Org_gitops-qa_PR-2968/testData/ --node_name image_annotation

The output is:

  DataImportOrderPath.txt:
project	administrative
dataset	administrative
subject	administrative
imaging_study	medical_imaging
imaging_series	medical_imaging
core_metadata_collection	administrative
image_file	data_file
image_annotation	data_file

The getPathWithFileNode function looks for a file node in this output ^. It finds image_file first. The rest of the submission logic, specifically this, assumes that the file node is a "leaf node" (a node with no child links), which is not the case here (image_file has a child link to image_annotation). This creates problems later (image_file is removed from the path since it's assumed to be a leaf node, so it's not submitted before image_annotation, so the submission fails).

This can be fixed by picking the last file node instead of the first file node in getPathWithFileNode. The last file node of the list should be a leaf node.

New Features

Breaking Changes

Bug Fixes

Improvements

  • Remove the unused Node.target property
  • Fix getPathWithFileNode to return the last file node it finds, instead of the first one, since the rest of the submission logic assumes it's a leaf node

Dependency updates

Deployment changes

@paulineribeyre
Copy link
Contributor Author

This should address problems in uc-cdis/gitops-qa#2968 and uc-cdis/cdis-manifest#7618

@paulineribeyre paulineribeyre changed the title Fix submit tests for BIH BIH-39 Fix submit tests for BIH Aug 23, 2024
@paulineribeyre paulineribeyre merged commit 715150b into master Aug 26, 2024
5 checks passed
@paulineribeyre paulineribeyre deleted the debug-order-bih branch August 26, 2024 16:39
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.

3 participants