refactor(providers): share one lease table across cloud device providers

Abierto
#4,102 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript
Área
backend

Línea de trabajo

Start by reading the lease bookkeeping in provider-limrun and the review findings in #4092 to understand the existing rules. Extract the shared lease table, migrate limrun without behavior changes, then move provider-revyl to it and remove duplicate bookkeeping. Run the relevant provider tests; done means both providers share the table and the typed cleanup-pending outcome is used when a stop is unconfirmed.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

in-progress

provider-limrun and the new provider-revyl (#4092) each keep their own lease state: allocate once per lease, track in-flight allocations, release only after the provider confirmed the stop, drain on shutdown, bound work by the caller's deadline, and recover expired leases. Each provider re-implements these rules, so each one can get a different rule wrong. In #4092, most review findings were about this bookkeeping, not about Revyl itself.

Proposal: extract one provider lease table that owns these rules, with a typed provider-cleanup-pending outcome when a stop is not confirmed. A provider would supply only start, stop by lease, find by lease, and its interactor.

Order:

  1. Extract the table from provider-limrun and migrate limrun onto it with no behavior change.
  2. Move provider-revyl onto the same table.
  3. Delete the per-provider lease bookkeeping.

Decided on #4092: Revyl lands first, and this refactor follows.

Lenguaje dominante
TypeScript
Estrellas
5.3k
Forks
377
Merge medio
13 h 49 min
PR fusionados (30 d)
650

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de callstack/agent-device

Todos los issues de callstack/agent-device

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.