airqo-platform / airqo-platform/AirQo-api

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

オープン
#7,052 コメント 0 件 リアクション 0 件 担当者 1 名 @NicholasTurner23 が担当を希望しています GitHub で見る
cleanup good-first-issue
主要言語
JavaScript
スター
26
フォーク
24
平均マージ
5時間 36分
マージ済み PR(30日)
81

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
api, backend
issue の種類
リファクタリング
難易度
2/5
見積もり時間
1〜3時間
活発さ
活発
明瞭さ
明確に書かれている
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。