Skip to content

Add SDK types and results plumbing for background step control - #4472

Merged
lokesh755 merged 2 commits into
mainfrom
lokesh755-sdk-changes-background-steps
Jun 3, 2026
Merged

Add SDK types and results plumbing for background step control#4472
lokesh755 merged 2 commits into
mainfrom
lokesh755-sdk-changes-background-steps

Conversation

@lokesh755

Copy link
Copy Markdown
Contributor

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

  • Add BackgroundStepControl pipeline type with ControlType, StepIds, and BackgroundControlTypes constants (wait, wait-all, cancel)
  • Move ParallelGroupId to JobStep base class (shared by ActionStep and BackgroundStepControl)
  • Add Background property to ActionStep

Timeline & results plumbing

  • Extend TimelineRecord with IsBackground, BackgroundControlType, BackgroundControlStepIds, and ParallelGroupId
  • Wire new fields through ResultsHttpClient.ConvertTimelineRecordToStep
  • Add matching fields to StepResult and Step contracts for results service communication

Related

  • github/actions-runtime#5420
  • github/actions-runtime#5421

@lokesh755
lokesh755 requested a review from a team as a code owner June 3, 2026 21:41
Copilot AI review requested due to automatic review settings June 3, 2026 21:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 extends ActionStep with a Background flag; moves ParallelGroupId onto the JobStep base type.
  • Extends TimelineRecord with 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;
Comment thread src/Sdk/WebApi/WebApi/Contracts.cs Outdated
Comment thread src/Sdk/DTPipelines/Pipelines/BackgroundStepControl.cs Outdated
@lokesh755
lokesh755 merged commit 5053d17 into main Jun 3, 2026
12 checks passed
@lokesh755
lokesh755 deleted the lokesh755-sdk-changes-background-steps branch June 3, 2026 22:14
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.

3 participants