arrowhead-f / arrowhead-f/client-library-python

`process_orchestration` raises ValidationError of pydantic

オープン
#33 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
5
フォーク
12
PR マージ指標
30日以内にマージされた PR はありません

説明

Hi, when I try to do orchestration of a service, I get a ValidationError of pydantic. When I debug the code step by step, I realize that `authenticationInfo` couldn't get from core service Orchestration. It's actually null in the database and this doesn't cause an error in Java client. However when I debug and I even change the provider value orchestration response as `authenticationInfo = null`, error continue. Finally, I changed the provider value of orchestration response as `authenticationInfo = ""` and it was fixed. Even provider `authenticationInfo` is nonrequired, `process_orchestration` raises error. I'm sharing debugging screenshots.

`authenticationInfo` is returned from core service Orchestration and there is no exception in Java client
![java](https://user-images.githubusercontent.com/54269270/150593277-697472a7-a95a-4a23-9f72-b37dd273d682.jpg)
`authenticationInfo` couldn't get from service Orchestration
![python](https://user-images.githubusercontent.com/54269270/150593289-8d16bc32-330b-4707-8b26-598c48cffaac.jpg)
`authenticationInfo` couldn't get from service Orchestration and error raised from pydantic like below
![exception](https://user-images.githubusercontent.com/54269270/150593762-c2bcc5e6-3952-400c-b377-e212b28c156a.jpg)
`authenticationInfo` couldn't get from service Orchestration and I added it as null but error raised from pydantic like below,
![python2](https://user-images.githubusercontent.com/54269270/150593777-df0f8ad7-7ac2-41df-9cf3-3ec23c366687.jpg)

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

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

process_orchestration による orchestration response の処理を追跡し、authenticationInfo とレポートに示されている Pydantic のバリデーションに注目します。null 値のケースを再現し、空文字列のケースと比較します。完了条件は、null のオプショナルな authenticationInfo が ValidationError を発生させなくなることです。

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

評価

技術スタック
python
領域
api, backend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

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

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