2using System.Collections.Concurrent;
3using System.Collections.Generic;
5using System.Threading.Tasks;
7using Microsoft.Extensions.Logging;
27 ILogger<NoOpRemoteDeploymentManager> logger,
28 Api.Models.Instance metadata,
35 public override ValueTask
FailDeployment(Models.CompileJob compileJob,
string errorMessage, CancellationToken cancellationToken) => ValueTask.CompletedTask;
38 public override ValueTask<IReadOnlyCollection<TestMerge>>
RemoveMergedTestMerges(
IRepository repository, Models.RepositorySettings repositorySettings, Models.RevisionInformation revisionInformation, CancellationToken cancellationToken)
39 => ValueTask.FromResult<IReadOnlyCollection<TestMerge>>(Array.Empty<
TestMerge>());
43 => ValueTask.CompletedTask;
46 protected override ValueTask
ApplyDeploymentImpl(Models.CompileJob compileJob, CancellationToken cancellationToken) => ValueTask.CompletedTask;
50 Models.RepositorySettings repositorySettings,
51 string remoteRepositoryOwner,
52 string remoteRepositoryName,
55 CancellationToken cancellationToken)
56 => ValueTask.CompletedTask;
60 Models.RepositorySettings repositorySettings,
61 Models.CompileJob compileJob,
63 string remoteRepositoryOwner,
64 string remoteRepositoryName,
69 protected override ValueTask
MarkInactiveImpl(Models.CompileJob compileJob, CancellationToken cancellationToken) => ValueTask.CompletedTask;
72 protected override ValueTask
StageDeploymentImpl(Models.CompileJob compileJob, CancellationToken cancellationToken) => ValueTask.CompletedTask;
Base class for implementing IRemoteDeploymentManagers.
readonly ConcurrentDictionary< long, Action< bool > > activationCallbacks
A map of CompileJob Api.Models.EntityId.Ids to activation callback Action<T1>s.
No-op implementation of IRemoteDeploymentManager.
override ValueTask FailDeployment(Models.CompileJob compileJob, string errorMessage, CancellationToken cancellationToken)
Fail a deployment for a given compileJob .A ValueTask representing the running operation.
override ValueTask StageDeploymentImpl(Models.CompileJob compileJob, CancellationToken cancellationToken)
override ValueTask ApplyDeploymentImpl(Models.CompileJob compileJob, CancellationToken cancellationToken)
override ValueTask CommentOnTestMergeSource(Models.RepositorySettings repositorySettings, string remoteRepositoryOwner, string remoteRepositoryName, string comment, int testMergeNumber, CancellationToken cancellationToken)
override ValueTask MarkInactiveImpl(Models.CompileJob compileJob, CancellationToken cancellationToken)
NoOpRemoteDeploymentManager(ILogger< NoOpRemoteDeploymentManager > logger, Api.Models.Instance metadata, ConcurrentDictionary< long, Action< bool > > activationCallbacks)
Initializes a new instance of the NoOpRemoteDeploymentManager class.
override ValueTask< IReadOnlyCollection< TestMerge > > RemoveMergedTestMerges(IRepository repository, Models.RepositorySettings repositorySettings, Models.RevisionInformation revisionInformation, CancellationToken cancellationToken)
Get the updated list of TestMerges for an origin merge.A ValueTask<TResult> resulting in the IReadOnl...
override ValueTask StartDeployment(IGitRemoteInformation remoteInformation, Models.CompileJob compileJob, CancellationToken cancellationToken)
Start a deployment for a given compileJob .A ValueTask representing the running operation.
override string FormatTestMerge(Models.RepositorySettings repositorySettings, Models.CompileJob compileJob, TestMerge testMerge, string remoteRepositoryOwner, string remoteRepositoryName, bool updated)
Represents an on-disk git repository.