Adapt DIRAC consumers to the binary status model(?)
- Dominant language
- Python
- Stars
- 126
- Forks
- 191
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 33
Description
### Description
Adapt the `ResourceStatus` and `SiteStatus` singletons, together with their callers, to work with the simplified binary status served by diracx (see phase 1, DIRACGrid/diracx#837).
Before starting, confirm that the richer "information layer" (`Active`, `Probing`, `Degraded`, …) used today is not actually relied upon by any consumer and can be safely collapsed into the binary allowed/banned model. Any place that genuinely needs more than binary information should be called out explicitly so we can decide whether to adapt the consumer or to extend the model.
### Scope
- Singleton-level changes in `ResourceStatus` and `SiteStatus` so that their public API keeps working when the underlying data is binary.
- Adjustments in callers that currently display or filter by raw status strings (e.g. `SiteStatus.getSites(siteState=...)`).
- Keeping the singleton cache format compatible with the binary data.
### Reference
- Phase 1 main issue: DIRACGrid/diracx#836
- Phase 1 data models: DIRACGrid/diracx#837
- Phase 2 discussion: [#790 comment](https://github.com/DIRACGrid/diracx/issues/790#issuecomment-4212787627)
### Acceptance criteria
- [ ] Confirmation (with examples) that the binary model is sufficient for all current consumers, or an explicit list of consumers that need more.
- [ ] `ResourceStatus` and `SiteStatus` singletons keep their public API while operating on binary data.
- [ ] Callers that filter/display raw status strings are updated.
- [ ] Existing DIRAC unit tests still pass; new tests cover the adapted behavior where relevant.
- [ ] No change to the legacy RPC service or its DB schema.
Contributor guide
Assessment
This issue has not been assessed yet.