Merge lp:~sinzui/launchpad/uncommercial-projects into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Graham Binns |
Approved revision: | no longer in the source branch. |
Merged at revision: | 15402 |
Proposed branch: | lp:~sinzui/launchpad/uncommercial-projects |
Merge into: | lp:launchpad |
Diff against target: | 0 lines |
To merge this branch: | bzr merge lp:~sinzui/launchpad/uncommercial-projects |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Binns (community) | code | Approve | |
Benji York (community) | code | Approve | |
Review via email: mp+109404@code.launchpad.net |
Commit message
Do not send expiration messages to project that have become noncommercial.
Description of the change
Pre-implementation: jcsackett
Testing on QA staging revealed that Launchpad does not know how to
handle project that *had* a commercial subscription, but allowed it
to expire. The project is open source and it does not have any
commercial features enabled. Projects like /swift will get an
expiration notice every day.
-------
RULES
* Add a delete method to CommercialSubsc
cannot delete an active subscription.
* At the end of the expiration job's cleanup, it deletes the
commercial subscription if the project is open source.
* The project will be ignored by subsequent runs of commercial jobs
because they only search for projects with commercial subscriptions.
* This also ensures users do not see the expired commercial subscription
message on the project page.
ADDENDUM
* The jobs runner was not setup to run the jobs when they are created.
* The configuration overlaps with the daily_product_jobs script.
Update the schema so that the job runner and the cronscript share
information.
QA
* Prepare and run a clean up script that deletes the expired commercial
subscriptions of noncommercial projects.
* This is a separate task that will also be run on production.
* Ask a WebOps to run ./cronscripts/
* Verify that the script reports that 14 or more jobs were created.
* Verify that a ThirtyDay... job were created for numerink.
* Verify that an Expired... job were created for sausalito.
* Verify that sausalito is deactivated.
* Verify swift did not get a job created.
LINT
cronscripts
database/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
TEST
./bin/test -vvc lp.registry.
./bin/test -vvc lp.registry.
IMPLEMENTATION
Added the three commercial subscription jobs to run in the job source groups.
Updated the cronscript to share the config section.
cronscripts
lib/
Updated Commercial subscription to support delete when the subscription is
expired.
lib/
lib/
lib/
lib/
Updated the CommercialExpir
is not proprietary. This is a case were a non-proprietary project is no
longer needs commercial features. I also removed some duplication in the tests.
database/
lib/
lib/
The code looks good. I asked Graham to do some follow-up during his review rotation. That should show up momentarily.