Skip to content

[pull] main from apache:main#171

Merged
pull[bot] merged 3 commits into
sudoevans:mainfrom
apache:main
May 11, 2026
Merged

[pull] main from apache:main#171
pull[bot] merged 3 commits into
sudoevans:mainfrom
apache:main

Conversation

@pull

@pull pull Bot commented May 11, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

In burr/core/graph.py, the function _render_graphviz() used 'format' as
a local variable name, which shadows Python's built-in format() function.
Renamed it to 'fmt' to avoid the shadowing while preserving all existing
behavior.

The variable is used only within the function scope and the rename is
consistent and self-documenting.
…tional inputs exist

In burr/core/action.py, the validate_inputs() method had a bug in its
error message construction due to operator precedence in a nested ternary
expression.

The original code:
    raise ValueError(
        f"Inputs to function {self} are invalid. "
        + f"Missing the following inputs: ..."
        if missing_inputs
        else (...)
    )

Due to Python operator precedence, the ternary 'if' binds lower than '+',
so the whole expression is evaluated as:
    (str1 + str2) if missing_inputs else (str3 if additional_inputs else "")

This means when BOTH missing_inputs and additional_inputs are non-empty,
the error message only reports the missing inputs and silently drops info
about the additional inputs. Similarly, when only additional_inputs exist,
the 'Inputs to function ... are invalid' prefix is omitted.

Fixed by building error message parts independently:
- Always include the 'Inputs to function ... are invalid' prefix
- Conditionally append missing inputs info
- Conditionally append additional inputs info
- Join all parts with spaces

This ensures all relevant validation errors are reported regardless of
which combination of issues exist.
All other persister modules in burr/integrations/persisters/ use
logging.getLogger(__name__) to create a properly scoped logger.
b_aiosqlite.py was using logging.getLogger() (no arguments), which
returns the root logger.

Using the root logger is bad practice because:
- It causes log messages to bypass the module's namespace, making it
  harder to filter or configure logging for this specific module.
- It can lead to unexpected log output appearing in the root logger's
  handlers even when the module's logging is intended to be suppressed.

This one-line fix changes it to logging.getLogger(__name__) for
consistency with all other persister implementations.
@pull pull Bot locked and limited conversation to collaborators May 11, 2026
@pull pull Bot added the ⤵️ pull label May 11, 2026
@pull pull Bot merged commit 7b20492 into sudoevans:main May 11, 2026
21 of 23 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant