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

オープン
#4,102 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
5.3k
フォーク
377
平均マージ
13時間 49分
マージ済み PR(30日)
650

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

callstack/agent-device のほかの issue

callstack/agent-device の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。