aws / aws/aws-encryption-sdk-python

Logging an exception instead of / and a `raise` pollutes the log with extra traceback.

オープン
#615 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
255
フォーク
92
平均マージ
2日 17時間
マージ済み PR(30日)
2

説明

### Problem:

In many places in the SDK codebase, there are exception logging using the `_LOGGER.exception`. This logs the traceback of the exception. The encountered exception might then be bubbled up to the caller, or to the exit call which then again logs this exception. This causes duplicate logging at best, and confusion at worst since the exception message/type can be different.

### Solution:

Clean up the logging, and use raise over logging the exception wherever possible.

Ref https://github.com/aws/aws-encryption-sdk-python/issues/566

[//]: # (NOTE: If you believe this might be a security issue, please email aws-security@amazon.com instead of creating a GitHub issue. For more details, see the AWS Vulnerability Reporting Guide: https://aws.amazon.com/security/vulnerability-reporting/ )

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

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

調査の方向性

SDKのコードベースで`_LOGGER.exception`の使用箇所を検索し、コンテキストを確認するために関連するissue #566を確認してください。各例外が、それを再度ログに記録するcallerまたは終了パスまで伝播されるかを追跡してください。完了の条件は、例外が引き続き適切なcallerに到達する状態を保ったまま、冗長なtracebackのログ出力が削除されていることです。

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

評価

技術スタック
python
領域
security
issue の種類
リファクタリング
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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