Skip to content

Fixed wonky execution issues#4674

Merged
sharadkjaiswal merged 1 commit intoDynamoDS:masterfrom
benglin:MAGN7575
Jun 10, 2015
Merged

Fixed wonky execution issues#4674
sharadkjaiswal merged 1 commit intoDynamoDS:masterfrom
benglin:MAGN7575

Conversation

@benglin
Copy link
Contributor

@benglin benglin commented Jun 10, 2015

Purpose

This pull request is meant to fix multiple wonky Dynamo execution issues that have recently been reported. The crux of the issue lies with multiple execution requests have been dropped due to an incorrect condition that guards against further execution in HomeWorkspaceModel.Run. Take for example the following graph:

update-0

When the code block node is updated from x to 9, the following calls take place in sequence (they indirectly invoke HomeWorkspaceModel.Run method):

  1. Dynamo.Nodes.CodeBlockNodeModel.SaveAndDeleteConnectors(...)
  2. Dynamo.Nodes.CodeBlockNodeModel.LoadAndCreateConnectors(...)
  3. Dynamo.Nodes.CodeBlockNodeModel.SetCodeContent(...)

Since step 1 sets RunSettings.RunEnabled = false, subsequently steps 2 and 3 do not result in UpdateGraphAsyncTask being scheduled (even though HomeWorkspaceModel.Run is called, it returns prematurely). Step 3 is crucial because it ultimately generates AST node with the right value for execution, without that, downstream node executes with wrong input:

update-1

The same sequence of events take place when code block node is then updated to 5, except the fact that downstream node no longer get any input (which turned it into a partially applied _SingleFunctionObject):

update-2

Declarations

Check these if you believe they are true

  • The code base is in a better state after this PR
  • The level of testing this PR includes is appropriate

Reviewers

Hi @sharadkjaiswal, as discussed, please have a look.

FYIs

Hi @lukechurch, @ikeough, @Randy-Ma feel free to comment on this. If the review is completed earlier, I will merge this in for wider testing.

Hi @monikaprabhu, this pull request effectively reverts the code changes in another pull request. For that, I have verified the fix for MAGN-7251 remained fixed (since selection nodes get disabled when Revit document changes), but please perform more thorough tests on relevant scenarios. Thanks!

@benglin benglin added the PTAL Please Take A Look 👀 label Jun 10, 2015
@sharadkjaiswal sharadkjaiswal added LGTM and removed PTAL Please Take A Look 👀 labels Jun 10, 2015
sharadkjaiswal added a commit that referenced this pull request Jun 10, 2015
Fixed wonky execution issues
@sharadkjaiswal sharadkjaiswal merged commit 5753f2b into DynamoDS:master Jun 10, 2015
@sharadkjaiswal
Copy link
Contributor

Thanks @benglin, please merge it to RC0.8.1_master branch.

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.

2 participants