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

BI-2019 - Pedigree Viewer Not Rendering #219

Merged
merged 1 commit into from
Jan 13, 2024
Merged

BI-2019 - Pedigree Viewer Not Rendering #219

merged 1 commit into from
Jan 13, 2024

Conversation

mlm483
Copy link
Contributor

@mlm483 mlm483 commented Jan 3, 2024

Description

Jira Story

This PR completes the work that was done in this commit to type additionalInfo fields as JsonObject.

The brapi-java-client was trying to parse additionalInfo on BrAPIPedigreeNode objects, which can have nested objects, as a strict Map<String, String>, which resulted in the error Expected a string but was BEGIN_OBJECT.

The bug does not occur with BreedBase-backed programs, because BreedBase doesn’t include additionalInfo in the response to the brapi/v2/germplasm/<germplasmId>/pedigree call.

Testing

Step 0. [OPTIONAL] Reproduce the bug by running bi-web and bi-api, uploading germplasm to a BJTS program and trying to use the pedigree viewer.

  1. Clone: git clone https://github.com/Breeding-Insight/brapi.
  2. Open brapi in IntelliJ IDEA.
  3. Checkout this branch: git checkout bug/BI-2019.
  4. Create and run a maven configuration in IntelliJ IDEA with the following run command: clean install -D maven.test.skip=true (with the root directory of the repo ("brapi") as the working directory).
  5. Open bi-api in IntelliJ IDEA.
  6. Find the brapi-java-client dependency and replace it with the following, substituting the absolute path to the brapi repo on your local machine for {PATH_TO_BRAPI_REPO}.
        <dependency>
            <groupId>org.brapi</groupId>
            <artifactId>brapi-java-client</artifactId>
            <version>${brapi-java-client.version}</version>
            <scope>system</scope>
            <systemPath>{PATH_TO_BRAPI_REPO}/brapi-java-client/target/brapi-java-client-2.1-SNAPSHOT.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>org.brapi</groupId>
            <artifactId>brapi-java-model</artifactId>
            <version>${brapi-java-client.version}</version>
            <scope>system</scope>
            <systemPath>{PATH_TO_BRAPI_REPO}/brapi-java-model/target/brapi-java-model-2.1-SNAPSHOT.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>com.github.filosganga</groupId>
            <artifactId>geogson-core</artifactId>
            <version>1.2.21</version>
        </dependency>
  1. [OPTIONAL] Open the maven tool window and reload all maven projects - try this if you get build errors.
  2. Build bi-api as you normally do. My run config is shown below.
image 9. With bi-web and bi-api running, verify that the pedigree viewer works for germplasm uploaded to a BJTS program.

These general steps have been documented on Confluence, https://breedinginsight.atlassian.net/wiki/x/AQC6dg, please add anything you learn in the process of testing there.

@github-actions github-actions bot added the bug Something isn't working label Jan 3, 2024
@mlm483 mlm483 marked this pull request as ready for review January 3, 2024 20:32
@mlm483 mlm483 requested review from a team, davedrp and dmeidlin and removed request for a team January 3, 2024 20:45
Copy link
Contributor

@davedrp davedrp left a comment

Choose a reason for hiding this comment

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

passed developer testing.

@mlm483 mlm483 merged commit c0c585d into develop Jan 13, 2024
2 checks passed
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