Context
POST /api/pilots/ (added in #570) accepts grid_type, grid_site and destination_site as free strings, and PATCH /api/pilots/metadata similarly accepts GridType, GridSite, DestinationSite and Queue without validation. A typo silently creates pilots attached to nonexistent sites, which then pollutes accounting and monitoring groupings.
The vo field is already validated against the registry (400 for unknown VOs) since #570.
Legacy DIRAC's PilotManagerHandler.addPilotReferences performs no validation either, so this is an improvement over parity, not a regression fix.
Blocker
The site list cannot be validated today: the diracx Config schema does not model the Resources/Sites section of the CS. ResourcesConfig currently only contains Computing.OSCompatibility, with extra="ignore" and its own TODO ("Remove this once the model is extended to support everything", diracx-core/src/diracx/core/config/schema.py).
DoD
Context
POST /api/pilots/(added in #570) acceptsgrid_type,grid_siteanddestination_siteas free strings, andPATCH /api/pilots/metadatasimilarly acceptsGridType,GridSite,DestinationSiteandQueuewithout validation. A typo silently creates pilots attached to nonexistent sites, which then pollutes accounting and monitoring groupings.The
vofield is already validated against the registry (400 for unknown VOs) since #570.Legacy DIRAC's
PilotManagerHandler.addPilotReferencesperforms no validation either, so this is an improvement over parity, not a regression fix.Blocker
The site list cannot be validated today: the diracx
Configschema does not model theResources/Sitessection of the CS.ResourcesConfigcurrently only containsComputing.OSCompatibility, withextra="ignore"and its own TODO ("Remove this once the model is extended to support everything",diracx-core/src/diracx/core/config/schema.py).DoD
Resources/Sitesin the Config schema (withDIRAC_COMPAT_ENABLE_CS_CONVERSIONsupport for the legacy CFG format, as done forOSCompatibility).grid_site/destination_site/grid_typeagainst the modeled site list onPOST /api/pilots/and onPATCH /api/pilots/metadata(GridSite/DestinationSitefields). Same question applies toQueue.