airqo-platform / airqo-platform/AirQo-api

Remove dead get_networks() helper — proxied a removed Auth Service endpoint; device-registry owns this data now

Abierto
#7,052 0 comentarios 0 reacciones 1 asignado Reclamado por @NicholasTurner23 Ver en GitHub
cleanup good-first-issue
Lenguaje dominante
JavaScript
Estrellas
26
Forks
24
Merge medio
5 h 36 min
PR fusionados (30 d)
81

Descripción

## Summary

**Microservice:** `src/workflows/` in this repo. All paths below are relative to that root.

The Auth Service has removed the `GET /users/networks` endpoint entirely, as part of a full removal of the legacy "network" org-membership concept (superseded by groups).

`get_networks()` in `airqo_etl_utils/data_api.py` calls this endpoint. It has been confirmed to have zero live callers anywhere in this codebase — checked every import site of `data_api`, and nothing pulls this function in except its own test file.

## Fix

Safe to delete `get_networks()` and its associated test coverage whenever convenient. It is unreachable dead code today and would only start throwing if something were to newly call it, since the endpoint it depends on no longer exists.

**If this capability is ever needed again:** note that `net_status` param and the `net_name`/`net_status` shape it expects back were never really an Auth Service concept — they map directly onto device-registry's own `Network` model, which already exposes full CRUD at `GET/POST /api/v2/devices/networks` (`net_status` filtering included) and is the canonical owner of this data. A revived version would point there instead of Auth Service.

## Priority

Low — cleanup only, no live pipeline or task depends on this function.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Open src/workflows/airqo_etl_utils/data_api.py and its associated test file; start by locating get_networks() and checking the import references described in the issue. Remove the helper and its test coverage, then run the relevant test file and verify that no live callers remain.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
api, backend
Tipo de issue
Refactorización
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Activo
Claridad
Bien especificado
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.