Enable reputation accounting for workers by job type#3888
Open
Enable reputation accounting for workers by job type#3888
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 5 Skipped Deployments
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue tracking
Closes #3887
Context behind the change
This pull request introduces support for tracking and querying reputation by job request type in the reputation-oracle service. The changes update the reputation schema, API, and service logic to include a new
jobRequestTypefield, allowing more granular reputation management based on the type of job completed. The migration, entity, repository, DTOs, and related service logic and tests have all been updated accordingly.Database and Entity Changes:
job_request_typecolumn to thereputationtable, updated the unique index to include this column, and provided a migration for these changes.ReputationEntityto include the newjobRequestTypefield, set its default, and modified the unique index to include it.API and DTO Changes:
jobRequestTypesand included this field in both request and response DTOs.Repository and Query Logic:
ReputationRepositoryto support case-insensitive address matching and filtering byjobRequestTypesin queries.Service and Business Logic Updates:
EscrowCompletionServiceto determine and pass the correctjobRequestTypewhen assessing and increasing reputation for payout recipients, including new helper methods for extracting this information from escrow/manifests.Test and Fixture Updates:
jobRequestTypefield, ensuring all reputation-related logic and assertions include this parameter.How has this been tested?
Staging
Release plan
Automatic migration run
Potential risks; What to monitor; Rollback plan
Since most of the jobs in production so far have been "image_skeletons_from_boxes" jobs, the current score of oracles will be assigned to it