_get_blocked_template() missing 1 required positional argument
还没有人认领这个 Issue。
评估
调研方向
从 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 小时
- 30 天内合并 PR
- 2
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
DataDog/datadog-lambda-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
DataDog/datadog-lambda-python#758 · 1 个 reaction ·
-
难度 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 个 reaction ·
-
DataDog/datadog-lambda-python#633 · 2 条评论 · 已指派 1 人 ·
查看 DataDog/datadog-lambda-python 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
-
难度 2/5 1-3 小时 新手友好度 88/100
use-agent-os/agent-os#3314 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
BasedHardware/omi#15662 · 1 条评论 ·
-
documentation help wanted
难度 2/5 1-3 小时 新手友好度 90/100
-
难度 2/5 1-3 小时 新手友好度 62/100
AiursoftWeb/AnduinOS-2#19 ·