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

Pending Whitelist count is not incremented when CLA is signed by the company after whitelist request #807

Closed
nirupamav opened this issue Apr 2, 2020 · 18 comments · Fixed by #838
Assignees
Labels
03 - Med Medium Priority API Feature or bug relating to the EasyCLA Application Programming Interface (API). bug Something isn't working Console - Corp Corporate Console Enhancement Tickets (corporate.*.lfcla.com) size:Small An issue or feature that can be resolved in 1 day. v1

Comments

@nirupamav
Copy link

Background

Prerequisite

  1. Project Issue627Test1 with ccla enabled should exist
  2. Company CompSignAfterEmployeeRequest should exist and should not have signed cla

Steps to follow

  1. Launch github repository url https://github.com/selenium-af/Issue719

  2. Login as github user

  3. Update any file and Pull Request

  4. Checks fail

  5. Click on the link to Sign CLA

  6. Click on Corporate

  7. Select Company CompSignAfterEmployeeRequest

  8. Popup to request authorization is dsiplayed

  9. Select employee Email ID
    image

  10. Click SEND button and click DISMISS
    image

  11. Launch Corporate Console

  12. Login as [email protected]

  13. Click on company CompSignAfterEmployeeRequest

  14. Click SIGN NEW CLA

  15. Search and Select Project Issue627Test1

  16. Click SUBMIT

  17. Click YES

  18. Click OPEN CLA

  19. Complete the docu sign process

  20. Observed the pending request is 0 and not incremented
    image

image

@nirupamav nirupamav added the bug Something isn't working label Apr 2, 2020
@dealako dealako added 03 - Med Medium Priority backend An issue or feature related to the backend services Console - Corp Corporate Console Enhancement Tickets (corporate.*.lfcla.com) size:Small An issue or feature that can be resolved in 1 day. labels Apr 3, 2020
@dealako
Copy link
Member

dealako commented Apr 3, 2020

@wanyaland please review and diagnose. Work with @amolsontakke3576 to determine if this is a UI or backend issue.

@wanyaland
Copy link
Contributor

@amolsontakke3576 This will require an update on the api call on the UI. There are 2 cases

  1. For a signed CLA . When a user makes a whitelist request the /v3/company/{companyID}/ccla_whitelist_requests/{projectID} endpoint is called
  2. For an unsigned CLA the legacy endpoint /v2/user/{user_id}/request-company-ccla is called .
    So for unsigned CLAs a change to invoke the v3 endpoint instead of v2 can solve the count issue

amolsontakke3576 added a commit that referenced this issue Apr 8, 2020
amolsontakke3576 added a commit that referenced this issue Apr 8, 2020
dealako added a commit that referenced this issue Apr 9, 2020
* #807 Working on changing endpoints
* #807 added new endpoint and handled errors

Signed-off-by: Amol Sontakke <[email protected]>

Co-authored-by: David Deal <[email protected]>
@nirupamav
Copy link
Author

Verified and observed that the count is incremented when the CLA is signed after whitelist request is sent
Observed message "CCLA whitelist request already exist" is displayed in contributor console even if user is requesting for the company for the first time. Logged a bug #841 to track the issue

Contributor Console
image

image

image

Corporate Console
image

image

image

