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

Allow explicit configuration of handlers for workflow scheduling. #3844

Merged
merged 2 commits into from
Apr 13, 2017

Conversation

jmchilton
Copy link
Member

Currently every job handler is a workflow scheduler handler and vice versa. This (in particular bb1bb67) allow specifying a separate (or potentially overlapping) pool of workflow schedulers. Includes lots of testing for figuring out if the current process is a workflow handler and for determining what handler should be assigned for queued workflows.

Builds on the testing from #3820 so it includes that PR and a merge forward of everything into dev.

A long discussion of how this may potentially improve performance, robustness, and quality of logs for workflow scheduling can be found as part of #3816 (comment).

@jmchilton
Copy link
Member Author

Ping @natefoo 🙏

@nsoranzo
Copy link
Member

nsoranzo commented Apr 7, 2017

👍 to the use of _single_leading_underscore for internal methods.

@nsoranzo nsoranzo self-requested a review April 7, 2017 18:38
Copy link
Member

@nsoranzo nsoranzo left a comment

Choose a reason for hiding this comment

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

I guess this needs a sample config file and/or some admin documentation?

# Parse handlers
if config_element is not None:
for handler in self._findall_with_required(config_element, 'handler'):
id = handler.get('id')
Copy link
Member

Choose a reason for hiding this comment

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

I'll put here my usual complain about the reserved word id used as a variable name ;)

Copy link
Member Author

Choose a reason for hiding this comment

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

This code was refactored out of jobs/init.py that had the same problem but I'll definitely change it - good catch.

@@ -330,6 +313,12 @@ def __parse_job_conf_xml(self, tree):

log.debug('Done loading job configuration')

def _parse_handler(self, handler_element):
for plugin in handler_element.findall('plugin'):
if id not in self.handler_runner_plugins:
Copy link
Member

Choose a reason for hiding this comment

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

id (again bad variable name...) is not defined in this method, should be passed as parameter!

Copy link
Member Author

Choose a reason for hiding this comment

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

😱 So we would seem to have no test coverage in any of our tests for that. Thanks for the catch 🦅👀!

def _parse_handler(self, handler_def):
pass

def _get_default(self, app, parent, names):
Copy link
Member

Choose a reason for hiding this comment

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

You may want to pass config instead of app here, since that's the only part that's used, but not a showstopper.

Copy link
Member Author

Choose a reason for hiding this comment

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

I like that change for sure - I'll make it.

@jmchilton
Copy link
Member Author

I guess this needs a sample config file and/or some admin documentation?

I was hoping to follow this up quickly with a switch to YAML - I don't want to write or encourage others to edit more XML.

If you insist on documentation, I'm going to rework the configuration files and add it to this PR - but this PR will be less focused as a result.

@bgruening
Copy link
Member

Nice idea! Looking forward to use this. Would be great if you can add some docs in a follow up PR to also use different hosts for wf-scheduling.

@bgruening bgruening merged commit 040635d into galaxyproject:dev Apr 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants