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

Prevent sub-orchestrations from using the instance ID of the parent #765

Merged
merged 2 commits into from
May 29, 2019

Conversation

cgillum
Copy link
Member

@cgillum cgillum commented May 16, 2019

Resolves #747

@cgillum cgillum added this to the v1.8.2 milestone May 16, 2019
@cgillum cgillum requested a review from ConnorMcMahon May 16, 2019 14:35
// check. We cannot easily check the full hierarchy, so we just look at the current orchestration
// and the immediate parent.
if (string.Equals(instanceId, this.InstanceId, StringComparison.OrdinalIgnoreCase) ||
(this.ParentInstanceId != null && string.Equals(instanceId, this.ParentInstanceId, StringComparison.OrdinalIgnoreCase)))
Copy link
Contributor

Choose a reason for hiding this comment

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

Adding a check that the ParentInstanceId is not null prevents the exception from firing in the scenario where an orchestration without a parent (i.e. a top level orchestration) calls a suborchestration without a specified instance id.

Copy link
Contributor

@ConnorMcMahon ConnorMcMahon left a comment

Choose a reason for hiding this comment

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

I think it looks good with the changes I made that fixed the tests. I also added a test.

@cgillum cgillum merged commit e117d0d into dev May 29, 2019
@cgillum cgillum deleted the fix747 branch May 29, 2019 22:18
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.

Throw exception when starting sub-orchestrator with instance ID of the parent
2 participants