AlwaysOnWarmRunner Construct
Warm runners that run 24/7. Fills at midnight UTC and each runner stays alive for 24 hours.
Runners will be provisioned using the specified provider and registered in the specified repository or organization.
Registration level must match the one selected during setup.
Limitations
- Jobs will still trigger provisioning of on-demand runners, even if a warm runner ends up being used.
- You may briefly see more than
countrunners when changing config or at rotation. - To remove: set
countto 0, deploy, wait for warm runners to stop, then remove and deploy again. If you don't follow this procedure, warm runners may linger until they expire. - Provider failures or timeouts (like Lambda provider timing out after 15 minutes) will result in a gap in coverage until the retry succeeds. Current retry mechanism has built-in back-off rate and can be tweaked using
retryOptions. This will be improved in the future.
new AlwaysOnWarmRunner(stack, 'AlwaysOnLinux', {
runners,
provider: myProvider,
count: 3,
owner: 'my-org',
repo: 'my-repo',
});AlwaysOnWarmRunner(stack, "AlwaysOnLinux",
runners=runners,
provider=my_provider,
count=3,
owner="my-org",
repo="my-repo"
)AlwaysOnWarmRunner.Builder.create(stack, "AlwaysOnLinux")
.runners(runners)
.provider(myProvider)
.count(3)
.owner("my-org")
.repo("my-repo")
.build();new AlwaysOnWarmRunner(stack, "AlwaysOnLinux", new Struct {
Runners = runners,
Provider = myProvider,
Count = 3,
Owner = "my-org",
Repo = "my-repo"
});NewAlwaysOnWarmRunner(stack, jsii.String("AlwaysOnLinux"), map[string]interface{}{
"runners": runners,
"provider": myProvider,
"count": jsii.Number(3),
"owner": jsii.String("my-org"),
"repo": jsii.String("my-repo"),
})See: Setup GitHub
Initializer
import { AlwaysOnWarmRunner } from '@cloudsnorkel/cdk-github-runners'
new AlwaysOnWarmRunner(scope: Construct, id: string, props: AlwaysOnWarmRunnerProps)scope:Constructid:stringprops:AlwaysOnWarmRunnerProps
import cloudsnorkel.cdk_github_runners
cloudsnorkel.cdk_github_runners.AlwaysOnWarmRunner(
scope: Construct,
id: str,
count: typing.Union[int, float],
owner: str,
provider: IRunnerProvider | ICompositeProvider,
runners: GitHubRunners,
registration_level: str = None,
repo: str = None
)scope:Constructid:strcount:typing.Union[int, float]Number of warm runners to maintain.
owner:strGitHub owner where runners will be registered (org or user login).
provider:IRunnerProvider | ICompositeProviderProvider to use.
Warm runners bypass the provider selector — they always use this provider, regardless of job characteristics. Labels cannot be modified.
runners:GitHubRunnersThe
GitHubRunnersconstruct that owns the shared warm runner infrastructure.registration_level?:strRegistration level — must match how your runners are set up in GitHub.
Choose 'org' for org-wide runners, 'repo' for repo-level. See the setup wizard for choosing repo vs org.
Default: 'repo'
repo?:strRepository name (without owner) where runners will be registered.
Required when
registrationLevelis 'repo'.
import com.cloudsnorkel.cdk.github.runners.AlwaysOnWarmRunner;
AlwaysOnWarmRunner.Builder.create(Construct scope, java.lang.String id)
.count(java.lang.Number)
.owner(java.lang.String)
.provider(IRunnerProvider|ICompositeProvider)
.runners(GitHubRunners)
// .registrationLevel(java.lang.String)
// .repo(java.lang.String)
.build();scope:Constructid:java.lang.Stringcount:java.lang.NumberNumber of warm runners to maintain.
owner:java.lang.StringGitHub owner where runners will be registered (org or user login).
provider:IRunnerProvider|ICompositeProviderProvider to use.
Warm runners bypass the provider selector — they always use this provider, regardless of job characteristics. Labels cannot be modified.
runners:GitHubRunnersThe
GitHubRunnersconstruct that owns the shared warm runner infrastructure.registrationLevel?:java.lang.StringRegistration level — must match how your runners are set up in GitHub.
Choose 'org' for org-wide runners, 'repo' for repo-level. See the setup wizard for choosing repo vs org.
Default: 'repo'
repo?:java.lang.StringRepository name (without owner) where runners will be registered.
Required when
registrationLevelis 'repo'.
using CloudSnorkel;
new AlwaysOnWarmRunner(Construct Scope, string Id, AlwaysOnWarmRunnerProps Props);Scope:ConstructId:stringProps:AlwaysOnWarmRunnerProps
import "github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners"
cloudsnorkelcdkgithubrunners.NewAlwaysOnWarmRunner(scope Construct, id *string, props AlwaysOnWarmRunnerProps) AlwaysOnWarmRunnerscope:Constructid:*stringprops:AlwaysOnWarmRunnerProps
Methods
toString()to_string()toString()ToString()ToString()
Returns a string representation of this construct.
public toString(): stringdef to_string() -> strpublic java.lang.String toString()private string ToString()func ToString() *stringwith()with()with()With()With()
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.
public with(mixins: ...IMixin[]): IConstructmixins:...IMixin[]The mixins to apply.
def with(
mixins: *IMixin
) -> IConstructmixins:*IMixinThe mixins to apply.
public IConstruct with(IMixin... mixins)mixins:IMixin...The mixins to apply.
private IConstruct With(params IMixin[] Mixins)Mixins:params IMixin[]The mixins to apply.
func With(mixins ...IMixin) IConstructmixins:...IMixinThe mixins to apply.
Static Functions
isConstruct()is_construct()isConstruct()IsConstruct()IsConstruct()
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.
import { AlwaysOnWarmRunner } from '@cloudsnorkel/cdk-github-runners'
AlwaysOnWarmRunner.isConstruct(x: any)x:anyAny object.
import cloudsnorkel.cdk_github_runners
cloudsnorkel.cdk_github_runners.AlwaysOnWarmRunner.is_construct(
x: typing.Any
)x:typing.AnyAny object.
import com.cloudsnorkel.cdk.github.runners.AlwaysOnWarmRunner;
AlwaysOnWarmRunner.isConstruct(java.lang.Object x)x:java.lang.ObjectAny object.
using CloudSnorkel;
AlwaysOnWarmRunner.IsConstruct(object X);X:objectAny object.
import "github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners"
cloudsnorkelcdkgithubrunners.AlwaysOnWarmRunner_IsConstruct(x interface{}) *boolx:interface{}Any object.
Properties
nodenodenodeNodeNode
node: Node
node: Node
node: Node
Node: Node
Node: Node
The tree node.