You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SovdClient._raw_get_items is a raw-httpx helper used for the query-param-filtered list calls (entity/global faults, logs, updates). It originally existed because the 0.5.0 generated client did not type those query params. The 0.6.0 client now types them, so the helper is no longer required for that reason - but the generated functions type the filters as per-endpoint enums, so a clean swap is non-trivial.
Proposed solution
Replace the four _raw_get_items call sites with the typed generated client functions and then remove _raw_get_items (and _fault_query_params if it becomes unused):
entity faults list -> list_<entity>_faults (status)
global faults list -> list_all_faults (status / include_muted / include_clusters)
entity logs list -> list_<entity>_logs (severity / context)
updates list -> list_updates (origin / target_version)
Map the string filters to the per-endpoint enums (ListComponentFaultsStatus, ListComponentLogsSeverity, etc.).
Additional context
Behavior change to decide on: the generated filter params are enums, so an out-of-enum filter string would raise locally instead of being passed through to the gateway. Choose between validating (enum) or keeping the lenient pass-through.
updates (origin / target_version) and logs context are plain strings (no enum) and convert trivially; only faults status and logs severity need per-entity-type enum mapping.
Deferred from the 0.6.0 client migration (Migrate to gateway 0.6.0 client #20) to keep that PR a focused version bump. The stale workaround comments were already corrected there.
Summary
SovdClient._raw_get_itemsis a raw-httpx helper used for the query-param-filtered list calls (entity/global faults, logs, updates). It originally existed because the 0.5.0 generated client did not type those query params. The 0.6.0 client now types them, so the helper is no longer required for that reason - but the generated functions type the filters as per-endpoint enums, so a clean swap is non-trivial.Proposed solution
Replace the four
_raw_get_itemscall sites with the typed generated client functions and then remove_raw_get_items(and_fault_query_paramsif it becomes unused):list_<entity>_faults(status)list_all_faults(status/include_muted/include_clusters)list_<entity>_logs(severity/context)list_updates(origin/target_version)Map the string filters to the per-endpoint enums (
ListComponentFaultsStatus,ListComponentLogsSeverity, etc.).Additional context
updates(origin/target_version) and logscontextare plain strings (no enum) and convert trivially; only faultsstatusand logsseverityneed per-entity-type enum mapping.