vespa-engine/vespa

Let Vespa HTTP client exit with non-zero return code on parsing errors

クローズ

#10,842 opened on 2019/10/02

 (10 件のコメント) (0 件のリアクション) (0 人の担当者)Java (561 件のフォーク)batch import
enhancementgood first issue

Repository metrics

Stars
 (4,948 個のスター)
PR merge metrics
 (平均マージ 1d 22h) (30d で 209 merged PRs)

説明

As reported by @rafan, the Vespa HTTP client will, by design, return with a standard zero return code even if the data fed har parsing errors:

Tue Oct 01 12:21:23 UTC 2019 Result received: 0 (0 failed so far, 1 sent, success rate 0.00 docs/sec).
Failure: Result for 'id:docker.ouroath.com:image::foobar
1569932482487 Trace starting 
1569932483817 Asked about retrying for cluster ID 0, number of retries is 1 Detail:
Detail resultType=FATAL_ERROR exception='No field 'foobar' in the structure of type 'image'' endpoint=someendpoint:443 ssl=true resultTimeLocally=1569932483817
1569932483835 Got detail: Detail resultType=FATAL_ERROR exception='No field 'foobar' in the structure of type 'image'' endpoint=someendpoint:443 ssl=true resultTimeLocally=1569932483817

:
    Detail resultType=FATAL_ERROR exception='No field 'foobar' in the structure of type 'image'' endpoint=someendpoint:443 ssl=true resultTimeLocally=1569932483817

Tue Oct 01 12:21:24 UTC 2019 Result received: 1 (1 failed so far, 1 sent, success rate 0.00 docs/sec).
$ echo $?
0

While this default behavior shouldn't change, we should add an optional command line parameter that would make vespa-http-client exit with a non-zero return code upon parsing errors.

コントリビューターガイド