googleapis / googleapis/google-cloud-node

monitoring.listTimeSeries silently ignores exeuctionErrors in response if autoPaginate is true

Aperta
#7,745 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
api: monitoring library: google-cloud-node-core priority: p2 type: bug
Lingua principale
TypeScript
Stelle
3.2k
Fork
712
Merge medio
2g 9h
PR unite (30g)
104

Descrizione

When using the `monitoring.listTimeSeries` method, the default calloption specifies `autoPaginate: true`. In this mode, the call is wired up with gax in a way that its pagination code ignores response fields other than the response item list and the next page token.

In this API method, however, there's an important field called `executionErrors`, which can contain errors like:
```
[{"code":14, "details":[], "message":"Query results don't include data from regions: europe-central1, europe-west1. Please retry in a few minutes."}]
```
In extreme cases, this method can return 0 results due to these underlying problems.

There's a clear solution here of course, I can manage paging myself and then I can inspect this field and act accordingly.

However, this can easily cause problems for developers not fully aware of this field and the internals of how gax manages auto-paging.

There can be multiple ways the library could handle these problems:
* Either retry the api call for the individual page
* Or reject the entire call in this case.
* Maybe expose an aggregate of the executionErrors in the response.

I understand that the API side of this service made the decision to return partial errors, so that the clients can decide if they are happy with the partial results or retry if not. However, as a developer calling this API with this client library, I would prefer a default where I can be sure that the results are complete if no errors was thrown.

I also understand that the development of such a feature would likely need extensions in the underlying gax library too.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia dal punto di ingresso monitoring.listTimeSeries e segui il modo in cui gax gestisce l'impaginazione automatica, concentrandoti sui campi della risposta che vengono mantenuti. Verifica come vengono rappresentati gli executionErrors e determina il comportamento previsto per le risposte paginate; il lavoro è completato quando tali errori non vengono più ignorati silenziosamente con autoPaginate abilitato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
google-cloud, nodejs, typescript
Ambito
api, cloud
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.