Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOP-21408] Fix logging KeyValueIntHWM using log_hwm #316

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

dolfinus
Copy link
Member

@dolfinus dolfinus commented Nov 12, 2024

Change Summary

Currently KeyValueIntHWM in printed to logs like this:

    hwm = KeyValueIntHWM(
        name = 'test_offset1',
        entity = 'test_topic',
        expression = 'offset',
        value = [
            0,
        ]
    )

But it should be:

    hwm = KeyValueIntHWM(
        name = 'test_offset1',
        entity = 'test_topic',
        expression = 'offset',
        value = {
            0: 123,
        }
    )

I've added handling of dict and set to log_collection function.

Also fixed bug then logging with INFO level lead hiding up Kafka addresses:

|Kafka| Checking connection availability...
|Kafka| Using connection parameters:
        cluster = 'cluster'
        addresses = [
            # change level to 'DEBUG' to print all values,
        ]
        protocol = KafkaPlaintextProtocol()
        auth = None
        extra = {}

Now it is:

|Kafka| Checking connection availability...
|Kafka| Using connection parameters:
        cluster = 'cluster'
        addresses = [
            'localhost:9093',
        ]
        protocol = KafkaPlaintextProtocol()
        auth = None
        extra = {}

Related issue number

Checklist

  • Commit message and PR title is comprehensive
  • Keep the change as small as possible
  • Unit and integration tests for the changes exist
  • Tests pass on CI and coverage does not decrease
  • Documentation reflects the changes where applicable
  • docs/changelog/next_release/<pull request or issue id>.<change type>.rst file added describing change
    (see CONTRIBUTING.rst for details.)
  • My PR is ready to review.

@dolfinus dolfinus self-assigned this Nov 12, 2024
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.

Project coverage is 95.31%. Comparing base (434648e) to head (1311c6a).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
onetl/log.py 94.11% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #316      +/-   ##
===========================================
- Coverage    95.44%   95.31%   -0.13%     
===========================================
  Files          225      225              
  Lines         8986     8994       +8     
  Branches       895      898       +3     
===========================================
- Hits          8577     8573       -4     
- Misses         290      302      +12     
  Partials       119      119              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dolfinus dolfinus merged commit 91b83b1 into develop Nov 12, 2024
32 of 33 checks passed
@dolfinus dolfinus deleted the bugfix/DOP-21408-log-hwm branch November 12, 2024 14:07
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.

3 participants