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

Human APP backend - 2nd milestone #1751

Merged
merged 20 commits into from
May 13, 2024
Merged

Conversation

BartoszSolkaBD
Copy link
Contributor

Description

This PR adds the code from 2nd milestone for Human App backend-for-frontend

Summary of changes

  • oracles discovery
  • jobs discovery
  • job assignment
  • statistics
  • error handling refactoring

How test the changes

There are unit tests for all the features. To run them please execute yarn test

MWBlocky and others added 8 commits March 21, 2024 19:57
Error handling - exception filters
Endpoint to assign a job to user and to retrieve assigned jobs
* Alignment of naming convention and endpoint structure

* Alignment of naming convention and endpoint structure

* ExchangeOracleApi->ExchangeOracle

* externalApiGateway-> gateway

* Coverage improvement
Copy link

vercel bot commented Mar 22, 2024

@macnablocky is attempting to deploy a commit to the HUMAN Protocol Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link

CLAassistant commented Apr 3, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@portuu3 portuu3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worker sign up and sign in are missing the hcaptcha token.
I mostly checked functionality. I will review technical implementation after fixes

macnablocky and others added 3 commits April 18, 2024 09:45
* Fixes after check

* Removes unnecessary comment

* Fixes SDK limitation

* Removes unnecessary interceptor, changes Body to Query in request for oracle discovery

* Adds statistics related DTO interfaces with api mapping

* Changes in interface naming convention of received data

* Review fixes

* Review fixes

* Review fixes

* Review fixes

* Changes logic of calling exchange oracle: url is obtained based on the address provided in the enpoint. Adds CORS

* Adds test coverage

* Adds test coverage

* Adds kv store to the modules that use it

* minor fixes

* minor fixes

* Alignment of the swagger and interface used in the project

* Minor fixes

* Minor fixes

* Minor fixes

* Minor fixes

* Removes todo

* Review fixes

* Review fixes

* Review fixes

* Review fixes
@BartoszSolkaBD BartoszSolkaBD marked this pull request as ready for review April 23, 2024 14:02
@BartoszSolkaBD BartoszSolkaBD changed the title [WIP] Human APP backend - 2nd milestone Human APP backend - 2nd milestone Apr 23, 2024
* File `global-common.interface.ts` has been renamed to `global-common.ts`.

* Renamed and moved EnvironmentVariableMissingError class.

* Renamed and moved Pageable classes to utils directory.

* Remove unused import in exchange-oracle.gateway.spec.ts

* Remove console.log from fetchAssignedJobs method.

* Update dependencies in package.json.

* Update terminology in README.md

* Remove unused Headers import from job-assignment.controller.ts

* Removed OnModuleInit import from kv-store-gateway.service.ts

* Corrected the data types for REDIS_PORT and REDIS_HOST in .env.example file.

* Remove redundant volume configuration in Docker-compose

* Add RPC_URL environment variable to docker-compose

* Replace hardcoded URL_KEY in KvStoreGateway with imported constant.

* fix: Update KVStoreClient import and test in KvStoreGateway

* Add Reputation Oracle address to .env and refactor Oracle Discovery.

* Add token authentication for Oracle statistics.

* Remove manual environment variable check.

* Refactor address to use escrowAddress in job assignment service.

* Ensure environment variables validation takes place before module loading.

* Revert "Add token authentication for Oracle statistics."

* Update terminology from 'Interfaces' to 'Model' in README

* Refactor PageableClasses to PageableDto and the file renamed from pageable-classes.ts to pageable.model.ts

* Update KV store gateway test to use actual SDK.

* Added REPUTATION_ORACLE_ADDRESS in app configuration and docker compose file.

* Integrate and use EscrowUtils for job assignment processing.

* Added chainId parameter to `getExchangeOracleAddressByEscrowAddress` method.

* Remove redundant code KV-store gateway test

* Update EscrowUtilsGateway tests.

* Add mock ConfigService to oracle-discovery service test.

* Revert "Add mock ConfigService to oracle-discovery service test."

This reverts commit a2134ad.

* Update oracle-discovery.service.spec.ts tests.
* The KVStoreKeys.url constant is now directly called.

* Changed Redis data volume path and updated gitignore.

* Refactor oracle discovery and statistics modules.

* Add CHAIN_IDS_ENABLED to .env.example
Fix typo in oracle-discovery.service file name and references
Copy link

vercel bot commented May 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
escrow-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 13, 2024 9:09am
faucet-server ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 13, 2024 9:09am
job-launcher-client ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 13, 2024 9:09am
job-launcher-server ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 13, 2024 9:09am
reputation-oracle-server ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 13, 2024 9:09am

portuu3
portuu3 previously approved these changes May 13, 2024
@portuu3 portuu3 merged commit 8788c80 into humanprotocol:develop May 13, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants