Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
thakurveerendras opened this issue Jul 30, 2024 · 7 comments
Assignees
Labels
bug Something isn't working ldap

Comments

@thakurveerendras
Copy link
Contributor

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

@thakurveerendras thakurveerendras added bug Something isn't working ldap labels Jul 30, 2024
nickmango added a commit to nickmango/easycla that referenced this issue Aug 1, 2024
- Resolved fetching repo list for https://mockapi.gerrit.dev.itx.linuxfoundation.org instance

Signed-off-by: Harold Wanyama <[email protected]>
nickmango added a commit that referenced this issue Aug 1, 2024
@nickmango
Copy link
Collaborator

@thakurveerendras kindly reverify this change

@thakurveerendras
Copy link
Contributor Author

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
Copy link
Collaborator

@thakurveerendras kindly reverify the Add gerrit flow

@thakurveerendras
Copy link
Contributor Author

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

@wanyamah
Copy link

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

nickmango added a commit to nickmango/easycla that referenced this issue Oct 7, 2024
- Updated response to include gerrit repo instances

Signed-off-by: Harold Wanyama <[email protected]>
nickmango added a commit that referenced this issue Oct 7, 2024
nickmango added a commit to nickmango/easycla that referenced this issue Oct 8, 2024
- Resolved repo list in the test case

Signed-off-by: Harold Wanyama <[email protected]>
nickmango added a commit that referenced this issue Oct 8, 2024
@nickmango
Copy link
Collaborator

@thakurveerendras kindly review

@thakurveerendras
Copy link
Contributor Author

Tested on dev site & found that it is fixed as expected for POST Gerrit endpoint too.

Refer screenshot for more details

{86F74B9E-9B06-449E-865F-0E97C51163FD}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ldap
Projects
None yet
Development

No branches or pull requests

3 participants