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

update for flux-core changes in 0.46 and 0.47 #13

Merged
merged 4 commits into from
Jan 11, 2023

Conversation

ofaaland
Copy link
Contributor

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

$ mini alloc -n1 -t3
$ set | grep FLUX

See

  • 485743d19 broker: clear job environment vars in rc scripts

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.
@ofaaland ofaaland changed the title WIP: update for flux-core changes in 0.46 and 0.47 update for flux-core changes in 0.46 and 0.47 Dec 21, 2022
@ofaaland
Copy link
Contributor Author

@morrone I tested this successfully on fluke. Please review, thanks.

@morrone
Copy link
Member

morrone commented Dec 21, 2022

@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.

@ofaaland
Copy link
Contributor Author

ofaaland commented Dec 22, 2022 via email

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.
@ofaaland
Copy link
Contributor Author

@morrone I've updated the specfile and added a configure check, and tested. Ready for your review.

@morrone morrone merged commit 4346565 into LLNL:main Jan 11, 2023
@morrone
Copy link
Member

morrone commented Jan 11, 2023

Looks good to me.

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 this pull request may close these issues.

2 participants