Open Liquidmasl opened 5 days ago
Actualy now deeper down in my software, when i thought it finally works. it seams some modin df initialisation REIMPORTS ray, or uses some other import, or dunno, which leads to the same method being called, again destroying my handlers...
So now i have to put from ray.data import from_pandas_refs
into my logging module aswell. so to make it work
This is a duplicate of https://github.com/ray-project/ray/issues/48732
What happened + What you expected to happen
I am debugging for 2 days now why our Loki logging handler will not log some lines.
I think I understand now that ray is removing all logging handlers and just.. readding (?) these?
Meaning the handler that is responsible for sending our logs to our logging server just disappears. I have not figured out why this happens.
I added a debug print in
logging.Handerl.__init__
andlogging.Handler.close
, this is what i get:So my loki handler is just... gone. And that without any notice, I just noticed that logs are missing on the server.
When I debug into the close method I see in the call stack that is being triggered by
generate_logging_config()
inray/private/_log
and it seams it is called always fromray/__init__.py
in line 7The only thing i can do is ensure that i ALWAYS import ray before i initialize my logging. a little change in linter configuration can lead to the ray import slipping below the logger initialization, silently shutting of our custom logger.
I think this is quite the severe issue! And it was a very hard and strange issue to find.
(might be related to https://github.com/ray-project/ray/issues/22312 ?)
After more trial and error I am even more confused. Using a queue handler, or another custom handler, it still works, even though apparently the handlers are closed. but when the custom handler has some custom shut down or
close()
code. stuff breaks. The 'minimal' reproducer is not so minimal, but it manages to reproduce without any libraries.Versions / Dependencies
Windows 11 Ray 2.39 Python 3.11
Reproduction script
Issue Severity
~Medium: It is a significant difficulty but I can work around it.~ Severe: it blocks me and also brings me to the edge of insanity