[meta] refactor scripts to stop importing scriptworker, start importing scriptworker_client
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
- 30/100
Hướng nghiên cứu
Bắt đầu bằng cách xác định các script import scriptworker và so sánh các điểm vào dòng lệnh của chúng với scriptworker_client. Đọc trang wiki Testing iscript và hướng dẫn về create_test_workdir để thực thi độc lập. Hoàn thành có nghĩa là các script không còn phụ thuộc vào các đối tượng ngữ cảnh của scriptworker, đồng thời vẫn giữ nguyên API dòng lệnh.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Part of the rationale of having scriptworker call a script from the commandline, rather than import a python module and call a function, was to make the script independent of scriptworker. In theory this would:
- let us upgrade scriptworker without affecting scripts, as long as that commandline api stayed consistent,
- allow us to test scripts standalone, rather than requiring the worker,
- allow for a mixture of languages and python versions
(3) is currently no longer an issue. We've standardized on python 3. However, we still have the option of supporting other languages, especially if some other team wants to start using scriptworkers.
(2) has been theoretical, and still has some issues with user friendliness and discoverability. The testing iscript wiki page shows it's possible to test a script without scriptworker, especially when using the create_test_workdir script from scriptworker to populate the work_dir with a known task's task.json and CoT upstreamArtifacts.
The main thing we're solving here is (1). Because many scripts import scriptworker, upgrading scriptworker may still break those scripts, even if the commandline api stays consistent. Let's import scriptworker_client instead.
Doing so isn't just a simple drop-in replacement, however. scriptworker_client removes the usage of context objects, so this may be a sizeable patch set per script. But once we do this, we'll once more be able to upgrade scriptworker without fear of breaking the script, and we will be able to make all script-related changes in this repo rather than across two repos. (And the vocal opponents to the context objects will be appeased. :)
- Ngôn ngữ chính
- Python
- Star
- 16
- Fork
- 38
- Merge trung bình
- 1 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 14
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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 mozilla-releng/scriptworker-scripts
-
Dependency Dashboard Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
treescript
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
mozilla-releng/scriptworker-scripts#1055 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
mozilla-releng/scriptworker-scripts#994 · 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
mozilla-releng/scriptworker-scripts#980 · 1 bình luận ·
Tất cả issue của mozilla-releng/scriptworker-scripts
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
stephrobert/dsoxlab#238 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
sublimehq/package_control#1780 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
nwg-piotr/nwg-displays#145 ·