CLI should not encode API response schema
- Lingua principale
- Go
- Stelle
- 109
- Fork
- 98
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
@rabbah commented on [Thu Nov 10 2016](https://github.com/apache/incubator-openwhisk/issues/1489)
I've experience several instances where a schema change in the controller must be reflected in the CLI to properly render the expected output on the command line because the current CLI implementation encodes the types too strictly and *unnecessarily* - in every case I've encountered so far where I've made a schema change to add or remove a field, the CLI would have been just fine if it treated the response from the controller opaquely.
We should refactor the API respond handling in the CLI so that it uses more generic JSON object interface rather than strict types that just get in the way.
I've also found several instances where the CLI is not in sync with the controller (Evidenced by several defects I've opened for these in recent days) and the CLI injects properties that should not exist (and hence confusing).
---
@ioana-blue commented on [Thu Nov 10 2016](https://github.com/apache/incubator-openwhisk/issues/1489#issuecomment-259872098)
I was bit by this as well and it's not fun. In fact, if I hadn't checked with RR, I would have wasted a lot of time on chasing a "bug" in my code, while it was really a schema change for activations which is not reflected in the cli.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia individuando la gestione delle risposte dell'API della CLI e i tipi di risposta rigorosi menzionati nell'issue. Confronta il modo in cui la CLI rende le modifiche allo schema del controller, quindi esegui il refactoring della gestione verso oggetti JSON generici. Il lavoro è completato quando le aggiunte o rimozioni dello schema vengono rese senza aggiornamenti dei tipi della CLI e la CLI non inserisce più proprietà non supportate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- go
- Ambito
- api, cli
- Tipo di issue
- Refactoring
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100