Awx: Convergence setting could allow for faster progression through workflows

Created on 12 May 2020  路  7Comments  路  Source: ansible/awx

ISSUE TYPE
  • Bug Report
SUMMARY

The ANY/ALL convergence setting doesn't change the behavior of approval nodes

STEPS TO REPRODUCE
  • create a workflow that has successful job templates feeding into an approval node:
    Screenshot from 2020-05-12 10-04-55
  • create a second workflow much like the first, but change the convergence value of the approval node to ALL:
    Screenshot from 2020-05-12 10-04-21
  • run both workflows
EXPECTED RESULTS
  • The behavior of the two workflows at runtime should be different.
  • The first workflow should create the approval notification as soon as one of the leading jobs finishes.
  • The second workflow should create the approval notification once _all_ of the leading jobs finish.
ACTUAL RESULTS
  • The behavior of the two workflows at runtime is identical. For both workflows, the approval notification is created only when all leading jobs finish.
api low enhancement

All 7 comments

Some test cases we'll want to check:
EDIT: Some of these permutations may be wrong based on comments from @rebeccahhh. Whoever runs tests on these should double check that the premise is correct for each situation.

  • [ ] Ensure that ANY convergence does trigger when one of the jobs completes
  • [ ] Ensure that ANY convergence does not trigger if a converging node that would only progress on success actually fails
  • [ ] Ensure that ANY convergence does trigger when a second converging node succeeds, even if the first one failed
  • [ ] Ensure that ALL convergence does trigger when all the jobs complete with paths that correspond to their required path states (success paths only continue on success, etc.)
  • [ ] Ensure that if any of the convergence paths do not meet requirements on an ALL convergence node, that the node does not trigger.

Wait I think I disagree with the statement as soon as one of the leading jobs finishes.

the ANY/ALL changes the logic of whether all or at least one of the parent jobs has to trigger.

I guess what I'm trying to say is ANY/ALL setting should change IF the node should be triggered -- not "WHEN".

e.g. in both cases I believe it will wait until all possibly triggering parents completes

Like to get @chrismeyersfsu to think about that and see if I'm right

So this is actually expected behavior, _but_ we could consider changing this to an enhancement.

The basics of this is that we have _always_ waited for all the parent to finish, ANY/ALL just allows the node to control its run on the status outcomes of it's parents.
Also, just to clarify, an enhancement would apply to any ANY node in a workflow, not just approval nodes

The beginnings of the change needed to change the behavior can be found here: https://github.com/ansible/awx/compare/devel...jbradberry:any-nodes-start-early?expand=1

This isn't nearly as big a deal as I initially thought.. After talking about this with @rebeccahhh, she explained how the default behavior for convergence nodes is to _always_ wait for all prior jobs to finish. I had incorrectly thought the default behavior to be the opposite of this when I created the issue - sorry!

With all this in mind, doing this enhancement would actually make the behavior _less_ consistent (though as the new title for this issue points out, it would make the job runs progress faster under some circumstances :man_shrugging:)

I'm closing this based on team discussions. This would not be an asset to our existing workflow structure and I don't think it merits much further discussion on here.

Was this page helpful?
0 / 5 - 0 ratings