Skip to content

fix(view): log a refused search at WARNING; correct metric_trend's docstring (6.2.29) - #574

Merged
dwolfson merged 3 commits into
odpi:mainfrom
dwolfson:fix/6.2.29-p3s
Nov 9, 2026
Merged

dwolfson merged 3 commits into
odpi:mainfrom
dwolfson:fix/6.2.29-p3s

Conversation

@dwolfson

@dwolfson dwolfson commented Nov 9, 2026

Copy link
Copy Markdown
Member

Summary

Two small fixes for 6.2.29, from the release queue.

  • A refused search logs as a warning, not an error. exec_report_spec's failure log now logs an expected refusal at WARNING; any other ValueError still logs at ERROR. Both are still raised. The '*' search refusals (find_elements_by_property_value with no type or a root type, find_metadata_elements_with_string with no type) now raise a new SearchRefused, a ValueError subclass in pyegeria/core/request_filters.py, so existing except ValueError callers are unaffected. The analytic and role refusals are raised before that log, so they are unchanged.
  • metric_trend docstring corrected. It said a dotted metric_path "still works but is deprecated"; it has been refused since 6.2.19 (AnalyticFunctionRefused).

Release note: docs/release-notes/6.2.29.md ("Fixed").

Test plan

  • New tests/micro-tests/test_report_spec_refusal_log_level.py: refusals log at WARNING, a plain ValueError at ERROR, SearchRefused is a ValueError, and an end-to-end '*' report spec raises SearchRefused, logs one WARNING and sends no request.
  • Full micro-suite on Python 3.13: 2677 passed, 0 failed, 3 skipped.
  • Read-back: no caller depends on the exact type being ValueError (searched pyegeria, the Portal handlers and the trellis packages); the only visible change is the class name in a few error messages.

🤖 Generated with Claude Code

…'s docstring

exec_report_spec logged every ValueError at ERROR. A refusal (AllowlistRefusal,
AnalyticFunctionRefused, RoleRefused, CannotRunYet, MicroflowError) is an
expected outcome, so it now logs at WARNING; any other ValueError still logs
at ERROR. Both are still raised. Tests cover each refusal type and a plain
ValueError.

metric_trend's docstring said a dotted metric_path still works but is
deprecated; it has been refused since 6.2.19. It now says only registered
names are accepted.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…WARNING

find_elements_by_property_value and find_metadata_elements_with_string refuse
'*' with no type (or, for the former, a root type) as a plain ValueError, so
exec_report_spec logged them at ERROR. They now raise SearchRefused, a
ValueError subclass in pyegeria.core.request_filters, which _is_spec_refusal
recognises: they log at WARNING and except ValueError still catches them.

Tests: SearchRefused in the refusal cases, an end-to-end Element-DrE-Basic '*'
run through exec_report_spec (WARNING, still a ValueError, no request sent),
and the existing refusal tests now expect SearchRefused.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…aises SearchRefused

The WARNING branch wraps only the find call, so the release note now says a
refusal that reaches exec_report_spec's failure log (today the '*' search
refusals, SearchRefused) logs at WARNING, and that the analytic and role
refusals are raised before that log. The executor test stub for the '*'
refusal raises SearchRefused, as the real find methods do.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
@dwolfson
dwolfson merged commit e44c141 into odpi:main Nov 9, 2026
6 checks passed
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