airqo-platform / airqo-platform/AirQo-api

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

Đang mở
#7,052 0 bình luận 0 reaction 1 người được giao Được @NicholasTurner23 nhận Xem trên GitHub
cleanup good-first-issue
Ngôn ngữ chính
JavaScript
Star
26
Fork
24
Merge trung bình
5 giờ 36 phút
Pull request đã merge (30 ngày)
81

Mô tả

## 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
api, backend
Loại issue
Tái cấu trúc
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.