-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Workflow convergence #2389
Workflow convergence #2389
Changes from all commits
f5c10f9
a9365a3
447dfbb
779e1a3
ad56a27
cc374ca
3506b9a
ebabec0
1a064bd
ff6db37
b4fc585
77661c6
914892c
9bf2a49
6ef6b64
ea29e66
2742b00
475c90f
02df0c2
4111e53
1e10d43
87d6253
29b4979
7b22d1b
dfccc9e
9afc38b
2f9dc4d
6e40e9c
f8c53f4
584b3f4
17b3996
1120f8b
07db7a4
7b95d21
61fb3eb
05f4d94
e1e8d3b
b84fc3b
9f3e272
16a6041
3dadeb3
700860e
0499d41
3f4d14e
a176a4b
8bb9cfd
1b87e11
b81d795
ae0d0db
6529c1b
a6e20ee
266831e
4a6a3b2
d6a8ad0
c1171fe
1a85fcd
281345d
72263c5
00d71ce
676c068
5b459e3
f30f52a
d1aa52a
4c9a1d6
3c510e6
cfa0984
7b087d4
a804c85
623cf54
56885a5
febf051
0c8dde9
4c14727
1cfcaa7
28a4bbb
2eeca3c
d8bf82a
f8f2e00
228e412
625c6c3
1477bba
54d56f2
ed40ba6
38dc0b8
343639d
762c882
3762ba7
7b4521f
65ec1d1
d5f07a9
bfa361c
3975a2e
62a1f10
7bad01e
6fc2ba3
55dc27f
10de5b6
17cc82d
51669c9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.11 on 2018-09-28 14:23 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('main', '0053_v340_workflow_inventory'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='workflowjobnode', | ||
name='do_not_run', | ||
field=models.BooleanField(default=False, help_text='Indidcates that a job will not be created when True. Workflow runtime semantics will mark this True if the node is in a path that will decidedly not be ran. A value of False means the node may not run.'), | ||
), | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,7 +82,7 @@ def get_parent_nodes(self): | |
success_parents = getattr(self, '%ss_success' % self.__class__.__name__.lower()).all() | ||
failure_parents = getattr(self, '%ss_failure' % self.__class__.__name__.lower()).all() | ||
always_parents = getattr(self, '%ss_always' % self.__class__.__name__.lower()).all() | ||
return success_parents | failure_parents | always_parents | ||
return (success_parents | failure_parents | always_parents).order_by('id') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. iiiinteresting, it surprises me that this works with this syntax, but why not? I guess this is what enforces the parental ordering that we've mentioned several times. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. boolean logic operations on querysets always produce a new queryset object. |
||
|
||
@classmethod | ||
def _get_workflow_job_field_names(cls): | ||
|
@@ -184,6 +184,12 @@ class WorkflowJobNode(WorkflowNodeBase): | |
default={}, | ||
editable=False, | ||
) | ||
do_not_run = models.BooleanField( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's worth having a description on this field at least to outline that it is part of the workflow execution resolution graph and the the information here should outline its meaning on said graph. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this conversation is resolved by the |
||
default=False, | ||
help_text=_("Indidcates that a job will not be created when True. Workflow runtime " | ||
"semantics will mark this True if the node is in a path that will " | ||
"decidedly not be ran. A value of False means the node may not run."), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I hate to be making suggestions at this point but
"A value of False means this node may or may not run."? Perhaps it would be best to delete that sentence. I don't think we need it. |
||
) | ||
|
||
def get_absolute_url(self, request=None): | ||
return reverse('api:workflow_job_node_detail', kwargs={'pk': self.pk}, request=request) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this worth exposing in the API, or is it an internal field we only care about in the context of the task scheduler graph? I wonder if API users will know (or care) what this is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's worth showing to clients, because it's fundamentally core to how our form of convergence works. I can picture the questions now "the first node was successful, but the next node refuses to start!", okay, well it's waiting for the other branch to converge. You know if the branch is finished if there is a finished job or the DNR flag is true. Otherwise, what do you tell them?
That said, this needs help text. The help text should be added in the field on the model.