-
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
chore(emx2): spark to javalin migration #4165
base: master
Are you sure you want to change the base?
Conversation
# Conflicts: # backend/molgenis-emx2-fairdatapoint/src/main/java/org/molgenis/emx2/fairdatapoint/FAIRDataPointCatalog.java # backend/molgenis-emx2-fairdatapoint/src/main/java/org/molgenis/emx2/fairdatapoint/FAIRDataPointDistribution.java # backend/molgenis-emx2-webapi/src/main/java/org/molgenis/emx2/web/CsvApi.java # backend/molgenis-emx2-webapi/src/main/java/org/molgenis/emx2/web/ExcelApi.java # backend/molgenis-emx2-webapi/src/main/java/org/molgenis/emx2/web/GroupPathMapper.java # backend/molgenis-emx2-webapi/src/main/java/org/molgenis/emx2/web/MolgenisWebservice.java # backend/molgenis-emx2-webapi/src/main/java/org/molgenis/emx2/web/RDFApi.java # backend/molgenis-emx2-webapi/src/main/java/org/molgenis/emx2/web/TaskApi.java # backend/molgenis-emx2-webapi/src/main/java/org/molgenis/emx2/web/ZipApi.java
...d/molgenis-emx2-beacon-v2/src/main/java/org/molgenis/emx2/beaconv2/requests/BeaconQuery.java
Show resolved
Hide resolved
when(request.url()).thenReturn("http://localhost:8080/api/beacon"); | ||
when(request.attribute("specification")).thenReturn("beacon"); | ||
|
||
return request; | ||
} | ||
|
||
@Test | ||
public void testEntryTypes() { | ||
Request request = mockRequest(); | ||
@Disabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is it disabled ? ( i think a annotation allows to add a reason )
when(request.url()).thenReturn("http://localhost:8080/api/beacon"); | ||
when(request.attribute("specification")).thenReturn("beacon"); | ||
|
||
return request; | ||
} | ||
|
||
@Test | ||
public void testMap() { | ||
@Disabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why
when(request.url()).thenReturn("http://localhost:8080/api/beacon_vp"); | ||
when(request.attribute("specification")).thenReturn("beacon_vp"); | ||
|
||
return request; | ||
} | ||
|
||
@Test | ||
public void testMap() { | ||
@Disabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why
|
||
private AnalyticsApi() { | ||
// hide constructor | ||
} | ||
|
||
public static void create() { | ||
public static void create(Javalin app) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in general it's bad practice modify the param passed in a method, guess the same thing sort of happend via the static post/get/.. imports, so i guess the is sort of a step in the right direction, is this the recommended way to configure the routes in javlin ?
response.type("application/json"); | ||
MolgenisSession session = sessionManager.getSession(request); | ||
String schemaName = sanitize(request.params(SCHEMA)); | ||
private static void listSchemaTriggers(Context ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why change form function to method, makes hard to test , reuse compose
actionTransformer.transform(request.body(), CreateTriggerAction.class); | ||
MolgenisSession session = sessionManager.getSession(request); | ||
String schemaName = sanitize(request.params(SCHEMA)); | ||
private static void addTrigger(Context ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keeps a function
var action = actionTransformer.transform(request.body(), UpdateTriggerAction.class); | ||
MolgenisSession session = sessionManager.getSession(request); | ||
String schemaName = sanitize(request.params(SCHEMA)); | ||
private static void updateTrigger(Context ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did some functional tests:
Successful:
- Create Directory schema from template including demo data
- Schema editor
- DataCatalogueTemplate
- Fair data hub template
- Data upload (zipfile with several csv's) using UI
- Other templates STILL NEED TO BE TESTED
Not working properly:
- Create ERN Dashboard from template when going to the schema a white screen is shown, should go to /tables/#
- Directory App => footer is broken, pictures not shown (f.e. logo)
- Manually adding data => FAILS WITH ERROR:
Parsing of graphql variables failed. Should be an object with each graphql variable a key. argument "content" is null: argument "content" is null
- Manually updating data => FAILS WITH ERROR
Parsing of graphql variables failed. Should be an object with each graphql variable a key. argument "content" is null: argument "content" is null
- Run a script on the server => Cannot create a script due to saving error (Running the hello world script works)
- Run a script locally using the EMX2-pyclient =>
- create schema using template WORKS
- downloading real BBMRI-ERIC biobanks fails with error
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe8 in position 8688: invalid continuation byte
=> using the same script, with the same data on emx2.dev.molgenis.org works fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did some functional tests:
Successful:
- Create Directory schema from template including demo data
- Schema editor
- Use DataCatalogueTemplate
- Fair data hub template
- Data upload (zipfile with several csv's) using UI
- Other templates => tested several, but not all
- Schedule a script
- Failure email when script fails => NOT POSSIBLE on preview server
Fixed:
- Directory App => footer is broken, pictures not shown (f.e. logo)
- Manually adding data
- Manually updating data
- Create ERN Dashboard from template when going to the schema a white screen is shown, should go to /tables/#
- Run a script on the server
- Run a script locally using the EMX2-pyclient =>
- create schema using template WORKS
- downloading real BBMRI-ERIC biobanks
New issues (probably not tested before):
- Directory App => Load json settings does not have the proper layout
- CatalogueTemplate => SSR Catalogue shows white screen => Might also be due to recent changes to the catalogue that it's not working properly
Quality Gate failedFailed conditions |
What are the main changes you did:
how to test:
Please test all features of emx2 to see if everything behaves as expected. Everything should work as before.
todo: