topcoder-platform / taas-apis

5 stars 33 forks source link

When doing a role search, different role is returned, rate details are also different #369

Open sdgun opened 3 years ago

sdgun commented 3 years ago

Steps Go to https://platform.topcoder-dev.com/taas/myteams/createnewteam Click Select on the SELECT A ROLE box Select Role 'QA Engineer' and search(or check with JAVA / SPRING DEVELOPER) Check the sendRoleSearchRequest API response

Current behavior sendRoleSearchRequest API response returns the name 'Angular Developer' and the rate object has different rates, not the QA engineer's rates. However there is no such role with name 'Angular Developer' in role table

For React developer, the rates only return global

taas-roles response: image

sendRoleSearchRequest response: image

https://user-images.githubusercontent.com/4592712/122726262-792dc400-d293-11eb-824e-2132824e6880.mp4

eisbilir commented 3 years ago

@nikolay83 there is an inconsistency between ES and DB for the QA Engineer role

Postman 2021-06-24 00 32 56 Postman 2021-06-24 00 33 46

I suspect this update made by raw sql query without using api, because the updatedAt value of the role at both ES and DB were the same.

I fixed the record, now the role name is QA Engineer for both DB and ES.

About the different rates issue, I didn't see any problem. Global rate is 502 in the example and it's the same with api response. UI only shows global rates (global, rate20Global, rate30Global) and for the React Developer role, only global (40h / week) was defined, that is why 30h / week and 20 / week values appear null. When the user is external member only globals return as expected. (related to #381 )

urwithat commented 3 years ago

The mentioned role exists in ES and not in DB. I’ve synched the roles now on the dev environment, why did the data get out of sync on ES vs DB! Note: While investigating I found 9 active roles in DB vs 6 in ES, was this due to Bus Api being down? Needs to be investigated.

sdgun commented 3 years ago

@nikolay83 From UI I don't see these issues now. But I am not closing this issue since the root cause is still being investigated.

sdgun commented 3 years ago

@urwithat @nikolay83 Looks like this needs some investigation, this is happening again on the JD flow. Reducing the priority since it happens only on one role. You can see in the below video a role which is not present in the existing role list is returned(rates are also different from any existing role).

https://user-images.githubusercontent.com/4592712/129435171-48be50ce-b39b-4bc4-bed9-ac284408bab3.mp4