DiamondLightSource / DiamondLightSource/dodal

Shared devices discussion outcome

Open
#1,739 13 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5
Forks
13
Avg merge
3d 2h
Merged PRs (30d)
10

Description

Meeting attended by myself, @jacob720, @oliwenmandiamond, @RJCD-Diamond, @EmsArnold, @fajinyuan, @Relm-Arrowny

We came up with some decisions relating to https://github.com/DiamondLightSource/dodal/pull/1490, https://github.com/DiamondLightSource/dodal/pull/1554, https://github.com/DiamondLightSource/dodal/pull/1532, https://github.com/DiamondLightSource/dodal/issues/503

Q: What should my device factory files (eg `i04.py`) look like for beamlines which share devices
A: For devices which have the same config, these factories can live in a shared file (eg `i04_shared.py`). Need to check with @tpoliaw that this is compatible with the new device manager.

Q: How should dodal ensure that shared devices can only be written to by the permitted beamline?
A: GDA uses a user office database to check which beamline+visit has permission to use devices at which times. This database is just mapping visits to beamtime and beamline. See [here](https://github.com/DiamondLightSource/dodal/pull/1490#issuecomment-3333146402) for a bit more detail. We should do this check in dodal. For this, we require:
- Working authn/authz
- A decorator for the writable shared devices so that requests to write will check if the user has beamline. Some users (eg beamline scientists) could have permission to always write to the files.
When BlueAPI sends info to numtracker about the user/visit, these services can also provide dodal with the information about if the beamline has access to these devices and for how long. Will need discussion with core for best implementation details.

We didn't discuss who or when this should be done, but it's probably the best long term solution

Q: Can we move our device configuration to be in yaml files outside of dodal?
A: We all thought this would be good. @fajinyuan's team are happy to put some effort into this in the new year, and will involve other teams for design opinions.

## Acceptance Criteria
* We document these decisions in the dodal docs

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.