aiidateam / aiida-core

The official repository for the AiiDA code
https://aiida-core.readthedocs.io
Other
437 stars 192 forks source link

Better error when user tries to submit workflow without rabbitmq broker #6374

Closed danielhollas closed 5 months ago

danielhollas commented 7 months ago

When a user creates a profile with verdi presto without rabbitmq broker, and tries to submit a Workflow to a daemon via submit they will be greeted with this assert

    113     runner = manager.get_manager().get_runner()
    114     assert runner.persister is not None, 'runner does not have a persister'
--> 115     assert runner.controller is not None, 'runner does not have a controller'
    116 
    117     process_inited = instantiate_process(runner, process, **inputs)

AssertionError: runner does not have a controller

Since this will likely become a common problem for newcommers, we should provide a clear error message.

Should be done as a follow-up (or part of #6351)

mbercx commented 7 months ago

Good point @danielhollas! Also note that even in the basic tutorial we have a section where we submit to the daemon:

https://aiida.readthedocs.io/projects/aiida-core/en/stable/intro/tutorial.html#submitting-to-the-daemon

Maybe we should also add a warning here that this will only work in case they have a RabbitMQ broker configured.

Ideally they'd also be able to reconfigure the same profile to use a RabbitMQ broker, but I suppose that'd be beyond the scope of this issue. 😇

sphuber commented 5 months ago

Ideally they'd also be able to reconfigure the same profile to use a RabbitMQ broker, but I suppose that'd be beyond the scope of this issue. 😇

This particular piece of scope creep is addressed here https://github.com/aiidateam/aiida-core/pull/6454

I will submit a separate PR to address the original issue