Skip to content

Config: harden meta and references config validation - #358

Open
ol-nata wants to merge 3 commits into
ts-factory:mainfrom
ol-nata:feat/config
Open

Config: harden meta and references config validation#358
ol-nata wants to merge 3 commits into
ts-factory:mainfrom
ol-nata:feat/config

Conversation

@ol-nata

@ol-nata ol-nata commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Info

Addresses the validation gaps described in #259: meta config patterns and references config URIs were only checked for basic JSON schema shape, with no checks that would catch a broken pattern or a broken link before it reaches the database.

Overview of Changes

Meta config

  • set-patterns entries are now validated as regular expressions at config save time. Previously an invalid pattern was accepted, stored, and only failed later — silently — inside the meta_categorization task.

References config

  • Require at least one log base, and at least one URI per log base, in LOGS_BASES — an empty entry is no longer silently accepted.
  • uri fields in LOGS_BASES, ISSUES, and REVISIONS must now use the http(s) scheme, so a malformed or unsupported URI is rejected instead of reaching the UI as a broken link.

Closes: #259

Reject `set-patterns` entries that are not valid regular expressions
at config save time via JSON schema validation, instead of letting
them fail silently later during `meta_categorization`.

Related to: ts-factory#259
Signed-off-by: Natalia Rybchenko <natalia.rybchenko@oktetlabs.ru>
Require at least one log base, and at least one URI per log base, in
the references config schema, so an empty log base entry — or an
empty list of log bases — is rejected at config save time instead of
being silently stored as a no-op.

Signed-off-by: Natalia Rybchenko <natalia.rybchenko@oktetlabs.ru>
Require the http(s) scheme for `uri` fields in the references config
schema (`LOGS_BASES`, `ISSUES`, `REVISIONS`), rejecting malformed or
unsupported URIs at config save time instead of letting them reach
the UI as broken links.

Closes: ts-factory#259
Signed-off-by: Natalia Rybchenko <natalia.rybchenko@oktetlabs.ru>
@ol-nata ol-nata changed the title Feat/config Config: harden meta and references config validation Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

per_conf: provide additional config validation

1 participant