Challenge Overview
Populate user details of the project members before indexing them in the Elastic Search.
Project Background
Topcoder Project Service is the main backend service of Topcode Connect – the client-facing application of Topcoder. We have done a big update to the Project Service from V4 to V5. In the V5 we moved out functionality for indexing data in Elastic Search to a separate service called project-processor-es. Now we would like to move one more small detail from V4 implementation to V5.
Technology Stack
-
Node.js
Code access
The work for this challenge has to be done in one repository:
- Project Service repo https://github.com/topcoder-platform/project-processor-es branch develop commit e2c233f36a83d1663084907f48e54b467b0a6ae0 or later.
- Config for local setup is provided on the forum.
Individual requirements
-
In the Project Service V4 before adding project members to the Elastic Search index we populated some additional details about a member, which we get from the Topcoder Member Service, see the code in V4. In short: for a new member which we add to the project member list we first retrieve additional data using `util.getMemberDetailsByUserIds` and after add some fields to the member record. We are using these fields for searching projects in Elastic Search using this additional data.
-
We have to implement the same logic for populating new member with additional data inside V5. This code for indexing members is now in a separate repo here.
General requirements
-
Follow the existent code structure.
-
Properly structure the new code, in particular, move/reimplement method `getMemberDetailsByUserIds` in the new repository.
-
Existent unit tests should pass (adjust if necessary). You may need to mock the new method `getMemberDetailsByUserIds` as unit tests shouldn’t depend on Member Service.
-
As method `getMemberDetailsByUserIds` would require setting environment variables like AUTH0_CLIENT_ID, AUTH0_CLIENT_SECRET, AUTH0_URL, AUTH0_AUDIENCE, AUTH0_PROXY_SERVER_URL update README to reflect this fact.
-
Lint should pass (don’t disable eslint rules).
-
Git patch should be without errors or warnings.
-
DON’T include the values for environment variables AUTH0_CLIENT_ID, AUTH0_CLIENT_SECRET, AUTH0_URL, AUTH0_AUDIENCE, AUTH0_PROXY_SERVER_URL inside the repository or git patch. These variables should be always configurable manually by setting environment variables.
Verification
Please, provide a quick guide on how to validate that submission works as per requirements.
If you have any questions or concerns, don’t hesitate to ask on the forum.
Final Submission Guidelines
Submit a zip file which would include:
-
Git patch with changes you’ve made to the code in our repository.
-
A quick guide on how to validate that submission works as per requirements.
Additionally, the winner would be required to raise a pull request to the repository after the challenge is completed.