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

Rich markup regression in 0.19.7 #4094

Closed
noklam opened this issue Aug 15, 2024 · 3 comments · Fixed by #4097
Closed

Rich markup regression in 0.19.7 #4094

noklam opened this issue Aug 15, 2024 · 3 comments · Fixed by #4097

Comments

@noklam
Copy link
Contributor

noklam commented Aug 15, 2024

Context

The regression happened in 0.19.7.

before 0.19.7:
image

In 0.19.7:
Uploading image.png…

However, I think the change introduced in #3682 never really worked properly. The logic to detect the rich handler doesn't seem to work. When I have rich installed the orange colouring isn't there, and I added some print statements and it seems like the RichHandler isn't ever set.

Originally posted by @merelcht in #4090 (comment)

@lrcouto
Copy link
Contributor

lrcouto commented Aug 15, 2024

I've found that the logger object being used in testing has nothing in its handlers parameter, this is why it's not working.

{'filters': [], 'name': 'kedro.io.data_catalog', 'level': 0, 'parent': <Logger kedro (INFO)>, 'propagate': True, 'handlers': [], 'disabled': False, '_cache': {20: True}, 'manager': <logging.Manager object at 0x7fea88d9d010>}

@noklam
Copy link
Contributor Author

noklam commented Aug 15, 2024

@lrcouto See #4097

The original tests are not that useful because they are not testing the actual logger (root) that do the work. I removed the cache as I don't think it's useful and simply move it as an internal attribute (self._use_rich_markup).

The original function try to be generic but I think it is a bit over-complicated for things that no one is using.

@lrcouto
Copy link
Contributor

lrcouto commented Aug 15, 2024

That seems like it works nicely! Works without Rich as expected too. I fixed that one linter error that was popping up too.

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 a pull request may close this issue.

2 participants