Merge lp://staging/~sinzui/launchpad/question-email-2 into lp://staging/launchpad

Proposed by Curtis Hovey
Status: Merged
Merged at revision: 12954
Proposed branch: lp://staging/~sinzui/launchpad/question-email-2
Merge into: lp://staging/launchpad
Prerequisite: lp://staging/~sinzui/launchpad/question-email-1
Diff against target: 125 lines (+50/-0)
4 files modified
database/schema/security.cfg (+2/-0)
lib/canonical/config/schema-lazr.conf (+7/-0)
lib/lp/answers/configure.zcml (+10/-0)
lib/lp/answers/tests/test_questionjob.py (+31/-0)
To merge this branch: bzr merge lp://staging/~sinzui/launchpad/question-email-2
Reviewer Review Type Date Requested Status
Abel Deuring (community) code Approve
Review via email: mp+59433@code.staging.launchpad.net

Description of the change

QuestionEmailJob needs db permissions and possibly a cronscript configuration.

    Launchpad bug: https://bugs.launchpad.net/bugs/772682
    Pre-implementation: jcsackett, lifeless

QuestionEmailJob has been created but is tested or setup to run. This
branch does this.

--------------------------------------------------------------------

RULES

    * Update schema-lazr.conf to configure the job to run.
    * Reuse the answertracker user that sends question expirations.
      * Update the user with the job tables.
    * Add a test that verifies that the jobs will run as the correct user

QA

    * Create a question and link it to a bug and an faq
    * Use SQL to insert a job for that question into the QuestionJob table.
    * Run security.py to give the answertracker user access to jobs.
    * Ask an admin to run cronscripts/process-job-source-groups.py on
      qastaging.

LINT

    database/schema/security.cfg
    lib/canonical/config/schema-lazr.conf
    lib/lp/answers/configure.zcml
    lib/lp/answers/tests/test_questionjob.py

TEST

    ./bin/test -vv -t test_questionjob

IMPLEMENTATION

Added the jobs table to the answertracker db user.
Added the job to the config; the schema is correct for production
Added permissions to access the object.
Added a test that exercises the job cronscript and verifies the job can
complete.
    database/schema/security.cfg
    lib/canonical/config/schema-lazr.conf
    lib/lp/answers/configure.zcml
    lib/lp/answers/tests/test_questionjob.py

To post a comment you must log in.
Revision history for this message
Abel Deuring (adeuring) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.