Skip to content

[BI-2064] Invalid message if required data is missing #334

Merged
davedrp merged 2 commits intorelease/0.9from
bug/BI-2064
Mar 12, 2024
Merged

[BI-2064] Invalid message if required data is missing #334
davedrp merged 2 commits intorelease/0.9from
bug/BI-2064

Conversation

@davedrp
Copy link
Contributor

@davedrp davedrp commented Feb 20, 2024

Description

BI-2064 Invalid message if required data is missing
Not conforming

Dependencies

bi-web: release/0.9

Testing

see Acceptance Criteriain the Jirra Ticket

Checklist:

  • I have performed a self-review of my own code
  • I have tested my code and ensured it meets the acceptance criteria of the story
  • I have tested that my code works with both the brapi-java-server and BreedBase
  • I have create/modified unit tests to cover this change
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to documentation
  • I have run TAF: <please include a link to TAF run>

@davedrp davedrp requested review from a team, mlm483 and nickpalladino and removed request for a team February 20, 2024 18:22
@github-actions github-actions bot added the bug Something isn't working label Feb 20, 2024
Copy link
Member

@nickpalladino nickpalladino left a comment

Choose a reason for hiding this comment

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

Curious to see how this interacts with BI-2046 if that uses only ObsUnitIDs for overwrites

@mlm483 mlm483 self-assigned this Feb 21, 2024
Copy link
Contributor

@mlm483 mlm483 left a comment

Choose a reason for hiding this comment

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

The missing env produced the desired error, however I got an unknown error banner for the missing year. In bi-api logs:

ERROR o.b.b.i.services.FileImportService - null
java.lang.NumberFormatException: null
	at java.base/java.lang.Integer.parseInt(Integer.java:620)
	at java.base/java.lang.Integer.parseInt(Integer.java:776)
	at org.breedinginsight.brapps.importer.services.processors.ExperimentProcessor.yearToSeasonDbIdFromDatabase(ExperimentProcessor.java:1827)
	at org.breedinginsight.brapps.importer.services.processors.ExperimentProcessor.yearToSeasonDbId(ExperimentProcessor.java:1797)
	at org.breedinginsight.brapps.importer.services.processors.ExperimentProcessor.initNewBrapiData(ExperimentProcessor.java:560)
	at org.breedinginsight.brapps.importer.services.processors.ExperimentProcessor.process(ExperimentProcessor.java:233)
	at org.breedinginsight.brapps.importer.services.processors.ProcessorManager.process(ProcessorManager.java:63)
	at org.breedinginsight.brapps.importer.model.imports.experimentObservation.ExperimentImportService.process(ExperimentImportService.java:74)
	at org.breedinginsight.brapps.importer.services.FileImportService.lambda$processFile$9(FileImportService.java:427)

I think it may be important to test the missing year upload in a fresh program with no existing season data to reproduce, just a hunch.

@mlm483
Copy link
Contributor

mlm483 commented Mar 7, 2024

@davedrp I'm still seeing that issue, here are the steps to reproduce.

  1. Create a new program, add yourself as a breeder so you can upload data.
  2. Upload germplasm RILS.and.Parents.TRUNC.xls
  3. Upload ontology Simple_Numbered_Ontology.xlsx
  4. Upload experiment Exp-1_MissingYear.xlsx

You'll see "Unknown Error" on the frontend and the following error in bi-api logs:

ERROR o.b.b.i.services.FileImportService - null
java.lang.NumberFormatException: null
	at java.base/java.lang.Integer.parseInt(Integer.java:620)
	at java.base/java.lang.Integer.parseInt(Integer.java:776)
	at org.breedinginsight.brapps.importer.services.processors.ExperimentProcessor.yearToSeasonDbIdFromDatabase(ExperimentProcessor.java:1827)
	at org.breedinginsight.brapps.importer.services.processors.ExperimentProcessor.yearToSeasonDbId(ExperimentProcessor.java:1797)
	at org.breedinginsight.brapps.importer.services.processors.ExperimentProcessor.initNewBrapiData(ExperimentProcessor.java:560)
	at org.breedinginsight.brapps.importer.services.processors.ExperimentProcessor.process(ExperimentProcessor.java:233)
	at org.breedinginsight.brapps.importer.services.processors.ProcessorManager.process(ProcessorManager.java:63)
	at org.breedinginsight.brapps.importer.model.imports.experimentObservation.ExperimentImportService.process(ExperimentImportService.java:74)
	at org.breedinginsight.brapps.importer.services.FileImportService.lambda$processFile$9(FileImportService.java:427)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1771)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1763)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

@davedrp davedrp closed this Mar 8, 2024
@davedrp davedrp deleted the bug/BI-2064 branch March 8, 2024 15:10
@davedrp davedrp changed the title [BI-2026] Invalid message if required data is missing [BI-2064] Invalid message if required data is missing Mar 8, 2024
@davedrp davedrp reopened this Mar 8, 2024
@davedrp davedrp requested a review from mlm483 March 8, 2024 15:26
Copy link
Contributor

@mlm483 mlm483 left a comment

Choose a reason for hiding this comment

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

Tested, working. 🚀

@davedrp davedrp merged commit 17861f1 into release/0.9 Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants