Cruise won't load on Django backend when loggers share a config name
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start by reading _get_logger_config_object_by_name() and set_active_logger_config in the Django backend, then inspect TestDjangoServerAPI.test_basic and how the NBP1406 cruise defines logger configs. Reproduce the failure with shared config names and confirm the lookup distinguishes configs by logger. Done when the Django backend loads that cruise and the test passes.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi Webb and Pablo! I ran into this while running the test suite on dev.
If a cruise file gives several loggers a config with the same name (say, every logger has an off config), the Django backend can't load it. It fails in set_active_logger_config with MultipleObjectsReturned.
From what I can tell, _get_logger_config_object_by_name() looks configs up by name alone. If config names are meant to be unique only within a logger (the test cruise seems to assume so), a shared name matches more than one row.
This is also why TestDjangoServerAPI.test_basic fails on both dev and master right now.
Easy way to see it: take the NBP1406 cruise and rename each logger's configs to shared names like off / net / net+file, then load it with the Django backend. The shipped NBP1406 file works fine since its names are unique.
I have a small fix that scopes the lookup to the logger, with a test. Happy to open a PR against dev if that sounds right to you.
- Lingua principale
- Python
- Stelle
- 57
- Fork
- 30
- Merge medio
- 3h 14m
- PR unite (30g)
- 56
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OceanDataTools/openrvdas
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
OceanDataTools/openrvdas#760 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
OceanDataTools/openrvdas#748 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 58/100
OceanDataTools/openrvdas#743 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
OceanDataTools/openrvdas#721 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 54/100
OceanDataTools/openrvdas#717 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di OceanDataTools/openrvdas
Issue simili
-
HassSetVolumeRelative reports no targets (empty success list) although the volume was changedApertaintegration: media_player
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
home-assistant/core#193344 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
daniel-ospina/tortoise#13607 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation priority: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno