Skip to content

Conversation

@llucax
Copy link
Contributor

@llucax llucax commented Apr 25, 2025

The logging configuration was changed to make it compatible with the configuration generated by the UI, which doesn't quote sub-key properly.

To do this, the logger name needs to be specified explicitly now (the configuration key was used as the name before).

@Copilot Copilot AI review requested due to automatic review settings April 25, 2025 08:53
@llucax llucax requested a review from a team as a code owner April 25, 2025 08:53
@llucax llucax requested review from ela-kotulska-frequenz and removed request for a team April 25, 2025 08:53
@llucax llucax self-assigned this Apr 25, 2025
@llucax llucax added this to the v1.0.0-rc1900 milestone Apr 25, 2025
@github-actions github-actions bot added part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) part:config Affects the configuration management labels Apr 25, 2025
Copy link

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 updates the logging configuration to be compatible with the UI‐generated configuration by requiring the logger name to be specified explicitly, and by separating the root logger configuration from individual logger configurations.

  • Introduces a new RootLoggerConfig type for root logger settings
  • Updates tests and configuration parsing to use explicit logger names
  • Adjusts logging configuration actor to use the new naming scheme

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/config/test_manager.py Adds explicit logger name in configuration tests
tests/config/test_logging_actor.py Updates logger configuration tests to match the new format
src/frequenz/sdk/config/_logging_actor.py Introduces RootLoggerConfig and updates logging configuration logic
src/frequenz/sdk/config/init.py Updates exports to expose the new RootLoggerConfig
mkdocs.yml Updates documentation formatting options
RELEASE_NOTES.md Documents the logging config changes
Comments suppressed due to low confidence (1)

src/frequenz/sdk/config/_logging_actor.py:28

  • Consider decorating RootLoggerConfig with @DataClass (or an equivalent construct) for consistency with LoggerConfig and to ensure automatic generation of methods such as init.
class RootLoggerConfig:

@llucax llucax enabled auto-merge April 25, 2025 08:57
@llucax llucax moved this from To do to Review in progress in Python SDK Roadmap Apr 25, 2025
@llucax llucax added type:enhancement New feature or enhancement visitble to users scope:breaking-change Breaking change, users will need to update their code labels Apr 25, 2025
shsms
shsms previously approved these changes May 9, 2025
Copy link
Contributor

@shsms shsms left a comment

Choose a reason for hiding this comment

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

Optional release notes fix, looks good otherwise.

RELEASE_NOTES.md Outdated
level = "DEBUG"
```

- Now:
Copy link
Contributor

Choose a reason for hiding this comment

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

Not aligned with the previous - Before: I guess?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@github-project-automation github-project-automation bot moved this from Review in progress to Review approved in Python SDK Roadmap May 9, 2025
Copy link
Contributor

@ela-kotulska-frequenz ela-kotulska-frequenz left a comment

Choose a reason for hiding this comment

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

Nice!
And it is harder to forget about quote, now :)

llucax added 2 commits May 9, 2025 16:17
This configuration was at the wrong level.

Signed-off-by: Leandro Lucarella <[email protected]>
The logging configuration was changed to make it compatible with the
configuration generated by the UI, which doesn't quote sub-key properly.

To do this, the logger name needs to be specified explicitly now (the
configuration key was used as the name before).

Signed-off-by: Leandro Lucarella <[email protected]>
@llucax llucax dismissed stale reviews from ela-kotulska-frequenz and shsms via c6cf365 May 9, 2025 14:18
@llucax llucax force-pushed the logging-config branch from a4500b1 to c6cf365 Compare May 9, 2025 14:18
@llucax
Copy link
Contributor Author

llucax commented May 9, 2025

Fixed release notes indentation issue and rebased to fix conflicts.

level = "DEBUG"
```

- Now:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Still somehow GitHub gets confused about this...

@llucax llucax added this pull request to the merge queue May 9, 2025
Merged via the queue into frequenz-floss:v1.x.x with commit a582535 May 9, 2025
5 checks passed
@llucax llucax deleted the logging-config branch May 9, 2025 14:27
@github-project-automation github-project-automation bot moved this from Review approved to Done in Python SDK Roadmap May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:config Affects the configuration management part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) scope:breaking-change Breaking change, users will need to update their code type:enhancement New feature or enhancement visitble to users

Projects

Development

Successfully merging this pull request may close these issues.

3 participants