Skip to content

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

Closed

Description

@callumforrester

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

Activity

  1. added
    bug
    c: client
    c: cli
    on Apr 19, 2024
  2. callumforrester commented on Apr 26, 2024

    @callumforrester
    ContributorAuthor

    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

  3. ZohebShaikh commented on Apr 26, 2024

    @ZohebShaikh
    Contributor

    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

  4. added a commit that references this issue on Apr 26, 2024
  5. added a commit that references this issue on May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugc: clic: client

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions