-
Notifications
You must be signed in to change notification settings - Fork 32
pydantic2 making ported services green #6701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 16 commits
088fcdd
49c187b
8d6ca68
ab5ed66
c4c56c5
742c889
efa4bd9
77a4252
209143b
95c8e94
72cf61c
fb2e2e3
54176bf
45c163c
7e56899
ede8a16
6a18261
11154e1
346590c
fc4aab7
07f6094
2f0862c
21baf8b
072498c
e7a9e9d
cf8ddbe
4e0f21f
eaf6d73
7b2b82e
b492d5d
d33653a
108cad4
80a59e5
3a25863
748b664
0d61811
ab28ae1
0c5ac7e
7697eab
6675a5c
49b9cd1
042e867
b934595
5c0b587
d720750
2294bfe
f070a07
bded988
4e34ec7
02811cd
b90220c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ | |
| from models_library.basic_types import LogLevel | ||
| from models_library.services_resources import ResourcesDict, ResourceValue | ||
| from pydantic import AliasChoices, ByteSize, Field, PositiveInt, TypeAdapter | ||
| from pydantic_settings import SettingsConfigDict | ||
| from servicelib.logging_utils_filtering import LoggerName, MessageSubstring | ||
| from settings_library.application import BaseApplicationSettings | ||
| from settings_library.base import BaseCustomSettings | ||
|
|
@@ -47,20 +48,20 @@ class ApplicationSettings(BaseApplicationSettings, MixinLoggingSettings): | |
| LOG_LEVEL: LogLevel = Field( | ||
| LogLevel.INFO.value, | ||
| validation_alias=AliasChoices( | ||
| "CATALOG_LOG_LEVEL", "CATALOG_LOGLEVEL", "LOG_LEVEL", "LOGLEVEL" | ||
| "CATALOG_LOGLEVEL", "LOG_LEVEL", "CATALOG_LOG_LEVEL", "LOGLEVEL" | ||
GitHK marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ), | ||
| ) | ||
| CATALOG_LOG_FORMAT_LOCAL_DEV_ENABLED: bool = Field( | ||
| default=False, | ||
| validation_alias=AliasChoices( | ||
| "CATALOG_LOG_FORMAT_LOCAL_DEV_ENABLED", "LOG_FORMAT_LOCAL_DEV_ENABLED" | ||
| "LOG_FORMAT_LOCAL_DEV_ENABLED", "CATALOG_LOG_FORMAT_LOCAL_DEV_ENABLED" | ||
| ), | ||
| description="Enables local development log format. WARNING: make sure it is disabled if you want to have structured logs!", | ||
| ) | ||
| CATALOG_LOG_FILTER_MAPPING: dict[LoggerName, list[MessageSubstring]] = Field( | ||
| default_factory=dict, | ||
| validation_alias=AliasChoices( | ||
| "CATALOG_LOG_FILTER_MAPPING", "LOG_FILTER_MAPPING" | ||
| "LOG_FILTER_MAPPING", "CATALOG_LOG_FILTER_MAPPING" | ||
|
||
| ), | ||
| description="is a dictionary that maps specific loggers (such as 'uvicorn.access' or 'gunicorn.access') to a list of log message patterns that should be filtered out.", | ||
| ) | ||
|
|
@@ -101,3 +102,5 @@ class ApplicationSettings(BaseApplicationSettings, MixinLoggingSettings): | |
| json_schema_extra={"auto_default_from_env": True}, | ||
| description="settings for opentelemetry tracing", | ||
| ) | ||
|
|
||
| model_config = SettingsConfigDict(extra="allow") | ||
GitHK marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,4 +7,5 @@ | |
| aiodocker | ||
| async-timeout | ||
| dask-gateway-server[local] | ||
| pydantic-settings | ||
| pydantic[email,dotenv] | ||
Uh oh!
There was an error while loading. Please reload this page.