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

Cannot run plans without a message bus (client) #427

Closed
callumforrester opened this issue Apr 19, 2024 · 2 comments
Closed

Cannot run plans without a message bus (client) #427

callumforrester opened this issue Apr 19, 2024 · 2 comments
Labels
bug Something isn't working cli Relates to CLI code client Relates to client code

Comments

@callumforrester
Copy link
Collaborator

Relates to #426, the blueapi CLI listens to updates from the server via the message bus so it throws an error if you try to use blueapi without a bus being present.

To Reproduce

Terminal 1

# start blueapi server
blueapi serve

Terminal 2

# Simple plan
blueapi controller run sleep '{"time": 5}'

# More complex plan
blueapi controller run count '{"detectors": ["det"]}'

Possible solution

The CLI does have a message bus-free mode that can be enabled with a flag, we should also enable it if the connection fails and print a warning to the user. In this case the CLI does not block until the plan completes but expects the user to run further commands to poll the server. The warning message should make this clear.

Acceptance Criteria

  • Can run plans via the CLI without a message bus without getting stomp errors
  • Appropriate changes to CLI tests
@callumforrester callumforrester added bug Something isn't working client Relates to client code cli Relates to CLI code labels Apr 19, 2024
@callumforrester
Copy link
Collaborator Author

The CLI does have a message bus-free mode that can be enabled with a flag

As it turns out I was misremembering. So will accept the CLI raising early if it can't connect to the bus

@ZohebShaikh
Copy link
Collaborator

The use of message bus is guarded and there are tests added to check this for the CLI .
The changes mentioned are in this PR: #433

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli Relates to CLI code client Relates to client code
Projects
None yet
Development

No branches or pull requests

2 participants