Add CI jobs to act as a sanity check for PRs containing database migrations

Đang mở
#572 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
51/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
ci-cd, database

Hướng nghiên cứu

Start by reading the repository’s CI configuration and database migration files to see how migrations are named and run. Add checks for duplicate migration numbers and imports from database models in new migrations. Done means pull requests containing migrations receive both checks, with clear failures when either rule is violated.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

devops

Database migrations are one of the parts of the codebase that recieves the most review scrutiny, most of it very rules-based and mechanical.

We can convert these into CI checks to focus reviews on the less mechanical parts (i.e. "how will this affect existing instances")

Some criteria to check new PRs for (if they contain a new database migration):

  • That the migration number is not duplicated with an existing migration (i.e. two PRs create migrations with the same next number) - although this may not be fully reliable, if one PR merges and the other doesnt get rebased, the check may not rerun.
  • Ensuring that there are no import statements that import anything from the database models (use of DB models should be minimal or nonexistent, and if there is a reason for it, the models should be copy pasted into the migration)
Ngôn ngữ chính
Python
Star
17
Fork
30
Merge trung bình
6 giờ 16 phút
Pull request đã merge (30 ngày)
9

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của chaoss/CollectOSS

Tất cả issue của chaoss/CollectOSS

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.