Suppress "WARNING: Invalid HTTP request received." warning

オープン
#225 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

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

調査の方向性

ランタイムの起動パスから始め、01-tutorials/01-AgentCore-runtime/01-hosting-agent/01-strands-with-bedrock-model/runtime_with_strands_and_bedrock_models.ipynb の lifespan の例を使って警告を再現してください。"WARNING: Invalid HTTP request received." がどこで出力されるかを追跡し、アプリケーションログに影響を与えずに、初期化時にこの無害なメッセージが記録されなくなったことを確認してください。

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

説明

The following log may be recorded in the Application log output to CloudWatch Logs when the AgentCore runtime starts up.
When recorded during initialization after deployment, this is a message that does not affect the application. However, this could confuse users, so I would like to suppress it.

For example, you can confirm this log message by adding a lifespan to strands_claude.py as follows:

from contextlib import asynccontextmanager
from typing import AsyncGenerator

from strands import Agent, tool
from strands_tools import calculator # Import the calculator tool
import argparse
import json
from bedrock_agentcore.runtime import BedrockAgentCoreApp
from strands.models import BedrockModel

@asynccontextmanager
async def lifespan(_app: BedrockAgentCoreApp) -> AsyncGenerator[None, None]:
    """Completely empty lifespan context manager for testing."""
    yield
app = BedrockAgentCoreApp(lifespan=lifespan)

# Create a custom tool 
@tool
def weather():
    """ Get weather """ # Dummy implementation
    return "sunny"
(snip)
主要言語
Python
スター
786
フォーク
163
平均マージ
4時間
マージ済み PR(30日)
22

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aws/bedrock-agentcore-sdk-python のほかの issue

aws/bedrock-agentcore-sdk-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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