Skip to content

Python: small fix for logging in declarative#2341

Merged
eavanvalkenburg merged 2 commits intomicrosoft:mainfrom
eavanvalkenburg:decl_log_fix
Nov 20, 2025
Merged

Python: small fix for logging in declarative#2341
eavanvalkenburg merged 2 commits intomicrosoft:mainfrom
eavanvalkenburg:decl_log_fix

Conversation

@eavanvalkenburg
Copy link
Member

Motivation and Context

Small fix for the logs being produced by the declarative loader

Description

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copilot AI review requested due to automatic review settings November 20, 2025 08:46
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Nov 20, 2025

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
TOTAL15040221885% 
report-only-changed-files is enabled. No files were changed during this commit :)

Python Unit Test Overview

Tests Skipped Failures Errors Time
2183 127 💤 0 ❌ 0 🔥 1m 0s ⏱️

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a logging improvement for the declarative loader in Python, specifically addressing security concerns when logging API keys. The change adds a log_value parameter to the _try_powerfx_eval function to control whether sensitive values are fully logged.

Key changes:

  • Added a log_value parameter to _try_powerfx_eval to control logging verbosity for sensitive values
  • Modified exception logging to show only the first 5 characters of values when log_value=False
  • Updated the warning message for unavailable PowerFx engine to be more generic

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Nov 20, 2025
Merged via the queue into microsoft:main with commit 039e49f Nov 20, 2025
23 checks passed
arisng pushed a commit to arisng/agent-framework that referenced this pull request Feb 2, 2026
* small fix for logging in declarative

* fix spaces in string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants