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

Karton connection errors are not correctly managed by mwdb #891

Open
1 of 4 tasks
pavb-fr opened this issue Nov 14, 2023 · 1 comment
Open
1 of 4 tasks

Karton connection errors are not correctly managed by mwdb #891

pavb-fr opened this issue Nov 14, 2023 · 1 comment
Labels
type:bug Something isn't working zone:integrations Tasks related with plugins and integrations
Milestone

Comments

@pavb-fr
Copy link

pavb-fr commented Nov 14, 2023

Environment information

  • MWDB version: 2.10.2
  • Installation method:
    • mwdb.cert.pl service
    • From PyPi (pip install mwdb-core)
    • From docker-compose
    • Other (please explain)
  • Plugins installed:

Behaviour the bug (what happened?)
When mwdb starts before karton an error is raised during the submission of samples to karton.
The karton connector is initialized too early in the startup process.
Moreover this error is not correctly managed by the UI.
The upload of samples seems to not work but they are inserted in mwdb.

Expected behaviour
Mwdb should support the karton connection errors in the following cases:

  • Karton is started after mwdb
  • Karton is down
  • Karton is restarted

Maybe a configuration option should be added to indicate if:

  • The upload process shall be stopped if karton is down
  • The upload process shall ignore karton connection errors

Reproduction Steps
Start mwdb before karton and try to upload a new sample to mwdb.

@pavb-fr pavb-fr changed the title mwdb error when karton is not started before mwdb Karton connection errors are not correctly managed by mwdb Nov 14, 2023
@psrok1 psrok1 added type:bug Something isn't working zone:integrations Tasks related with plugins and integrations labels Nov 22, 2023
@psrok1
Copy link
Member

psrok1 commented Feb 23, 2024

Hi!

There are actually two issues mentioned:

  • Early Karton initialization

    This will be fixed by Fix: Try to load Karton lazily if can't be loaded eagerly #919, MWDB should not give up when Karton is enabled but Redis connection can't be established when MWDB is loaded.

  • Wrong error handling

    File is still uploaded correctly because we treat errors during Karton analysis submission as non-critical errors, because analysis can be easily restarted (by clicking Reanalyze). That's why Karton submit is done after the commit. In the same time, we're sending ISE 500 because there is server fault.

    Maybe we should introduce different response for successful upload with warnings to correctly indicate it in UI?

@psrok1 psrok1 added this to the v2.12.0 milestone Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working zone:integrations Tasks related with plugins and integrations
Projects
None yet
Development

No branches or pull requests

2 participants