poseidon-framework / poseidon-hs

A toolset to work with modular genotype databases in the Poseidon format
https://poseidon-framework.github.io/#/trident
MIT License
7 stars 2 forks source link

fix server-client interaction broken since 1.1.8.4 #228

Closed nevrome closed 1 year ago

nevrome commented 1 year ago

v1.1.8.4 (#221) broke the communication between old (before 1.1.8.4) versions of poseidon-http-server and new versions of trident. This was foreseeable, yet unforeseen

This PR is meant to fix this incompatibility by reverting some of the JSON encoding/decoding related changes. This is not entirely trivial, because we do need a working JSON scheme for CsvNamedRecord (which did not exist in the past). To make sure that everything works, we need to consider the following cases:

I ran some quick tests on the command line with a local server, and old and new client versions.

# v1.1.8.5 client + old (?) server
trident list --remote --packages | --groups | --individuals  -j Nr_SNPs

#  v1.1.8.5 client +  v1.1.8.5 server
poseidon-http-server -d 2010_RasmussenNature -c -z testDir
trident list --remote --remoteURL "http://127.0.0.1:3000" --packages | --groups | --individuals -j Nr_SNPs

#  v1.1.7.0 client + v1.1.8.5 server
wget https://github.com/poseidon-framework/poseidon-hs/releases/latest/download/trident-Linux
chmod +x trident-Linux
./trident-Linux list --remote --remoteURL "http://127.0.0.1:3000" --packages | --groups | --individuals -j Nr_SNPs

Works for all combinations.

codecov-commenter commented 1 year ago

Codecov Report

Base: 68.59% // Head: 71.80% // Increases project coverage by +3.21% :tada:

Coverage data is based on head (8404f18) compared to base (500b9e6). Patch coverage: 64.28% of modified lines in pull request are covered.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #228 +/- ## ========================================== + Coverage 68.59% 71.80% +3.21% ========================================== Files 18 18 Lines 2283 2270 -13 Branches 258 246 -12 ========================================== + Hits 1566 1630 +64 + Misses 459 394 -65 + Partials 258 246 -12 ``` | [Impacted Files](https://codecov.io/gh/poseidon-framework/poseidon-hs/pull/228?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=poseidon-framework) | Coverage Δ | | |---|---|---| | [src/Poseidon/Janno.hs](https://codecov.io/gh/poseidon-framework/poseidon-hs/pull/228?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=poseidon-framework#diff-c3JjL1Bvc2VpZG9uL0phbm5vLmhz) | `83.12% <64.28%> (+3.09%)` | :arrow_up: | | [src/Poseidon/CLI/List.hs](https://codecov.io/gh/poseidon-framework/poseidon-hs/pull/228?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=poseidon-framework#diff-c3JjL1Bvc2VpZG9uL0NMSS9MaXN0Lmhz) | `87.90% <0.00%> (+45.96%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=poseidon-framework). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=poseidon-framework)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

nevrome commented 1 year ago

OK - I'm merging this now. Further testing of this very change will happen in #226. I'm taking the full responsibility!