You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ts config validate, push and diff echo config lines in TOML parse errors #1396
ts config validate, ts config push and ts config diff still print the offending config line in TOML parse errors. That line can contain values an operator keeps private. #1291 fixed this for ts prebid client (see #1202), but these commands use different load paths:
They load through edgezero-core's deserialize_app_config_with_options, whose AppConfigError Display is failed to parse {path} as TOML: {source}.
The CLI's app_config::load_settings (used by ts config ad-templates * and ts audit ad-templates verify) wraps the same error as failed to load {path}: {err}.
ts config push is the step most likely to run in CI, so the text can land in CI logs.
Reproduction steps
Create trusted-server.toml whose third line is an unterminated string, for example origin_url = "https://origin.example.com/internal.
Run ts config validate (or push, diff, or a load_settings caller).
The error includes the parser snippet:
failed to load <tmp>/trusted-server.toml: failed to parse <tmp>/trusted-server.toml as TOML: TOML parse error at line 3, column 58
|
3 | origin_url = "https://origin.example.com/internal
| ^
invalid basic string, expected `"`
Expected behavior
The error names the file, line and column, but does not echo config text or the parser's snippet, matching ts prebid client after #1291.
Done when
edgezero-core's config loader exposes the parse error location without the source snippet (or the CLI can get it without formatting the source).
app_config::load_settings and the ts config validate / push / diff paths report path, line and column only.
Tests assert that a parse error from these commands contains the line/column and does not contain the config text.
Affected area
CI / Tooling
Context
Cross-cutting finding in aram356's review on #1291.
Activity