Conversation
nickpalladino
requested changes
May 16, 2023
Member
nickpalladino
left a comment
There was a problem hiding this comment.
Discussed newObject counts and maybe in the future could be cleaned up so that total only includes brapi objects being created or updated.
src/main/java/org/breedinginsight/brapps/importer/services/processors/ProcessorManager.java
Outdated
Show resolved
Hide resolved
nickpalladino
approved these changes
May 16, 2023
dmeidlin
approved these changes
May 18, 2023
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.
Description
Story: https://breedinginsight.atlassian.net/browse/BI-1689
There were 2 bugs causing the "Complete count" (a.k.a. finished count) to be less than the "Total count" on the jobs page:
BrAPIDAOUtil.postmethod where it was updating the finished count to belistResult.size(). The problem was thatlistResultcontains all the BrAPI objects created during that call topost, but the finished count needs to account for BrAPI objects created during previous calls topost. I fixed this by using the local variablefinishedwhich is initially set to the current finished count (thus accounting for previous calls topost) and then incremented after each BrAPI call.GermplasmProcessor.getStatisticsMap, count related objects (e.g. pedigree for germplasm). These related objects are not POSTed separately to the BrAPI service, so there isn't a generic way to keep track of them, they would need to be tracked differently for each BrAPI object type. An expedient solution was to update the finished count to account for these related objects at the end of theProcessorManager.postBrapiDatamethod (Line 118). There is already logic to make sure the expected number of primary BrAPI objects matches the number created inBrAPIDAOUtil.post(Lines 322-324).Checklist: