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

Wipeout 2.8: Add has_reference_to_user_id to remainig models #7893

Merged
merged 99 commits into from
Nov 6, 2019

Conversation

vojtechjelinek
Copy link
Contributor

Explanation

  • Fixes Add has_reference_to_user_id to remaining models #7858: Add has_reference_to_user_id to remaining models
  • Add indexed=True to SendEmailModel and BulkEmailModel
  • Add EmailModelsIndexesOneOffJob to reindex SendEmailModel and BulkEmailModel
  • Remove ReviewerRotationTrackingModel

Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The PR explanation includes the words "Fixes #bugnum: ..." (or "Fixes part of #bugnum" if the PR only partially fixes an issue).
  • The linter/Karma presubmit checks have passed.
    • These should run automatically, but if not, you can manually trigger them locally using python -m scripts.pre_commit_linter and python -m scripts.run_frontend_tests.
  • The PR is made from a branch that's not called "develop".
  • The PR has an appropriate "PROJECT: ..." label (Please add this label for the first-pass review of the PR).
  • The PR has an appropriate "CHANGELOG: ..." label (If you are unsure of which label to add, ask the reviewers for guidance).
  • The PR follows the style guide.
  • The PR addresses the points mentioned in the codeowner checks for the files/folders changed. (See the codeowner's wiki page.)
  • The PR is assigned to an appropriate reviewer.
    • If you're a new contributor, please ask on Gitter for someone to assign a reviewer and don't tick this checkbox.
    • If you're not sure who the appropriate reviewer is, please assign to the issue's "owner" -- see the "talk-to" label on the issue. Do not only request the review but also add the reviewer as an assignee.

…-models

� Conflicts:
�	core/storage/question/gae_models_test.py
�	core/storage/user/gae_models_test.py
…-models

� Conflicts:
�	core/storage/storage_models_test.py
@oppiabot
Copy link

oppiabot bot commented Nov 1, 2019

Hi, @vojtechjelinek. This pull request does not have a "CHANGELOG: ..." label as mentioned in the PR checkbox list. Please add this label. PRs without this label will not be merged. If you are unsure of which label to add, please ask the reviewers for guidance. Thanks!

@seanlip
Copy link
Member

seanlip commented Nov 1, 2019

@vojtechjelinek the backend tests are failing.

@codecov
Copy link

codecov bot commented Nov 3, 2019

Codecov Report

Merging #7893 into develop will decrease coverage by 0.01%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##           develop    #7893      +/-   ##
===========================================
- Coverage    84.03%   84.02%   -0.01%     
===========================================
  Files         1128     1128              
  Lines        67783    67745      -38     
  Branches      3805     3805              
===========================================
- Hits         56961    56922      -39     
- Misses        9543     9544       +1     
  Partials      1279     1279
Flag Coverage Δ
#backend 100% <100%> (ø) ⬆️
#frontend 73.68% <ø> (ø) ⬇️
Impacted Files Coverage Δ
core/jobs_registry.py 100% <ø> (ø) ⬆️
core/domain/suggestion_services.py 100% <ø> (ø) ⬆️
core/storage/suggestion/gae_models.py 100% <ø> (ø) ⬆️
main_cron.py 100% <ø> (ø) ⬆️
core/storage/recommendations/gae_models.py 100% <ø> (ø) ⬆️
core/controllers/cron.py 100% <ø> (ø) ⬆️
core/domain/prod_validation_jobs_one_off.py 100% <ø> (ø) ⬆️
core/storage/topic/gae_models.py 100% <100%> (ø) ⬆️
core/storage/skill/gae_models.py 100% <100%> (ø) ⬆️
core/domain/email_jobs_one_off.py 100% <100%> (ø) ⬆️
... and 4 more

@oppiabot
Copy link

oppiabot bot commented Nov 3, 2019

Assigning @seanlip for the first-pass review of this pull request. Thanks!

Copy link
Member

@seanlip seanlip left a comment

Choose a reason for hiding this comment

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

Couple of comments, but no real concerns (though please see if you can figure out why some changes from previous PRs are still being shown here).

Thanks!

@@ -47,3 +55,34 @@ def map(item):
@staticmethod
def reduce(key, values):
pass


class SnapshotMetadataModelsIndexesJob(jobs.BaseMapReduceOneOffJobManager):
Copy link
Member

Choose a reason for hiding this comment

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

Er, this is weird. Haven't I already reviewed this in #7874? I don't understand why it's showing up again here?


def _run_one_off_job(self):
"""Runs the one-off MapReduce job."""
job_id = (email_jobs_one_off.EmailModelsIndexesOneOffJob.create_new())
Copy link
Member

Choose a reason for hiding this comment

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

Nit: You don't need the outer parens.

def test_has_reference_to_user_id(self):
self.assertFalse(
topic_models.TopicSummaryModel.has_reference_to_user_id('any_id'))

Copy link
Member

Choose a reason for hiding this comment

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

Drop one of these newlines (there should only be two newlines above top-level class definitions).

@seanlip
Copy link
Member

seanlip commented Nov 4, 2019

@aks681 @ankita240796 @nithusha21 PTAL as codeowners. Thanks!

Copy link
Contributor

@ankita240796 ankita240796 left a comment

Choose a reason for hiding this comment

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

LGTM from code-owner's perspective, Thanks @vojtechjelinek!

@ankita240796 ankita240796 removed their assignment Nov 4, 2019
Copy link
Contributor

@aks681 aks681 left a comment

Choose a reason for hiding this comment

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

lgtm as codeowner

@aks681 aks681 removed their assignment Nov 4, 2019
Copy link
Contributor

@nithusha21 nithusha21 left a comment

Choose a reason for hiding this comment

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

LGTM as a codeowner. Thanks!

@ankita240796 ankita240796 merged commit 7261d67 into oppia:develop Nov 6, 2019
@vojtechjelinek vojtechjelinek deleted the wipeout-models7 branch March 12, 2020 05:32
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.

Add has_reference_to_user_id to remaining models
6 participants