UST-QuAntiL / qhana-backend

The new REST backend for QHAna (see also qhana-plugin-runner)
Apache License 2.0
1 stars 2 forks source link

Feature/update ballerina #45

Closed infacc closed 1 year ago

infacc commented 1 year ago
infacc commented 1 year ago

Reminder

We need to check in the docker compose if this setting is used with regexes that are no longer compatible. Also this is a breaking that should be mentioned in a changelog/readme of the backend and the qhana-docker repo.

The qhana-docker docs need to be updated once this is merged (here and here).

infacc commented 1 year ago

Currently, the qhana-backend breaks when accessing /experiments/ with the following error:

SEVERE {b7a.log.crash} - null 
java.lang.NullPointerException
    at qhana.qhana_backend.0.creators.$_function_calls.call(Unknown Source)
    at qhana.qhana_backend.0.$_init.call(qhana_backend)
    at io.ballerina.runtime.internal.scheduling.SchedulerItem.execute(SchedulerItem.java:54)
    at io.ballerina.runtime.internal.scheduling.Scheduler.run(Scheduler.java:306)
    at io.ballerina.runtime.internal.scheduling.Scheduler.runSafely(Scheduler.java:273)
    at java.base/java.lang.Thread.run(Thread.java:829)

error: java.lang.NullPointerException

(Accessing an existing experiment (e.g. http://localhost:9091/experiments/1/) works)

This needs to be fixed before merging.

buehlefs commented 1 year ago

I have investigated the null pointer exception. This is a ballerina bug that we cannot fix ourselves. I will report this issue and then we will have to leave a todo comment for later. The bug does not trigger when the query string of the url contains item-count (e.g. /experiments?item-count=10) and even malformed values do not trigger this bug... So our UI should continue to work just fine.

buehlefs commented 1 year ago

I have found the issue, we can remove the ' before item\-count in the resource function definition. The ' is not required (as item-count is not a keyword) but the bug does not trigger without it. I will report the issue to ballerina.

infacc commented 1 year ago

I found an issue with the same error log: https://github.com/ballerina-platform/ballerina-lang/issues/41057

Removing the ' is a convenient solution.