Add SDK types and results plumbing for background step control - #4472
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces SDK-layer models and contract plumbing to represent and report “background steps” and background step control operations (wait / wait-all / cancel) across pipeline steps, timeline records, and results-service communications.
Changes:
- Adds a new pipeline step type (
BackgroundStepControl) and extendsActionStepwith aBackgroundflag; movesParallelGroupIdonto theJobStepbase type. - Extends
TimelineRecordwith background-related fields and wires them into step conversion for results reporting. - Updates results-service contracts (
Step,StepResult) to carry background/background-control metadata.
Show a summary per file
| File | Description |
|---|---|
| src/Sdk/WebApi/WebApi/ResultsHttpClient.cs | Maps new TimelineRecord background fields into results-service Step payloads. |
| src/Sdk/WebApi/WebApi/Contracts.cs | Extends results-service Step contract with background/background-control fields. |
| src/Sdk/RSWebApi/Contracts/StepResult.cs | Adds background/background-control fields to step result contract. |
| src/Sdk/DTWebApi/WebApi/TimelineRecord.cs | Adds background/background-control fields and clone support to TimelineRecord. |
| src/Sdk/DTPipelines/Pipelines/StepConverter.cs | Enables JSON deserialization of the new BackgroundStepControl step type. |
| src/Sdk/DTPipelines/Pipelines/Step.cs | Registers BackgroundStepControl as a known step type and adds enum value. |
| src/Sdk/DTPipelines/Pipelines/JobStep.cs | Introduces ParallelGroupId on the shared job-step base class. |
| src/Sdk/DTPipelines/Pipelines/BackgroundStepControl.cs | Introduces the new background control step model and wire constants. |
| src/Sdk/DTPipelines/Pipelines/ActionStep.cs | Adds Background flag and ensures cloning preserves it. |
Copilot's findings
- Files reviewed: 9/9 changed files
- Comments generated: 6
Comment on lines
+184
to
+189
| [DataMember(EmitDefaultValue = false)] | ||
| [JsonProperty("backgroundControlType")] | ||
| public string BackgroundControlType; | ||
| [DataMember(EmitDefaultValue = false)] | ||
| [JsonProperty("backgroundControlStepIds")] | ||
| public string[] BackgroundControlStepIds; |
Comment on lines
+190
to
+192
| [DataMember(EmitDefaultValue = false)] | ||
| [JsonProperty("parallelGroupId")] | ||
| public string ParallelGroupId; |
Comment on lines
+43
to
+47
| [JsonProperty("controlType")] | ||
| public string ControlType { get; set; } | ||
|
|
||
| [JsonProperty("stepIds")] | ||
| public string[] StepIds { get; set; } |
| this.AgentPlatform = recordToBeCloned.AgentPlatform; | ||
| this.IsBackground = recordToBeCloned.IsBackground; | ||
| this.BackgroundControlType = recordToBeCloned.BackgroundControlType; | ||
| this.BackgroundControlStepIds = recordToBeCloned.BackgroundControlStepIds; |
| break; | ||
| } | ||
|
|
||
| using (var objectReader = value.CreateReader()) |
Comment on lines
+296
to
+300
| [DataMember(Order = 140, EmitDefaultValue = false)] | ||
| public bool IsBackground | ||
| { | ||
| get; | ||
| set; |
TingluoHuang
reviewed
Jun 3, 2026
TingluoHuang
approved these changes
Jun 3, 2026
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Add SDK types and results plumbing for background step control
This PR adds the SDK-layer types and results service wiring needed for background steps
SDK step models
BackgroundStepControlpipeline type withControlType,StepIds, andBackgroundControlTypesconstants (wait,wait-all,cancel)ParallelGroupIdtoJobStepbase class (shared byActionStepandBackgroundStepControl)Backgroundproperty toActionStepTimeline & results plumbing
TimelineRecordwithIsBackground,BackgroundControlType,BackgroundControlStepIds, andParallelGroupIdResultsHttpClient.ConvertTimelineRecordToStepStepResultandStepcontracts for results service communicationRelated