Skip to content

Show validation errors when creating external rules#369

Merged
marc-sift merged 1 commit into
mainfrom
show_validation_results
Nov 7, 2025
Merged

Show validation errors when creating external rules#369
marc-sift merged 1 commit into
mainfrom
show_validation_results

Conversation

@marc-sift
Copy link
Copy Markdown
Contributor

Example:

Traceback (most recent call last):
  File "/home/mjulien/code/sift/python/examples/rule_evaluation/external_rules/yaml_config/main.py", line 52, in <module>
    report = rule_eval_service.evaluate_external_rules_from_yaml(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mjulien/code/sift/python/lib/sift_py/rule_evaluation/service.py", line 191, in evaluate_external_rules_from_yaml
    rule_ids = self._rule_service.create_external_rules_from_yaml(paths, named_expressions)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mjulien/code/sift/python/lib/sift_py/rule/service.py", line 119, in create_external_rules_from_yaml
    return self.create_external_rules(rule_configs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mjulien/code/sift/python/lib/sift_py/rule/service.py", line 333, in create_external_rules
    raise Exception("Failed to create external rules\n" + reason)
Exception: Failed to create external rules
asset_expression_validation_results {
  asset_id: "a695480e-0069-44b0-ab4b-93e602f743cb"
  error: "undeclared reference to \'a\' (in container \'\')"
}

@marc-sift marc-sift changed the title Show validation results when creating external rules Show validation errors when creating external rules Nov 6, 2025
@marc-sift marc-sift requested a review from nathan-sift November 6, 2025 22:40
@marc-sift marc-sift force-pushed the show_validation_results branch from 76b0208 to 68606e6 Compare November 7, 2025 19:01
@marc-sift marc-sift merged commit 1b98f97 into main Nov 7, 2025
15 of 16 checks passed
@marc-sift marc-sift deleted the show_validation_results branch November 7, 2025 19:29
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.

2 participants