Consolidate Container-only fields (dockerfile, buildContextPath, customDockerBuildArgs) into a containerConfig object

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

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

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

評価

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

調査の方向性

まず2つのAgentEnvSpecスキーマファイルと既存のnetworkConfigパターンを読み、その後、一覧にあるCLIおよびCDKの利用箇所を追跡してください: packaging/container.ts、dev/config.ts、dev/container-dev-server.ts、deploy/preflight.ts、AgentEnvironment、ContainerSourceAsset。コンテナ専用のフィールドが一貫してグループ化され、ドキュメントとアセットのスナップショットが更新され、移行に関する注記またはBack-Compatの判断が対応済みであれば完了です。

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

説明

Summary

With aws/agentcore-cli#1284, Container agents now have three flat, Container-only fields on AgentEnvSpec: dockerfile, buildContextPath, and customDockerBuildArgs — plus cross-cutting "only allowed for Container builds" validators for each.

Both AgentEnvSpecSchema copies (CLI and @aws/agentcore-cdk) already carry a standing comment near the validators:

If adding more Container-specific fields, consider consolidating into a containerConfig object (see networkConfig pattern)

We've now hit that threshold. This tracks grouping them under a single optional object:

containerConfig?: {
  dockerfile?: string;
  buildContextPath?: string;
  customDockerBuildArgs?: Record<string, string>;
}
Benefits
  • One build !== 'Container' && data.containerConfig check instead of three per-field validators.
  • Future container-only options land inside containerConfig with no new cross-cutting validators.
  • Clearer grouping in the schema and docs (mirrors the existing networkConfig pattern).
Why it's deferred

This is a breaking schema change: it moves the already-shipped dockerfile field, touches every consumer, existing user agentcore.json files, and asset snapshots — and would have ballooned a contributor PR. Better as its own scoped change (with a migration note / back-compat shim if we want to keep accepting the flat form for a release).

Scope
  • CLI: src/schema/schemas/agent-env.ts (+ compacted mirror), consumers (packaging/container.ts, dev/config.ts, dev/container-dev-server.ts, deploy/preflight.ts), docs, snapshots.
  • @aws/agentcore-cdk: src/schema/schemas/agent-env.ts (+ compacted mirror), AgentEnvironment, ContainerSourceAsset.

Ref: review comment on aws/agentcore-cli#1284.

主要言語
TypeScript
スター
339
フォーク
129
平均マージ
19時間 21分
マージ済み PR(30日)
125

環境構築

はじめの一歩

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

aws/agentcore-cli のほかの issue

aws/agentcore-cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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