-
Notifications
You must be signed in to change notification settings - Fork 16
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
KnetMiner querySuggestor broken #554
Comments
This is rendered by Certainly, it has an error at: int synCount = entryCountsByType.compute ( type,
// ====> wrong, should be thisCount == null ? ...
(thisType, thisCount) -> thisType == null ? 1 : ++thisCount
); Now it seems fixed, see the test instances again. However, even so, the method has been copy-pasted, refactored, migrated many times and I cannot understand what exactly is supposed to do anymore. @AjitPS, @KeywanHP , please, give me more information on that. For the moment, I can see it does this:
Does the above make sense? Could you provide test cases? Eg, search strings and expected results. Ideally, could someone write a Unit test for that? The existing *IT.java is a starting point for that. If it has to be called against the wheat API, we can disable it and re-enable when we want to check manually. |
thanks, @KeywanHP, have a look at the usual test instances, they should be fine now. |
Looks good @marco-brandizi - thanks for fixing it! |
thanks for resolving this @marco-brandizi ❤️ |
KnetMiner
querySuggestor
broken in master (works in r4.0.3).This code in OndexServiceProvider had been unchanged for years before the recent backend code refactoring a few months ago.
In the KnetMiner UI (
utils.js
) the user presses query suggestor button which goes from https://github.com/Rothamsted/knetminer/blob/master/client-base/src/main/webapp/html/javascript/utils.js#L687 to the knetminer"synonyms" api
(https://github.com/Rothamsted/knetminer/blob/master/server-datasource-api/src/main/java/rres/knetminer/datasource/api/SynonymsResponse.java) using: https://github.com/Rothamsted/knetminer/blob/master/server-datasource-ondexlocal/src/main/java/rres/knetminer/datasource/ondexlocal/OndexLocalDataSource.java#L125.
in the past (
release4.0
andr4.0.3
) thesynonymTable
code was all in OndexServiceProvider: https://github.com/Rothamsted/knetminer/blob/release_4.0/common/server-datasource-ondexlocal/src/main/java/rres/knetminer/datasource/ondexlocal/OndexServiceProvider.java#L2454.But I don't see it in new backend refactoring in "master" (when OSP was split into various services, etc) : https://github.com/Rothamsted/knetminer/tree/master/server-datasource-ondexlocal/src/main/java/rres/knetminer/datasource/ondexlocal/service
maybe that's why it fails in test
wheat-ci instance
too on babvs73, but we (@KeywanHP, @AjitPS) never tested this since the java code refactoring in early 2021.P.S. the querySuggestor calls a
synonyms
api (passing user keywords) that eventually usedwriteSynonymTable()
in OSP which I can't find in new codebase. fails on my new tomato test knets on babvs73 but then we found it also fails on wheat-ci instance on babvs73:9100 (which we somehow missed when testing that after the backend code refactoring by @marco-brandizi). In the UI in the searchbox if user types a keyword and presses the suggestor button then it just says"no synonym found"
which in utils.js is a misleading msg that comes when synonyms api call fails.I don't believe this has anything to do with my latest push (or a bad merge) as our test wheat-ci babvs73 instance was last deployed before I every pushed my code and in that
querySuggestor
already was failing.At api level, the same can be seen as our old
release4.0
deployedWheat
knetminer hassynonyms api
working: https://knetminer.rothamsted.ac.uk/wheatknet/synonyms?keyword=dormancy but not inlatest wheat-ci
http://babvs73.rothamsted.ac.uk:8083/ws/wheatknet/synonyms?keyword=dormancy (see this for api error), fyiThe text was updated successfully, but these errors were encountered: