ci-tools icon indicating copy to clipboard operation
ci-tools copied to clipboard

ci-operator: Enable ErrTypeNotFound on the lease client

Open danilo-gemoli opened this issue 2 weeks ago • 4 comments

As of today, when the boskos' client tries to acquire a lease, it doesn't distinguish between these two error cases:

  1. There are no leases available anymore.
  2. The lease type we are trying to acquire simply doesn't exist.

The previous cases are both handled with the same ErrNotFound and, as a consequence, the client keeps retrying to acquire a lease even when it doesn't make any sense (the type doesn't exist).

Furthermore, with the upcoming "intra-step leasing" feature, clients want to implement the "let's try to acquire a lease of type X, if it exists" behavior, which requires the boskos' client to be able to tell whether an error is ErrNotFound or ErrTypeNotFound.

danilo-gemoli avatar Jan 09 '26 14:01 danilo-gemoli