[core] Rotate log monitor#51573
Merged
jjyao merged 16 commits intoray-project:masterfrom Mar 28, 2025
Merged
Conversation
6763f18 to
064ce19
Compare
Signed-off-by: dentiny <dentinyhao@gmail.com>
064ce19 to
cb286eb
Compare
Signed-off-by: dentiny <dentinyhao@gmail.com>
Signed-off-by: dentiny <dentinyhao@gmail.com>
Signed-off-by: dentiny <dentinyhao@gmail.com>
Signed-off-by: dentiny <dentinyhao@gmail.com>
Signed-off-by: dentiny <dentinyhao@gmail.com>
Signed-off-by: dentiny <dentinyhao@gmail.com>
jjyao
reviewed
Mar 28, 2025
Collaborator
jjyao
left a comment
There was a problem hiding this comment.
Have you tested locally to see if it's working?
Comment on lines
+604
to
+613
| # Setup stdout/stderr redirect files | ||
| stdout_fileno = sys.stdout.fileno() | ||
| stderr_fileno = sys.stderr.fileno() | ||
| # We also manually set sys.stdout and sys.stderr because that seems to | ||
| # have an effect on the output buffering. Without doing this, stdout | ||
| # and stderr are heavily buffered resulting in seemingly lost logging | ||
| # statements. We never want to close the stdout file descriptor, dup2 will | ||
| # close it when necessary and we don't want python's GC to close it. | ||
| sys.stdout = open_log(stdout_fileno, unbuffered=True, closefd=False) | ||
| sys.stderr = open_log(stderr_fileno, unbuffered=True, closefd=False) |
Collaborator
There was a problem hiding this comment.
This happens multiple times in the code base, lets make a shared function
Contributor
Author
There was a problem hiding this comment.
I understand, can I do it when all components rotated and merged?
Contributor
Author
Unit tests fail on my local, and I get the same error for main branch, but somehow pass on CI. |
Signed-off-by: dentiny <dentinyhao@gmail.com>
jjyao
approved these changes
Mar 28, 2025
jjyao
reviewed
Mar 28, 2025
| f"--gcs-address={gcs_address}", | ||
| f"--logging-rotate-bytes={max_bytes}", | ||
| f"--logging-rotate-backup-count={backup_count}", | ||
| f"--logging-filename={logs_dir}/log_monitor.log", |
Collaborator
There was a problem hiding this comment.
actually this line is not needed, can you create a follow-up to delete it?
justinrmiller
pushed a commit
to justinrmiller/ray
that referenced
this pull request
Mar 30, 2025
Signed-off-by: dentiny <dentinyhao@gmail.com> Signed-off-by: Justin Miller <justinrmiller@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR rotates for log monitor via stream redirection utils.