DIRACGrid / DIRACGrid/DIRAC

Wire adapter into singletons + feature flag + certification tests

Open
#8,687 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
126
Forks
191
Avg merge
1d 13h
Merged PRs (30d)
33

Description

### Description

Plug the read adapter (sub-issue B) into the `ResourceStatus` and `SiteStatus` singletons, gated by a feature flag so deployments can switch between the legacy RPC backend and diracx without a code change. Verify behavior end-to-end against a diracx backend.

Writes continue to go through the legacy RPC service in this phase. This wiring is deliberately temporary: once phase 3 ships the write API, it will be replaced by a standard legacy adapter.

### Scope

- Route `ResourceStatus` and `SiteStatus` read operations through the adapter from sub-issue B when the feature flag is enabled.
- Feature flag (CS toggle) to switch between the DIRAC and diracx backends at runtime.
- Interaction with the existing 300s `RSSCache` on top of the adapter, and with diracx's server-side `CacheableSource`. The double-caching layout mirrors the current architecture and should not require changes.
- Integration tests that exercise the singletons end-to-end against a diracx backend, covering the main consumer patterns: element status for SEs / CEs / FTS, and the site queries (`getSiteStatuses`, `getUsableSites`, `getSites`).

### Non-goals

- No changes to the write path — writes still go to the legacy RPC service.
- No removal of the legacy RSS RPC service; that happens in phase 3.

### Reference

- Phase 2 main issue (this phase)
- Sub-issue A (binary model adaptation)
- Sub-issue B (read adapter)

### Acceptance criteria

- [ ] Feature flag switches the singletons between legacy RPC and diracx backends.
- [ ] With the flag on, reads are served by diracx and writes continue to reach the legacy RPC service.
- [ ] Integration tests cover `getElementStatus` for SEs / CEs / FTS and `getSiteStatuses` / `getUsableSites` / `getSites`.
- [ ] Behavior is verified against the certification instance.

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.