Change design of tasks
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 20/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 領域
- api, backend, backend-api-design
調査の方向性
まず既存のタスクモデルと DeploymentTaskSerializer を確認し、次に AppPlugin インターフェースとデプロイ設定の処理を追跡します。Issue にはファイルやテストの指定がありません。実装を開始する前に、パラメーター化されたタスク、設定の監査、CRUD のみを行うプラグインの動作について合意された設計が必要になります。
索引モデルが issue の本文から書いたものです。
説明
Currently, our tasks are modelled as an enum of simple tasks (e.g. LAUNCH, RESTART, HEALTH_CHECK), and do not have any parameterization, other than initial parameterization when creating a deployment. That is, tasks can return a result (status, result, traceback), but cannot be parameterized with a config. This means that we have a hard time modelling actions like configuration changes, or even tracking what the configuration changes are.
Instead, we could possibly allow tasks to be parameterized by a config, with the deployment tracking the final, most up-to-date config.
e.g.
class DeploymentTaskSerializer(serializers.ModelSerializer):
celery_id = serializers.CharField(read_only=True)
action = serializers.CharField() # an arbitrary app defined string
parameters = serializers.StoredJSONField() # arbitrary parameters for executing tasks
status = serializers.CharField(read_only=True)
result = serializers.DictField(read_only=True)
traceback = serializers.CharField(read_only=True)
When modelled this way, the deployment will only contain a final, cached config reflecting the latest state. Any changes to the config must be done through tasks, and each task records what its parameters are. This gives us the ability to track/audit each configuration change, from LAUNCH to DELETE. (essentially, the command pattern)
In addition, the AppPlugin interface also becomes simpler. It will only contain CRUD methods (no special purpose methods like restart, health_check etc). Performing a restart will be a new task that perform an AppPlugin.update(), parameterised by the task name/config. Appliances can freely implement the update method as they see fit.
Not a priority for now, but something we can implement in future?
@afgane @machristie Thoughts?
- 主要言語
- Python
- スター
- 42
- フォーク
- 36
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
galaxyproject/cloudlaunch のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
galaxyproject/cloudlaunch#266 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
galaxyproject/cloudlaunch#259 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
galaxyproject/cloudlaunch#258 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
galaxyproject/cloudlaunch#251 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
galaxyproject/cloudlaunch#242 · コメント 8 件 ·
galaxyproject/cloudlaunch の issue をすべて見る
似ている issue
-
debt
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/vscode-flake8#601 ·
メンテナーはふだん 1 日以内に返信
-
nonews refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Uninett/nav#4255 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 3 日以内に返信
-
namespace operations
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
EclipseFdn/open-vsx.org#14421 ·
メンテナーはふだん 1 日以内に返信
-
untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ubuntu/ubuntu-project-docs#850 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信