-
Notifications
You must be signed in to change notification settings - Fork 10
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
update for flux-core changes in 0.46 and 0.47 #13
Conversation
flux-core 0.47 provides an explicit flux_job_timeleft() so we no longer need to support this more complex method for getting the information, and there is better assurance the interface won't change.
Starting with flux-core v0.46, environment variable FLUX_JOB_ID is not set for processes running in an allocation, but not launched by flux, for example $ mini alloc -n1 -t3 $ set | grep FLUX See * 485743d19 broker: clear job environment vars in rc scripts in flux-core for more details. In this case, a job ID still exists, and can be obtained with flux_attr_get().
Add some debug statements at critical points in flux plugin.
@morrone I tested this successfully on fluke. Please review, thanks. |
Seems reasonable to me. This isn't going to be backwards compatible with older flux-core versions, right? So we'll at least want to add a version check in the libyogrt.spec.in. It wouldn't hurt to add a configure-time test as well for the flux_job_timeleft() function. |
Good point. I'll make both of those changes.
…________________________________________
From: Christopher J. Morrone ***@***.***>
Sent: Wednesday, December 21, 2022 3:34 PM
To: LLNL/libyogrt
Cc: Faaland, Olaf P.; Author
Subject: Re: [LLNL/libyogrt] update for flux-core changes in 0.46 and 0.47 (PR #13)
@morrone<https://urldefense.us/v3/__https://github.com/morrone__;!!G2kpM7uM-TzIFchu!lFx8xARRzgr-h4tKCBf23eLKru1MJFAkYmjkg2vTHcFZvs5EwIS0g7VmTOe79xVu7w$> I tested this successfully on fluke. Please review, thanks.
Seems reasonable to me. This isn't going to be backwards compatible with older flux-core versions, right? So we'll at least want to add a version check in the libyogrt.spec.in. It wouldn't hurt to add a configure-time test as well for the flux_job_timeleft() function.
—
Reply to this email directly, view it on GitHub<https://urldefense.us/v3/__https://github.com/LLNL/libyogrt/pull/13*issuecomment-1362220118__;Iw!!G2kpM7uM-TzIFchu!lFx8xARRzgr-h4tKCBf23eLKru1MJFAkYmjkg2vTHcFZvs5EwIS0g7VmTOfP_IB_5g$>, or unsubscribe<https://urldefense.us/v3/__https://github.com/notifications/unsubscribe-auth/AB73C4ZDBU77B2ZTWCB2Q6TWOOHZRANCNFSM6AAAAAATD6XSZY__;!!G2kpM7uM-TzIFchu!lFx8xARRzgr-h4tKCBf23eLKru1MJFAkYmjkg2vTHcFZvs5EwIS0g7VmTOftlzOdfA$>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
flux_job_timeleft() was introduced in flux-core 0.47.0, so check the flux-core version in the spec file, and check the function is available when configure is run.
@morrone I've updated the specfile and added a configure check, and tested. Ready for your review. |
Looks good to me. |
Adapt to two recent flux changes:
flux-core 0.47 provides an explicit flux_job_timeleft() so we no longer
need to support this more complex method for getting the information,
and there is better assurance the interface won't change.
Starting with flux-core v0.46, environment variable FLUX_JOB_ID is
not set for processes running in an allocation, but not launched by
flux, for example
See