mirror of
https://github.com/actions/runner.git
synced 2026-01-23 13:01:14 +08:00
fix step insertion
This commit is contained in:
@@ -247,6 +247,24 @@ namespace GitHub.Runner.Worker.Dap
|
||||
/// <param name="checkpointIndex">The index of the checkpoint to restore</param>
|
||||
/// <param name="jobContext">The job execution context</param>
|
||||
void RestoreCheckpoint(int checkpointIndex, IExecutionContext jobContext);
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether a step was inserted "here" (before current step) while paused.
|
||||
/// When true, StepsRunner should skip current step execution and re-process from queue.
|
||||
/// </summary>
|
||||
bool HasStepInsertedHere { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Consumes the "step inserted here" flag (resets it to false).
|
||||
/// Called by StepsRunner after handling the insertion.
|
||||
/// </summary>
|
||||
void ConsumeStepInsertedHere();
|
||||
|
||||
/// <summary>
|
||||
/// Sets the "step inserted here" flag.
|
||||
/// Called by StepManipulator when --here insertion occurs.
|
||||
/// </summary>
|
||||
void SetStepInsertedHere();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -320,6 +338,9 @@ namespace GitHub.Runner.Worker.Dap
|
||||
// Job cancellation token for REPL commands and blocking waits
|
||||
private CancellationToken _jobCancellationToken;
|
||||
|
||||
// Flag for step inserted "here" (before current step)
|
||||
private bool _hasStepInsertedHere;
|
||||
|
||||
public bool IsActive => _state == DapSessionState.Ready || _state == DapSessionState.Paused || _state == DapSessionState.Running;
|
||||
|
||||
public DapSessionState State => _state;
|
||||
@@ -328,6 +349,18 @@ namespace GitHub.Runner.Worker.Dap
|
||||
|
||||
public bool HasPendingRestore => _pendingRestoreCheckpoint.HasValue;
|
||||
|
||||
public bool HasStepInsertedHere => _hasStepInsertedHere;
|
||||
|
||||
public void ConsumeStepInsertedHere()
|
||||
{
|
||||
_hasStepInsertedHere = false;
|
||||
}
|
||||
|
||||
public void SetStepInsertedHere()
|
||||
{
|
||||
_hasStepInsertedHere = true;
|
||||
}
|
||||
|
||||
public override void Initialize(IHostContext hostContext)
|
||||
{
|
||||
base.Initialize(hostContext);
|
||||
|
||||
Reference in New Issue
Block a user