Skip to content

Cannot call prepare outside of a run #1211

@callumforrester

Description

@callumforrester

Pending #1210 it will be impossible to call prepare outside of a run with our current setup because prepare eventually calls the path provider, which depends on the state that is the current run.

sequenceDiagram
    plan->>+RE: prepare()
    RE->>+detector: prepare()
    detector->>+writer: arm()
    writer->>+path_provier: __call__()
    path_provier->>+writer: path (from numtracker, dependant on current run)
    writer->>+ioc: set_path(path)
    writer->>+ioc: open()
    writer->>-detector:
    detector->>-RE:
    RE->>-plan:
Loading

This issue is to discuss if we actually want that behaviour long-term

Steps To Reproduce

Steps to reproduce the behaviour:

  1. Fix StartDocumentPathProvider does not clear its state after a run #1210
  2. See that you can now never call prepare outside of a run

Acceptance Criteria

  • Either
    • prepare does not depend on the current state that is the run
    • prepare gives a very clear error message when called outside of a run

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions