Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Change design of tasks

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
20/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
django, python

調査の方向性

まず既存のタスクモデルと DeploymentTaskSerializer を確認し、次に AppPlugin インターフェースとデプロイ設定の処理を追跡します。Issue にはファイルやテストの指定がありません。実装を開始する前に、パラメーター化されたタスク、設定の監査、CRUD のみを行うプラグインの動作について合意された設計が必要になります。

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

説明

enhancement

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 ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

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

galaxyproject/cloudlaunch のほかの issue

galaxyproject/cloudlaunch の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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