[api] Validate a config without starting a run

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
54/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
api, backend

調査の方向性

Start by tracing POST /v1/run to find where request configs are merged with default.yaml and where world settings, agents, behavior services, and attacks are checked; review the related work in #214. Add a validation endpoint that runs checks without starting simulator components and returns 200 for valid configs or 422 with field paths for errors. Done means the endpoint accepts the same config shape as /v1/run and reports those results.

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

説明

Problem or motivation

Config errors are reported only after POST /v1/run has started the components: with --manage-components, the SUMO and CARLA adapters are started before the scenario reads agents, behavior services and attacks. A client learns about a typo from a failed task.

Scenario Manager builds configs in its editor and needs to show these errors to the user before a run. Without an API for it, the client has to duplicate the config rules of OpenCDA and keep them in sync.

Proposed solution
  • Add POST /v1/validate that takes the same config as POST /v1/run.
  • Merge it with default.yaml and run the config checks that do not need a running simulator: world settings, agents, behavior services and attacks (see #214).
  • Return 200 for a valid config, otherwise 422 with a list of errors, each with the field path.
Area

Scenario management

主要言語
Python
スター
11
フォーク
11
平均マージ
1日 16時間
マージ済み PR(30日)
12

環境構築

はじめの一歩

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

CAVISE/OpenCDA のほかの issue

CAVISE/OpenCDA の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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