Skip to content

Dodal connect on i22 is not actually connecting #864

Closed

Description

@DominicOram

If I run dodal connect i22 I get all of the beamline connected suspiciously quickly. It turns out that if I edit one of the PV prefixes in i22.pyto be incorrect then dodal connect i22 will still pass.

Acceptance Criteria

  • If I deliberately break one of the PV prefixes in i22.py then dodal connect i22 actually fails

Activity

  1. DominicOram commented on Oct 24, 2024

    @DominicOram
    ContributorAuthor

    @callumforrester and @DiamondJoseph am I right that this is different to #850?

  2. DiamondJoseph commented on Oct 25, 2024

    @DiamondJoseph
    Contributor

    This is different than 850: 850 is that when make_all_devices is called, any exceptions in the device_instantiation way of creating and connected devices are swallowed and do not cause test failures.
    This is that make_all_devices doesn't ever call connect on the devices given from a @device_factory after they are made- make_all_devices may catch exceptions in instantiating the device and prevent it being an error, but not in the connect which is what's more useful...

  3. callumforrester commented on Oct 25, 2024

    @callumforrester
    Contributor

    Additional acceptance criteria: If we could have a regression unit test that would be great

  4. DominicOram commented on Oct 28, 2024

    @DominicOram
    ContributorAuthor

    With #869 reverted I don't believe this issue is on main now. However, we will need to address it before reinstating the device factory

  5. added
    bug
    python
    on Oct 28, 2024
  6. callumforrester commented on Nov 11, 2024

    @callumforrester
    Contributor

    The cause of this issue that dodal connect <beamline> does not attempt to connect the devices, but expects device_instantiation to do it, which is does as long as wait_for_connection=True is passed. In practice this is true often enough that no one has really noticed, but it is technically still a bug in main because dodal connect does not work for lazy devices. It is just made worse in the world of DeviceInitializationController because all devices are lazy by default there.

    So the fix is to make sure the dodal CLI actually calls ensure_connected on the devices it connects to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugi22python

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions