Interface EphemeralAgentsLaunchRequestRegistry

All Known Implementing Classes:
EphemeralAgentsLaunchRequestRegistryImpl

@Internal public interface EphemeralAgentsLaunchRequestRegistry
Bean that keeps track of k8s that have to be launched.
  • Method Details

    • 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.
    • requestForKeyExists

      boolean requestForKeyExists(ResultKey typedResultKey)
      Returns:
      true iff launch request has been registered for the ResultKey