Repository navigation
Fix behaviour of env_extra for HTCondor - #563
Conversation
Before only environment variables were considered using HTCondor's `Environment =` feature, whereas the parameter description generally says "Other commands to add". If the `Environment =` is needed, one can still use the generic `job_extra` parameter to set it. fixes dask#393 related to dask#323 dask#556
|
This looks fine to me but I wonder if it would make sense to add some documentation that would include the example in your comment? |
|
@mivade sure, always a good idea. Do you have any specific place in mind? |
riedel
left a comment
There was a problem hiding this comment.
I think if we make htcondor align with others we should also should move the checks to the generic tests
| assert "LC_ALL=en_US.utf8" in job_script | ||
| assert "cd /some/path/" in job_script | ||
| assert "source venv/bin/activate" in job_script | ||
| assert "export" not in job_script |
There was a problem hiding this comment.
a) Why is export stripped from jobscript ?? Why doesn't this fail: export should be in the script now.
b) Why can't this be checked independent og htcondor in the generic part
There was a problem hiding this comment.
a) You are right, "export" should be contained there now, I simply missed that. I'll add it.
b) To be honest, I am not really familiar yet with the structure of your test setup, I simply searched for the occurrences of HTCondor to see where I have to modify tests. If you can point me to where you would add it, I'll try to figure it out ;-)
Sadly there seem to be problems with the CI in general, right?
There was a problem hiding this comment.
For b), yes this could now be checked independently of HTCondor, we could add another test for env_extra in test_jobqueue_core.py, and apply it with a fixture to all the cluster classes.
But since the behavior just changed for HTCondor, I'm keen to leave also this part of the assertion in the HTCondor cluster.
Sadly there seem to be problems with the CI in general, right?
Yes unfortunately, I'm trying to advance on this point, but I've not a lot of time to devote to it.
There was a problem hiding this comment.
Alright, I realized anyway with the addition of f678d37 that HTCondor will stay special because of the quoting. At least for the environment variable part (see that commit) you can't generalize this to all Cluster classes.
There was a problem hiding this comment.
Oh yeah, special quoting problem. So this confirm we need to keep some specific test for HTCondor.
If you feel like adding a more general test for every queueing system (without export statement 😀), please do.
"export" is preserved now
7188fc7 to
f678d37
Compare
|
I would put it under the examples section here. |
|
For the docs, reading your comments, I would recommend three places (and put some doc in at least the first one or the last one):
You could add a generic explanation of
In the docstring, I would put only a simple example, witthout the explanation. I'm not sure this is mandatory to put an example with The 3rd place I was thinking about is the Example Deployments section. |
- example in the docstring - description in "example deployments"" - description in "advanced tops an tricks"
|
@mivade , @guillaumeeb : |
guillaumeeb
left a comment
There was a problem hiding this comment.
Congratulations, this is really neat!
I've just got one minor final request. Your doc is perfect, but I don't like duplications. Could you just remove the contentvin examples.rst? The way you described things, it's perfect in advanced tips!
|
@jolange this looks great, thanks! I agree with @guillaumeeb's suggestion that it's fine to only have the lengthier discussion in one place but language wise it's good. |
|
@guillaumeeb , @mivade ok, I removed the part from examples.rst. |
guillaumeeb
left a comment
There was a problem hiding this comment.
LGTM! And yes, we squash on merge, I'll merge this right now.
* fix behaviour of `env_extra` for HTCondor Before only environment variables were considered using HTCondor's `Environment =` feature, whereas the parameter description generally says "Other commands to add". If the `Environment =` is needed, one can still use the generic `job_extra` parameter to set it. fixes dask#393 related to dask#323 dask#556 * adapt htcondor tests for new `env_extra` behaviour * adapt htcondor tests for new `env_extra` behaviour "export" is preserved now * docs: made "Moab Deployments" heading the same level as the others * docs: added description of HTCondorCluster + env_extra - example in the docstring - description in "example deployments"" - description in "advanced tops an tricks" * docs: removed the HTCondorCluster section from examples * formatting according to black and flake8
…ob scripts (#560) * Use `--nworkers` in stead of deprecated `--nprocs` in the generated job scripts Fix #559. * Update the requirements for dask and distributed This is needed to support the `--nworkers` option. * Fix behaviour of `env_extra` for HTCondor (#563) * fix behaviour of `env_extra` for HTCondor Before only environment variables were considered using HTCondor's `Environment =` feature, whereas the parameter description generally says "Other commands to add". If the `Environment =` is needed, one can still use the generic `job_extra` parameter to set it. fixes #393 related to #323 #556 * adapt htcondor tests for new `env_extra` behaviour * adapt htcondor tests for new `env_extra` behaviour "export" is preserved now * docs: made "Moab Deployments" heading the same level as the others * docs: added description of HTCondorCluster + env_extra - example in the docstring - description in "example deployments"" - description in "advanced tops an tricks" * docs: removed the HTCondorCluster section from examples * formatting according to black and flake8 * Drop Python 3.7 (#562) * Drop Python 3.7 * Fix cleanup fixture probem (see fistributed#9137) * Override cleanup distributed fixture, and reconfigure dask-jobqueue when called * Use power of 2 for the memory checks in tests (see dask#7484) * Apply Black * Apply correct version of black... * conda install Python in HTCondor Docker image * Fix HTCondor Dockerfile * Fix PBS Issue * Add a timeout for every wait_for_workers call * Fix HTCondor tests, leave room for scheduling cycle to take place for HTCondor * flake check * debugging HTCondor tests on CI * Flake * reduce negotiator interval for faster job queuing, more debugging logs * move condor command at the right place * always run cleanup step, and print more things on HTCondor * Clean temporary debug and other not necessary modifications * Disable HTCondor CI for now * Import loop_in_thread fixture from distributed * Override method from distributed to make tests pass Co-authored-by: Johannes Lange <[email protected]> Co-authored-by: Guillaume Eynard-Bontemps <[email protected]>
Before only environment variables were considered using HTCondor's
Environment =feature, whereas the parameter description generally says "Other commands to add".If the
Environment =feature is needed for some reason, one can still use the genericjob_extraparameter to set it.Example:
results in this
fixes #393
related to #323 #556