Change design of tasks
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 20/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- api, backend, backend-api-design
Hướng nghiên cứu
Bắt đầu bằng cách xem xét mô hình task hiện có và DeploymentTaskSerializer, sau đó theo dõi interface AppPlugin và cách xử lý cấu hình deployment. Issue không nêu tên file hoặc test nào; cần thống nhất một thiết kế cho các task có tham số, việc kiểm tra cấu hình và hành vi của plugin chỉ thực hiện CRUD trước khi có thể bắt đầu triển khai.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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?
- Ngôn ngữ chính
- Python
- Star
- 42
- Fork
- 36
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của galaxyproject/cloudlaunch
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
galaxyproject/cloudlaunch#266 ·
-
Failed to Delete ApplianceĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
galaxyproject/cloudlaunch#259 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
galaxyproject/cloudlaunch#258 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
galaxyproject/cloudlaunch#251 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
galaxyproject/cloudlaunch#242 · 8 bình luận ·
Tất cả issue của galaxyproject/cloudlaunch
Issue tương tự
-
parse names a key after a top-level multi() threshold Bitcoin Core v31.1 refuses as not validĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
btclib-org/btclib-wallet#587 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Judgment-Pack/judgment-pack-spec#275 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-generated
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue priority: low size: XS
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 92/100
yeongseon/azure-functions-doctor-python#651 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Changaco/python-libarchive-c#146 ·