The prometheus_scrape interface has an optional metrics_path data field. In pydantic v1, this can be defined by simply setting `metrics_path: Optional[str] = ...`` in the class definition, however pydantic v2 now requires the field default to be set for any optional parameters. This means that any application using this interface with pydantic v2 was required to specify metrics_path.
This commit fixes this issue, restoring metrics_path to being optional for pydantic v2. See this thread for more details.
This fix is demonstrated working in this pr, specifically this commit which bumps to the modified schema and now passes scenario tests the previously failed.
The prometheus_scrape interface has an optional
metrics_path
data field. In pydantic v1, this can be defined by simply setting `metrics_path: Optional[str] = ...`` in the class definition, however pydantic v2 now requires the field default to be set for any optional parameters. This means that any application using this interface with pydantic v2 was required to specify metrics_path.This commit fixes this issue, restoring metrics_path to being optional for pydantic v2. See this thread for more details.
This fix is demonstrated working in this pr, specifically this commit which bumps to the modified schema and now passes scenario tests the previously failed.