Skip to content

[feat] rework schema_validator on plugin utils and load_config - #174

Open
Aliaksei-Kharlap wants to merge 2 commits into
mainfrom
refactor/schema-validator-utils
Open

Aliaksei-Kharlap wants to merge 2 commits into
mainfrom
refactor/schema-validator-utils

Conversation

@Aliaksei-Kharlap

Copy link
Copy Markdown
Collaborator

Moves schema_validator onto influxdata-plugin-utils 0.5.0

Utils instead of local copies

| Was in the plugin | Now |
| _LineBuilderInterface, _BatchLines | write.write_data |
| _add_typed_field, _add_inferred_field | write.build_line_typed, write.infer_type |
| tomllib + pathlib config reader | sources.parse_toml, sources.parse_trigger_args, config.resolve_path |
| hand-rolled setting checks | validation.Validator |
| hand-rolled influxdb3_local.cache.get/put | cache.cached, five-minute TTL |

Config

  • the TOML file overrides the trigger arguments key by key instead of replacing
    them; a key the file leaves out keeps the value the arguments gave it
  • one KeySpec allowlist, built from the validators, refuses an unknown key in
    both layers instead of dropping it

Fixed

  • a target equal to its source no longer feeds the trigger back into itself
  • an unknown field type is named, with the accepted types listed
  • a non-finite value rejects its row instead of dropping the table's write
  • one table's write failure no longer discards the others; counters follow writes
  • type: "float" no longer accepts a bool
  • a table with no fields is refused at schema load
  • schema and config errors keep their cause
  • the rejection log is batched, with strictly increasing timestamps

This branch has not been deployed

No deployments
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.

1 participant