wanyaland added a commit that referenced this issue Apr 9, 2020
[#807]: Whitelist Request
- Updated API endpoint with success message
dealako added a commit that referenced this issue Apr 10, 2020
* #807 Working on changing endpoints
* #807 added new endpoint and handled errors
* #841 Error message even company is new

Signed-off-by: Amol Sontakke <[email protected]>

Co-authored-by: David Deal <[email protected]>
wanyaland pushed a commit to wanyaland/easycla that referenced this issue Apr 15, 2020
…mmunitybridge#838)

* communitybridge#807 Working on changing endpoints
* communitybridge#807 added new endpoint and handled errors

Signed-off-by: Amol Sontakke <[email protected]>

Co-authored-by: David Deal <[email protected]>
@dealako dealako added API Feature or bug relating to the EasyCLA Application Programming Interface (API). and removed backend An issue or feature related to the backend services labels Apr 20, 2020
@nirupamav
Copy link
Author

Reopening the ticket as the issue is reproducible again

image

image

image

@nirupamav nirupamav reopened this Jul 14, 2020
@dealako
Copy link
Member

dealako commented Jul 15, 2020

@amolsontakke3576 can you troubleshoot and diagnose this regression? Coordinate with @nirupamav on testing this. Seek help from me or @wanyaland if you need help reviewing records in the DB.

wanyaland added a commit to wanyaland/easycla that referenced this issue Jul 16, 2020
- Added request for invite cla manager flow fixing request count
- Added utils function to get cclawhitelistrequest instance
- Added PynamoAPI for the CCLAWhitelistRequest Table

Signed-off-by: wanyaland <[email protected]>
dealako added a commit that referenced this issue Jul 16, 2020
@nirupamav
Copy link
Author

Testing blocked due to #1418

@nirupamav
Copy link
Author

Testing blocked due to #1424

@nirupamav
Copy link
Author

Observed CORS issue while requesting authorization for company has not signed CLA. However email is sent to CLA Manager to sign CLA. When signed again observed the pending request count is not updated
image.png

image.png

image.png

image.png

image.png

@dealako
Copy link
Member

dealako commented Jul 23, 2020

The issue appears to be related to a python error.

[ERROR] TypeError: object of type 'UUID' has no len()
Traceback (most recent call last):
  File "/var/task/wsgi_handler.py", line 110, in handler
    return serverless_wsgi.handle_request(wsgi_app, event, context)
  File "/var/task/serverless_wsgi.py", line 173, in handle_request
    response = Response.from_app(app, environ)
  File "/var/task/werkzeug/wrappers/base_response.py", line 287, in from_app
    return cls(*_run_wsgi_app(app, environ, buffered))
  File "/var/task/werkzeug/test.py", line 1119, in run_wsgi_app
    app_rv = app(environ, start_response)
  File "/var/task/hug/api.py", line 502, in api_auto_instantiate
    return module.__hug_wsgi__(*args, **kwargs)
  File "falcon/api.py", line 274, in falcon.api.API.__call__
    raise
  File "falcon/api.py", line 269, in falcon.api.API.__call__
    responder(req, resp, **params)
  File "/var/task/hug/api.py", line 356, in version_router
    request, response, api_version=api_version, **kwargs
  File "/var/task/hug/interface.py", line 946, in __call__
    raise exception
  File "/var/task/hug/interface.py", line 917, in __call__
    self.call_function(input_parameters), context, request, response, **kwargs
  File "/var/task/hug/interface.py", line 839, in call_function
    return self.interface(**parameters)
  File "/var/task/hug/interface.py", line 129, in __call__
    return __hug_internal_self._function(*args, **kwargs)
  File "/var/task/cla/routes.py", line 184, in invite_company_admin
    project_name, company_name
  File "/var/task/cla/controllers/user.py", line 251, in invite_cla_manager
    ccla_whitelist_request.save()
  File "/var/task/cla/models/dynamo_models.py", line 3954, in save
    return self.model.save()
  File "/var/task/pynamodb/models.py", line 457, in save
    args, kwargs = self._get_save_args()
  File "/var/task/pynamodb/models.py", line 1221, in _get_save_args
    serialized = self._serialize(null_check=null_check)
  File "/var/task/pynamodb/models.py", line 1369, in _serialize
    serialized = self._serialize_value(attr, value, null_check)
  File "/var/task/pynamodb/models.py", line 1397, in _serialize_value
    serialized = attr.serialize(value)
  File "/var/task/pynamodb/attributes.py", line 418, in serialize
    if value is None or not len(value):

dealako added a commit that referenced this issue Jul 24, 2020
[#807] Resolved Python API Error when Saving Approval Request
@dealako
Copy link
Member

dealako commented Jul 24, 2020

Merged PR: #1470

Ready for re-test @nirupamav

@dealako dealako assigned dealako and unassigned wanyaland and amolsontakke3576 Jul 24, 2020
@dealako dealako added this to the Sprint 4 - July 27-August 10, 2020 milestone Jul 29, 2020
@nirupamav
Copy link
Author

Testing blocked due to #1533

@nirupamav
Copy link
Author

nirupamav commented Aug 17, 2020

Verified that the issue is still reproducible
image.png

image.png

image.png

image.png

image.png

image.png

@dealako dealako removed this from the Sprint 4 - July 27-August 10, 2020 milestone Oct 16, 2020
@dealako dealako removed their assignment Oct 16, 2020
@rinkeshbhutwala
Copy link
Contributor

rinkeshbhutwala commented Oct 20, 2020

@dealako I have verified this ticket and found that the issue is from the python side while we call the POST endpoint from the python side /user/{user_id}/request-company-ccla data is not inserted properly.

Screenshot from 2020-10-20 16-32-58.png

oie_PmZGegOQkCuu.png

@dealako
Copy link
Member

dealako commented Oct 21, 2020

Created PR: #2030

@dealako
Copy link
Member

dealako commented Oct 21, 2020

@rinkeshbhutwala sorry, but can you test this after you merge the PR?

dealako added a commit that referenced this issue Oct 22, 2020
[#807] Added Logic to Create CCLA Approval Request Entry
@nirupamav
Copy link
Author

Testing Blocked due to #2032

@nirupamav
Copy link
Author

Testing blocked due to #2075

@vinod-kadam vinod-kadam added the v1 label Jan 4, 2021
@dealako
Copy link
Member

dealako commented Aug 22, 2022

The old v1 console is deprecated and removed.

@dealako dealako closed this as completed Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
03 - Med Medium Priority API Feature or bug relating to the EasyCLA Application Programming Interface (API). bug Something isn't working Console - Corp Corporate Console Enhancement Tickets (corporate.*.lfcla.com) size:Small An issue or feature that can be resolved in 1 day. v1
Projects
None yet
6 participants