How do we handle API versioning?

Đang mở
#599 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ó
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
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Sôi nổi
Công nghệ
github, gitlab, python
Lĩnh vực
api, backend

Hướng nghiên cứu

Start by reading the discussion in this issue and the related issue #309, then trace where CollectOSS makes GitHub and GitLab API calls. The issue raises open design questions about version detection, comparison, and storage but names no files or tests. Done means agreeing on a versioning approach for supported platforms and defining how it handles instances that update.

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

Mô tả

In looking at #309 recently I was playing with gitlab API calls such as https://gitlab.com/api/v4/groups/redhat%2fOSAIPO

And that /v4 in the url made me realize that we will likely need to handle several different versions of the gitlab API because we have less control over what version any particular instance may be running on a forge someone wants to use.

i assume all versioning schemes have some notion of "earlier than" and "later than" when comparing any two versions, so at least we should be able to have logic in CollectOSS that can work differently based on the version

Github docs: https://docs.github.com/en/rest/about-the-rest-api/api-versions

gitlab: https://docs.gitlab.com/api/rest/#versioning-and-deprecations

Is this also going to put us on the endless treadmill of cat and mouse games that is keeping up with the changes that github and gitlab make to their APIs?

Things to account for:

  • different platforms use different version signals (v4 vs a date) so we need to handle this in a way that accepts all known/reasonable methods of doing versioning
  • do we need to store the version an api is using? how do we detect/avoid the need to store this and/or update this dynamically as the instance updates?
Ngôn ngữ chính
Python
Star
18
Fork
33
Merge trung bình
2 ngày 16 giờ
Pull request đã merge (30 ngày)
12

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.