Interface EphemeralAgentsLaunchRequestRegistry
- All Known Implementing Classes:
EphemeralAgentsLaunchRequestRegistryImpl
@Internal
public interface EphemeralAgentsLaunchRequestRegistry
Bean that keeps track of k8s that have to be launched.
-
Method Summary
Modifier and TypeMethodDescription@NotNull Pair<List<EphemeralAgentLaunchRequest>,
Integer> findEphemeralAgentsToLaunch
(int numberOfExtraReservedSlots) Find unhandled launch requests.void
launchOrDefer
(@NotNull EphemeralAgentLaunchRequest ephemeralAgentLaunchRequest) Register a new k8s pod launch request for a job/deployment.void
markRequestFailed
(@NotNull ResultKey resultKey) Mark launch as failed so that it can be retried later.void
Remove launch requests after it's either handled (agent picked up the job) or job is cancelled and removed from the build queue.boolean
requestForKeyExists
(ResultKey typedResultKey)
-
Method Details
-
launchOrDefer
Register a new k8s pod launch request for a job/deployment.- Parameters:
ephemeralAgentLaunchRequest
-
-
findEphemeralAgentsToLaunch
@NotNull @NotNull Pair<List<EphemeralAgentLaunchRequest>,Integer> findEphemeralAgentsToLaunch(int numberOfExtraReservedSlots) Find unhandled launch requests.- Returns:
- list of launch requests to be handled and a total number of launch requests in progress, including the new ones.
-
remove
Remove launch requests after it's either handled (agent picked up the job) or job is cancelled and removed from the build queue. -
markRequestFailed
Mark launch as failed so that it can be retried later. -
requestForKeyExists
- Returns:
- true iff launch request has been registered for the
ResultKey
-