Run Service: Only add StepResult for Tasks, not the Job itself #2620
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an attempt to remove an extra Job Step that is coming through to the Run Service
/completejob
endpoint:In a codespace, this does correct the issue:
I don't think how I got the tests to 🟢 is really correct. With this code change
ec.Global.StepsResult.Count
is stuck at 0 in the test case. I think I somehow need to ensure that the Job being run by the test case has a step, and I don't think theembeddedStep
is doing that correctly? Looking for advice on how to wire it up.Additionally, I wonder if instead of moving the code inside a the
if (_record.RecordType == "Task")
conditional, it could just go inside theif (Root != this)
which is right underneath?