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

[Logs] Add runtime env started logs to job driver #45255

Merged

Conversation

GeneDer
Copy link
Contributor

@GeneDer GeneDer commented May 10, 2024

Why are these changes needed?

Added runtime env started logs to job driver

Related issue number

Closes https://github.com/anyscale/product/issues/27790

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@GeneDer
Copy link
Contributor Author

GeneDer commented May 13, 2024

Manually tested by submitting a job with runtime env to install a different version of pandas. Confirmed the timestamp of the runtime env start/ finished messages in the job driver log is right before/ after the runtime env start/ finished in the runtime env agent and setup logs
image

@GeneDer GeneDer requested a review from alanwguo May 13, 2024 16:54
@GeneDer GeneDer marked this pull request as ready for review May 13, 2024 16:54
@alanwguo
Copy link
Contributor

Hm, I'm a bit concerned about multiple processes writing to the same file. Will that work?

I see this SO thread that warns against it: https://stackoverflow.com/questions/15096090/python-separate-processes-logging-to-same-file

@GeneDer
Copy link
Contributor Author

GeneDer commented May 13, 2024

Hm, I'm a bit concerned about multiple processes writing to the same file. Will that work?

I see this SO thread that warns against it: https://stackoverflow.com/questions/15096090/python-separate-processes-logging-to-same-file

I see, thanks Alan! Let me try to work around it.

Signed-off-by: Gene Su <[email protected]>
Signed-off-by: Gene Su <[email protected]>
Signed-off-by: Gene Su <[email protected]>
@GeneDer GeneDer added the go add ONLY when ready to merge, run all tests label May 15, 2024
@@ -508,6 +525,9 @@ async def submit_job(
self.event_logger.info(
f"Started a ray job {submission_id}.", submission_id=submission_id
)

driver_logger = self._get_job_driver_logger(submission_id)
driver_logger.info("Runtime env setup is starting up")
Copy link
Contributor

Choose a reason for hiding this comment

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

let's do.

"Runtime env is setting up."

I think by saying "is starting up", people may expect to see a "is completed" log message afterwards

Signed-off-by: Gene Su <[email protected]>
@GeneDer GeneDer changed the title [Logs] Add runtime started and finished logs to job driver [Logs] Add runtime started logs to job driver May 15, 2024
@GeneDer GeneDer changed the title [Logs] Add runtime started logs to job driver [Logs] Add runtime env started logs to job driver May 15, 2024
@edoakes edoakes merged commit c833624 into ray-project:master May 15, 2024
7 checks passed
@GeneDer GeneDer deleted the add-runtime-env-start-and-end-logs branch May 15, 2024 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants