Interface EphemeralAgentsLaunchRequestRegistry
-
- All Known Implementing Classes:
EphemeralAgentsLaunchRequestRegistryImpl
@Internal public interface EphemeralAgentsLaunchRequestRegistry
Bean that keeps track of k8s that have to be launched.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @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(@NotNull ResultKey resultKey)
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 Detail
-
launchOrDefer
void launchOrDefer(@NotNull @NotNull EphemeralAgentLaunchRequest ephemeralAgentLaunchRequest)
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
void remove(@NotNull @NotNull ResultKey resultKey)
Remove launch requests after it's either handled (agent picked up the job) or job is cancelled and removed from the build queue.
-
markRequestFailed
void markRequestFailed(@NotNull @NotNull ResultKey resultKey)
Mark launch as failed so that it can be retried later.
-
-