Closed prasannamahajan closed 2 years ago
Pull request: https://github.com/communitybridge/easycla/pull/815
Tested and observed below issues POST ACTION
GET ACTION
DELETE ACTION
IN UI still V1 api's are used for GET, POST and DELETE
Tested and observed that below issues are still reproducible.
POST ACTION 5. 500 is returned instead of 401 when authorization token is expired
6. Not able to add Repositories even when valid details are provided. Due to this issue testing of issues 2,3,4 are blocked
GET ACTION 1. 500 is returned instead of 401 when authorization token is expired
DELETE ACTION 3. 500 is returned instead of 401 when authorization token is expired
IN UI still V1 api's are used for GET, POST and DELETE
@nirupamav For Issue no. 6 I have verified that Data is not stored properly in cla tables or it might be wrong data in tables that's why error is coming cla-group is not linked with given project SFID Can you please check with fresh data i.e. create a new cla-group and try the whole workflow?
@rinkeshbhutwala It is the correct data. I am using it in V1 for testing
@makkalot can you review the 500 token expired error? Is this related to the GH session token? Can we determine if the token is expired and possibly refresh?
Relates to #781
@amolsontakke3576 re-assigning this task to you. I did a quick search in the v1 project console UI. If you review the cla.service.ts /v1 API calls and perform a "find usages" search, you will notice that we still have a number of functions that call the v1 backend API. We need to replace these endpoint API calls with /v3 endpoint API calls.
Related to #781
@David @rinkeshbhutwala I have verified Project console endpoints and below are a few that still use V1.
/v1/salesforce/projects
/v1/salesforce/project?id=
/v1/project/' + projectId + '/configuration_orgs_and_repos
Below are few endpoints in the Corporate console still uses V1
/v1/signature
/v1/company
/v1/signature/' + signatureId + '/manager
/v1/company/' + companyId + '/project/unsigned
/v1/request-corporate-signature
Below are few endpoints in the Contributor console still uses V1
/v1/user/gerrit
/v1/project/' + projectId + '/gerrits
Can you please suggest equivalent endpoints in Go lang?
@amolsontakke3576 Can you please share more details regarding the above endpoints so I can find the equivalent v3 and v4 endpoint and provide you as soon as possible earlier.
For Project Console
Request URL: https://api.lfcla.dev.platform.linuxfoundation.org/v1/salesforce/projects Request Method: GET Response :
[
{
"name": "The Linux Foundation",
"id": "a0941000002wBz9AAE",
"description": "The Linux Foundation is dedicated to building sustainable ecosystems around open source projects to accelerate technology development and industry adoption.\nFounded in 2000, the Linux Foundation provides unparalleled support for open source communities through financial and intellectual resources, infrastructure, services, events, and training. Working together, the Linux Foundation and its projects form the most ambitious and successful investment in the creation of shared technology.",
"logoUrl": "https://s3.amazonaws.com/cla-project-logo-dev/a0941000002wBz9AAE.png"
},
{
"name": "Janusgraph",
"id": "a0941000002wBybAAE",
"description": "JanusGraph is a scalable graph database optimized for storing and querying graphs containing hundreds of billions of vertices and edges distributed across a multi-machine cluster.",
"logoUrl": "https://s3.amazonaws.com/cla-project-logo-dev/a0941000002wBybAAE.png"
}
]
Request URL: https://api.lfcla.dev.platform.linuxfoundation.org/v1/salesforce/project?id=a09410000182dD2AAI Request Method: GET Response :
{
"name": "Academy Software Foundation",
"id": "a09410000182dD2AAI",
"description": "The mission of the Academy Software Foundation (ASWF) is to increase the quality and quantity of contributions to the content creation industry\u2019s open source software base; to provide a neutral forum to coordinate cross-project efforts; to provide a common build and test infrastructure; and to provide individuals and organizations a clear path to participation in advancing our open source ecosystem.",
"logoUrl": "https://s3.amazonaws.com/cla-project-logo-dev/a09410000182dD2AAI.png"
}
Request URL: https://api.lfcla.dev.platform.linuxfoundation.org/v1/project/486a553d-a1bd-4d78-b28f-914606c5f08f/configuration_orgs_and_repos Request Method: GET Response:
{
"orgs_and_repos": [
{
"auto_enabled": false,
"branch_protection_enabled": false,
"date_created": "2020-11-24T08:13:16.000000+0000",
"date_modified": "2020-11-24T08:14:11.822523+0000",
"organization_company_id": null,
"organization_installation_id": "13150379",
"organization_name": "TestBugsEasyCLAV2",
"organization_name_lower": "testbugseasyclav2",
"organization_project_id": null,
"organization_sfid": "a0941000002wBz4AAE",
"project_sfid": "a0941000002wBz4AAE",
"version": "v1",
"repositories": [
{
"repository_github_id": 315303902,
"repository_name": "TestBugsEasyCLAV2/TestBugsEasyCLAV2-001",
"repository_type": "github",
"repository_url": "https://github.com/TestBugsEasyCLAV2/TestBugsEasyCLAV2-001",
"enabled": true
}
]
}
],
"repositories": [
{
"date_created": "2020-09-03T11:02:17.000000+0000",
"date_modified": "2020-10-22T11:53:18.000000+0000",
"enabled": false,
"note": "created on 2020-09-03T11:02:17Z. disabled on 2020-10-22T11:53:18Z",
"project_sfid": "a092M00001IfVmKQAV",
"repository_external_id": "276077439",
"repository_id": "f2493e5b-b4d0-4e1a-a343-6553d6b22393",
"repository_name": "lkkondepudi/repo1",
"repository_organization_name": "lkkondepudi",
"repository_project_id": "cd9548ee-0137-4641-a817-d6ae842e95b4",
"repository_sfdc_id": "a0941000002wBz4AAE",
"repository_type": "github",
"repository_url": "https://github.com/lkkondepudi/repo1",
"version": "v1"
}
]
}
@rinkeshbhutwala Please check corporate console V1 API details in the below attachment https://app.zenhub.com/files/194341141/5d2a536d-c7c9-42bf-8174-67c893980e0b/download
@rinkeshbhutwala Please check contributor console V1 API details in the below attachment https://app.zenhub.com/files/194341141/7eeacdc9-d5f4-446b-a4c8-a63fdd4dc03d/download
@dealako As discussed with @vinod-kadam on stand-up first try to fix the other bugs of v2 which are blocking for LFX and high priority so will work on this ticket later on because this is a big task for migrating all v1 endpoint to v3 go-lang endpoints.
Closing this old issue. We will re-evaluate at a later date if updates are required.
Summary
Several of the APIs used by the Project management console need migration to golang to support 1) consolidated queries and 2) LFX V2 API integration.
Background
Migrate the following Python APIs to Golang (v3): POST /v1/repository DELETE /v1/repository/
GET /v1/project//configuration_orgs_and_repos
Provide Golang implementation for two endpoints:
User Story
As a developer, I want to optimize the PMC queries. As a developer, I want to consolidate API requests to the golang backend API. As a developer, I want to support LFX v2 integration by using golang to invoke the legacy v3 API
Acceptance Criteria
The "done" criteria when this feature or problem is resolved. Such as:
References
(Optional) Provide any code or specification references that would be helpful for the developer implementing this feature.