Skip to content

🐛 [BUG] - Erreur 500 GitLab (//api/v4) lors de la crĂ©ation de groupe/dĂ©pĂŽt via serveur NestJS #2524

Description

@shikanime

Description

La création d'un groupe ou d'un dépÎt GitLab échoue avec une erreur GitbeakerRequestError: Internal Server Error (HTTP 500) sur POST /api/v4/groups lorsqu'un projet est synchronisé par le serveur NestJS (plugin observability, entre autres).

L'URL appelĂ©e contient un double slash : http://gitlab-webservice-default.dso-gitlab.svc.cluster.local:8181//api/v4/groups. Ce double slash provient d'une valeur GITLAB_URL (ou GITLAB_INTERNAL_URL) terminĂ©e par un slash. Le client gitbeaker construit l'URL de base par concatĂ©nation : [host, "api", "v4"].join("/"), ce qui produit 
fr//api/v4/
 si host se termine par /. Le webservice GitLab ne route pas cette requĂȘte et rĂ©pond 500.

Etapes de reproduction

  1. Configurer GITLAB_URL avec un slash final (ex. https://gitlab.dso.cpin-hp.numerique-interieur.fr/)
  2. Créer ou mettre à jour un projet via la console (serveur NestJS)
  3. Observer l'événement project.upsert déclenchant la création du groupe/dépÎt
  4. Voir l'erreur 500 dans les logs

Captures d'écran

N/A

Logs

{"name":"GitbeakerRequestError","message":"Internal Server Error","status":500,"url":"http://gitlab-webservice-default.dso-gitlab.svc.cluster.local:8181//api/v4/groups","method":"POST","description":"500 Internal Server Error"}

Navigateurs

N/A

OS

N/A

Version de la console impactée

v9.24.x (serveur NestJS)

Définition du fini

  • Le correctif est terminĂ©
  • Les tests liĂ©s Ă  ce correctif ont Ă©tĂ© ajoutĂ©s

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions