Implement validation job for prod models inheriting from base models
#21,869 opened on Feb 6, 2025
Description
NOTE TO CONTRIBUTORS:
- Please use #22225 as a base for creating any new jobs.
- For any validation job you implement, the corresponding domain object of the prod model should be updated to do the following in the same PR:
- Instead of throwing errors using utils.ValidationError("some message"), they should throw typed errors for each message category.
- These error types should be defined in a new file. For example, when creating a new file for errors related to exploration domain objects, you should use the following naming conventions:
- Domain class:
class Exploration, file:exp_domain.py - Error class:
class ExplorationDomainError(utils.ValidationError), file:exp_domain_errors.py
- Domain class:
This issue aims to serve as a checklist for implementing prod validation for all models inheriting from base model.
Here is an umbrella doc describing the design for validation and further elaborating on next steps of migration and fixing root cause. Note that, migration and root cause fixing is out of scope for this issue but contributors can feel free to attempt if they would like to.
Note, for any model that you end up picking, before starting with code, list down the validation you will be implementing as described in the above doc and get it approved from me. Post that you will be assigned to the model in the list. After implementing the job, you should also be submitting a request to test it on backup server.
Implement Audit job for:
- BaseModel: @ankita240796
- ActivityReferencesModel @ankita240796 - work on sample PR to show how domain errors should be defined and link it as an example
- AnswerSubmittedEventLogEntryModel: @Somnath-Mishra
- AppFeedbackReportModel
- AppFeedbackReportStatsModel
- AppFeedbackReportTicketModel
- AuthorBlogPostAggregatedReadingTimeModel
- AuthorBlogPostReadsAggregatedStatsModel
- AuthorBlogPostViewsAggregatedStatsModel
- BeamJobRunModel
- BeamJobRunResultModel
- BlogAuthorDetailsModel
- BlogPostExitedEventLogEntryModel
- BlogPostModel
- BlogPostReadEventLogEntryModel
- BlogPostReadingTimeModel
- BlogPostReadsAggregatedStatsModel
- BlogPostRightsModel
- BlogPostSummaryModel
- BlogPostViewedEventLogEntryModel
- BlogPostViewsAggregatedStatsModel
- BulkEmailModel
- CachedAutomaticVoiceoversModel
- ClassroomModel
- CloudTaskRunModel
- CollectionModel
- CollectionProgressModel
- CollectionSummaryModel
- CommunityContributionStatsModel
- CompletedActivitiesModel
- CompleteExplorationEventLogEntryModel
- CsrfSecretModel Assignee: @bswathii
- DeletedUserModel
- DeletedUsernameModel
- EntityTranslationsModel
- EntityVoiceoversModel
- ExplorationActualStartEventLogEntryModel
- ExplorationContextModel
- ExplorationIssuesModel
- ExplorationOpportunitySummaryAuditModel
- ExplorationOpportunitySummaryModel
- ExplorationStatsModel
- ExplorationStatsTaskEntryModel
- ExplorationUserDataModel
- ExplorationVersionHistoryModel
- ExpSummaryModel
- ExpUserLastPlaythroughModel
- FeatureFlagConfigModel
- FirebaseSeedModel
- GeneralFeedbackMessageModel
- GeneralFeedbackThreadModel
- GeneralFeedbackThreadUserModel
- GeneralSuggestionModel
- IncompleteActivitiesModel
- JobModel
- LearnerAnswerDetailsModel
- LearnerGoalsModel
- LearnerGroupModel
- LearnerGroupsUserModel
- LearnerPlaylistModel
- LeaveForRefresherExplorationEventLogEntryModel
- MachineTranslationModel
- MaybeLeaveExplorationEventLogEntryModel
- PendingDeletionRequestModel
- PinnedOpportunityModel
- PlaythroughModel
- PseudonymizedUserModel
- QuestionContributionStatsModel
- QuestionReviewerTotalContributionStatsModel
- QuestionReviewStatsModel
- QuestionSkillLinkModel
- QuestionSubmitterTotalContributionStatsModel
- QuestionSummaryModel
- RateExplorationEventLogEntryModel
- RoleQueryAuditModel
- SentEmailModel
- SkillOpportunityModel
- SkillSummaryModel
- SolutionHitEventLogEntryModel
- StartExplorationEventLogEntryModel
- StateAnswersModel
- StateCompleteEventLogEntryModel
- StateCounterModel
- StateHitEventLogEntryModel
- StoryProgressModel
- StorySummaryModel
- StudyGuideModel
- TopicSimilaritiesModel
- TopicSummaryModel
- TransientCheckpointUrlModel
- TranslationContributionStatsModel
- TranslationCoordinatorsModel
- TranslationOpportunityModel
- TranslationReviewerTotalContributionStatsModel
- TranslationReviewStatsModel
- TranslationSubmitterTotalContributionStatsModel
- UnsentFeedbackEmailModel
- UserAuthDetailsModel
- UserBulkEmailsModel
- UserContributionProficiencyModel
- UserContributionRightsModel
- UserContributionsModel
- UserEmailPreferencesModel
- UserGroupModel
- UserIdByFirebaseAuthIdModel
- UserIdentifiersModel
- UsernameChangeAuditModel
- UserQueryModel
- UserSettingsModel
- UserSkillMasteryModel
- UserSubscribersModel
- UserSubscriptionsModel
- VoiceoverAutogenerationPolicyModel
- VoiceoverRegenerationTaskMappingModel