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

Copy components from one instrument to another - implementation #7515

Closed
3 tasks
rerpha opened this issue Dec 5, 2022 · 3 comments
Closed
3 tasks

Copy components from one instrument to another - implementation #7515

rerpha opened this issue Dec 5, 2022 · 3 comments

Comments

@rerpha
Copy link
Contributor

rerpha commented Dec 5, 2022

Following the discussion in ticket #7389 I would like to implement the changes discussed.
Design decisions can be found in the notes of that discussion.

Acceptance Criteria

  • A user can copy a component (and config if this is trivial) from one instrument to another
  • we add any required upgrade steps to enable the above
  • this is system tested

Extra Information

See #7389 (comment) for the discussion outcome.

This ticket will require:

Changing the blockserver to:

  • serve all component details and current config version over channel access - this needs to include whether the config is protected, which IOCs there are and all macros, autostart/autorestart settings, as well as all blocks and groups. Synoptics are currently not linked to via components so they may not need to be included.
  • handle actually copying over a component
    • for pv sets, try and work out whether something is local or if it has a prefix on it (unless PV values: add local toggle #7516 is done first)
    • for local PVs, keep them local and this'll mean that the block gets a prefix prepended
    • for non-local PVs, keep them absolute, but warn the user (see below)
    • for protected/dynamic, keep this persistent
  • potentially marking certain things as "copy-unsafe" so that we can add to the list of warnings that we show to the user ie galil may rely on autosave values etc. - this will be all motor controllers minus the mclennan, eurotherms with calib files in inst settings area etc.

The GUI will need to be modified to add an option to copy a component from another instrument, then use the instlist to determine what servers are up (using the blockserver server status field?) then grey out instruments that are
A) down
B) on another config version ( we should disallow copying if so)

after an instrument + component are selected, we should show the warning dialog, then the "edit component" window as things may need to be changed (see discussion for list of things) - consider not using a modal dialogue so the user can have it alongside the "edit component" window?

things to warn about:

  • IOCs which may rely on autosave/settings area items - we should just ask the scientist to talk to us if they are doing this. We could use the copy-unsafe list for this as mentioned above
  • non-local blocks, should double check these dont contain an unwanted instrument prefix
  • user should check comms settings are the same ie IP addresses, com ports, baud etc.
  • remote IOCs

things to disallow:

  • dynamic (ie componentswitcher) components
  • copying between different config versions

How to Test

verbose instructions for reviewer to test changes
(Add before making a PR)

@rerpha rerpha changed the title Copy components from one instrument to another Copy components from one instrument to another - implementation Dec 5, 2022
@rerpha rerpha added the proposal label Dec 5, 2022
@rerpha rerpha added proposal and removed impeded labels Dec 5, 2022
@rerpha
Copy link
Contributor Author

rerpha commented Dec 5, 2022

ignore label changes, my mouse attacked me

@rerpha
Copy link
Contributor Author

rerpha commented Jan 16, 2023

How long did you spend on this @NikolaRoev ? I think i'd put the size as time spent plus time for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

No branches or pull requests

5 participants