_get_blocked_template() missing 1 required positional argument
まだ誰も着手していません。
評価
調査の方向性
datadog_lambda/asm.py:226 から開始し、報告された ddtrace のバージョン範囲と併せて http_utils._get_blocked_template の呼び出しを調査します。ASM を有効にした状態で引数不足による失敗を再現し、その後、影響を受けるコンテナデプロイメントでブロックされたレスポンスのパスが TypeError を発生させなくなったことを確認します。
索引モデルが issue の本文から書いたものです。
説明
Customers encountering the following error
def get_asm_blocked_response(
event_source: _EventSource,
) -> Optional[Dict[str, Any]]:
"""Get the blocked response for the given event source."""
if event_source.event_type not in _http_event_types:
return None
blocked = get_blocked()
if not blocked:
return None
desired_type = blocked.get("type", "auto")
if desired_type == "none":
content_type = "text/plain; charset=utf-8"
content = ""
else:
content_type = blocked.get("content-type", "application/json")
content = http_utils._get_blocked_template(content_type)
E TypeError: _get_blocked_template() missing 1 required positional argument: 'security_response_id'
datadog_lambda/asm.py:226: TypeError
or similar errors related to the _get_blocked_template function signature should check the version of ddtrace they are using. Customers encountering this error are likely using lambda with containers and/or have overridden the version of ddtrace packaged with the Datadog Python Lambda Layer. If you are using ddtrace v3.19.0 or above and have ASM enabled, please downgrade to a ddtrace version between v3.16.2 and v3.18.1.
Customers not using ddtrace v3.19.0 or above should not be affected by this issue.
- 主要言語
- Python
- スター
- 102
- フォーク
- 52
- 平均マージ
- 5日 19時間
- マージ済み PR(30日)
- 2
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DataDog/datadog-lambda-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
DataDog/datadog-lambda-python#758 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
DataDog/datadog-lambda-python#755 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
DataDog/datadog-lambda-python#682 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
DataDog/datadog-lambda-python#666 · リアクション 1 件 ·
-
DataDog/datadog-lambda-python#633 · コメント 2 件 · 担当者 1 名 ·
DataDog/datadog-lambda-python の issue をすべて見る
似ている issue
-
documentation help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
simonw/sqlite-utils#872 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100