communitybridge / easycla

The Contributor License Agreement (CLA) service of the Linux Foundation lets project contributors read, sign, and submit contributor license agreements easily.
https://easycla.lfx.linuxfoundation.org
MIT License
64 stars 45 forks source link

"gerrit-repo-list" entity missing on GET & POST Gerrit endpoint for "https://mockapi.gerrit.dev.itx.linuxfoundation.org/" #4395

Open thakurveerendras opened 1 month ago

thakurveerendras commented 1 month ago

Summary

"gerrit-repo-list" entity missing on GET & POST Gerrit endpoint for "https://mockapi.gerrit.dev.itx.linuxfoundation.org/"

Issue:

"gerrit-repo-list" not listed due to that Gerrit connection failed on PCC

Background

Link: https://api-gw.dev.platform.linuxfoundation.org/cla-service/v4/api-docs#tag/gerrits/operation/ListGerrits

GET Endpoint:

{{baseUrl}}cla-service/v4/cla-group/{{cla_group_id}}/project/{{project_sfid}}/gerrits

Response: { "list": [ { "dateCreated": "2024-07-30T10:09:11Z", "dateModified": "2024-07-30T10:09:11Z", "gerritId": "ad1a8b61-88f6-4679-b6b1-085a3ec34f92", "gerritName": "mock", "gerritUrl": "https://mockapi.gerrit.dev.itx.linuxfoundation.org/", "projectId": "01af041c-fa69-4052-a23c-fb8c1d3bef24", "projectSFID": "a09P000000DsCE5IAN", "version": "v2" } ] }

POST Endpoint

{{baseUrl}}cla-service/v4/cla-group/{{cla_group_id}}/project/{{project_sfid}}/gerrits

Response: { "dateCreated": "2024-07-30T10:09:11Z", "dateModified": "2024-07-30T10:09:11Z", "gerritId": "ad1a8b61-88f6-4679-b6b1-085a3ec34f92", "gerritName": "mock", "gerritUrl": "https://mockapi.gerrit.dev.itx.linuxfoundation.org/", "projectId": "01af041c-fa69-4052-a23c-fb8c1d3bef24", "projectSFID": "a09P000000DsCE5IAN", "version": "v2" }

Expected behavior

{ "list": [ { "dateCreated": "2019-05-03T18:59:13.082304+0000", "dateModified": "2019-05-03T18:59:13.082304+0000", "gerrit-repo-list": { "repos": [ { "claEnabled": true, "connected": true, "contributorAgreements": [ { "description": "Test Project Authorized Contributor", "name": "CLA Project 1", "url": "https://api.dev.lfcla.com/v2/gerrit/138c2d54-1151-11e9-ab14-d663bd873d93/individual/agreementUrl.html" } ], "description": "Ansible docker installation role", "id": "ansible%2Froles%2Fdocker-install", "name": "ansible/roles/docker-install", "state": "ACTIVE", "webLinks": [ { "name": "gitweb", "url": "https://gerrit.linuxfoundation.org/infra/gitweb?p\\u003dansible%2Froles%2Fhaveged-install.git;a\\u003dsummary" } ] } ] }, "gerritId": "e82c469a-55ea-492d-9722-fd30b31da2aa", "gerritName": "ONAP", "gerritUrl": "https://gerrit.onap.org", "groupIdCcla": "1902", "projectId": "c71c469a-55ea-492d-9722-fd30b31da2aa", "projectSFID": "abda234423", "version": "v1" } ] }

Screenshots

image image

nickmango commented 1 month ago

@thakurveerendras kindly reverify this change

thakurveerendras commented 1 month ago

Tested on the dev site & found that it is working fine for the GET endpoint but still failing for the POST call

POST Endpoint: image Expected:

https://api-gw.dev.platform.linuxfoundation.org/cla-service/v4/api-docs#tag/gerrits/operation/addGerrit image

GET Endpoint: image image

nickmango commented 1 month ago

@thakurveerendras kindly reverify the Add gerrit flow

thakurveerendras commented 1 month ago

@nickmango with mock Gerrit server, it is still reproducible for POST endpoint image

wanyamah commented 1 month ago

so due to the production release planned for today will revert these updates for now