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

schema: separate task and job mutations #3880

Closed

Conversation

oliver-sanders
Copy link
Member

@oliver-sanders oliver-sanders commented Oct 19, 2020

Separate task and job mutations in the schema.

  • This means you can now selectively kill/poll specific jobs by explicitly providing the submit number.
  • However, for regular use there is no interface change.
  • This allows the UI to perform mutations on jobs (e.g. right click on running job icon, select kill) (see mutations in the tree view cylc-ui#504).

At present there isn't much value to being able to specify a particular job submit number since it would be considered an error for two jobs to run at the same time.

Here's an example specifying the job submit num on the CLI:

$ # cylc kill <flow> '<namespace>.<point>#<job>'
$ cylc kill abc 'foo.1#1'

And here via GraphQL:

mutation () {
    kill ("abc", "foo.1#1") {
        result
    }
}

Obviously # isn't ideal for use on the CLI, we could consider something else, see also #3592.

Requirements check-list

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Appropriate tests are included (unit and/or functional).
  • Already covered by existing tests.
  • Does not need tests (why?).
  • Appropriate change log entry included.
  • No change log entry required (why? e.g. invisible to users).
  • (master branch) I have opened a documentation PR at cylc/cylc-doc/pull/XXXX.
  • (7.8.x branch) I have updated the documentation in this PR branch.
  • No documentation update required.
  • Created an issue at cylc-flow conda-forge repository with version changes (if you changed dependencies in setup.py, see recipe/meta.yaml).
  • No dependency changes.

@oliver-sanders oliver-sanders added the question Flag this as a question for the next Cylc project meeting. label Oct 19, 2020
@oliver-sanders oliver-sanders added this to the cylc-8.0a4 milestone Oct 19, 2020
@oliver-sanders oliver-sanders self-assigned this Oct 19, 2020
"""


class NamespaceJobGlob(String):
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 input type enables us to tell that this mutation works on jobs by flicking through the results of an introspection query.

)


def parse_reference(string):
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 replaces TaskPool._parse_task_item.

@oliver-sanders
Copy link
Member Author

Closing this now, will bring back in a new form with the universal identifier.

@oliver-sanders oliver-sanders removed the question Flag this as a question for the next Cylc project meeting. label Nov 12, 2020
@oliver-sanders oliver-sanders removed this from the cylc-8.0a4 milestone Nov 12, 2020
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.

1 participant