-
Notifications
You must be signed in to change notification settings - Fork 33
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
Conversation
Error handling - exception filters
Endpoint to fetch jobs discovery
Endpoint to assign a job to user and to retrieve assigned jobs
Middleware to pass the auth token
fix: unit tests
Oracles-discovery
# Statistics exchange oracle
* Alignment of naming convention and endpoint structure * Alignment of naming convention and endpoint structure * ExchangeOracleApi->ExchangeOracle * externalApiGateway-> gateway * Coverage improvement
@macnablocky is attempting to deploy a commit to the HUMAN Protocol Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this 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
packages/apps/human-app/server/src/integrations/exchange-oracle/exchange-oracle.gateway.ts
Outdated
Show resolved
Hide resolved
packages/apps/human-app/server/src/integrations/exchange-oracle/exchange-oracle.gateway.ts
Outdated
Show resolved
Hide resolved
...ages/apps/human-app/server/src/modules/job-assignment/interfaces/job-assignment.interface.ts
Outdated
Show resolved
Hide resolved
...s/apps/human-app/server/src/modules/oracle-discovery/interface/oracle-discovery.interface.ts
Outdated
Show resolved
Hide resolved
...ages/apps/human-app/server/src/modules/job-assignment/interfaces/job-assignment.interface.ts
Outdated
Show resolved
Hide resolved
...ages/apps/human-app/server/src/modules/job-assignment/interfaces/job-assignment.interface.ts
Outdated
Show resolved
Hide resolved
packages/apps/human-app/server/src/modules/job-assignment/job-assignment.controller.ts
Show resolved
Hide resolved
packages/apps/human-app/server/src/modules/statistics/statistics.controller.ts
Outdated
Show resolved
Hide resolved
packages/apps/human-app/server/src/modules/statistics/statistics.controller.ts
Outdated
Show resolved
Hide resolved
# Conflicts: # yarn.lock
Human mainrepo update
* 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
packages/apps/human-app/server/src/common/enums/global-common.interface.ts
Outdated
Show resolved
Hide resolved
packages/apps/human-app/server/src/common/interfaces/custom-exceptions.interface.ts
Outdated
Show resolved
Hide resolved
packages/apps/human-app/server/src/common/interfaces/pageable.interface.ts
Outdated
Show resolved
Hide resolved
.../apps/human-app/server/src/integrations/exchange-oracle/spec/exchange-oracle.gateway.spec.ts
Outdated
Show resolved
Hide resolved
packages/apps/human-app/server/src/integrations/exchange-oracle/exchange-oracle.gateway.ts
Outdated
Show resolved
Hide resolved
packages/apps/human-app/server/src/modules/oracle-discovery/oracle-discovery.controller.ts
Outdated
Show resolved
Hide resolved
packages/apps/human-app/server/src/modules/oracle-discovery/oracle-discovery.controller.ts
Outdated
Show resolved
Hide resolved
packages/apps/human-app/server/src/modules/job-assignment/job-assignment.controller.ts
Show resolved
Hide resolved
packages/apps/human-app/server/src/common/config/environment-config.service.ts
Outdated
Show resolved
Hide resolved
* 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.
packages/apps/human-app/server/src/integrations/kv-store/kv-store-gateway.service.ts
Outdated
Show resolved
Hide resolved
packages/apps/human-app/server/src/modules/jobs-discovery/model/jobs-discovery.model.ts
Outdated
Show resolved
Hide resolved
packages/apps/human-app/server/src/modules/statistics/model/oracle-statistics.model.ts
Outdated
Show resolved
Hide resolved
packages/apps/human-app/server/src/modules/statistics/model/user-statistics.model.ts
Outdated
Show resolved
Hide resolved
packages/apps/human-app/server/src/modules/oracle-discovery/oracle-discovery.controller.ts
Outdated
Show resolved
Hide resolved
* 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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Description
This PR adds the code from 2nd milestone for Human App backend-for-frontend
Summary of changes
How test the changes
There are unit tests for all the features. To run them please execute
yarn test