How do we handle API versioning?

Abierto
#599 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Activo
Stack tecnológico
github, gitlab, python
Área
api, backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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?
Lenguaje dominante
Python
Estrellas
18
Forks
33
Merge medio
2 d 16 h
PR fusionados (30 d)
12

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de chaoss/CollectOSS

Todos los issues de chaoss/CollectOSS

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.