Merge lp:~jtv/launchpad/bug-836743 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | William Grant |
Approved revision: | no longer in the source branch. |
Merged at revision: | 13823 |
Proposed branch: | lp:~jtv/launchpad/bug-836743 |
Merge into: | lp:launchpad |
Diff against target: |
131 lines (+55/-9) 4 files modified
lib/lp/archivepublisher/config.py (+3/-1) lib/lp/archivepublisher/scripts/publish_ftpmaster.py (+23/-8) lib/lp/archivepublisher/tests/test_config.py (+19/-0) lib/lp/archivepublisher/tests/test_publish_ftpmaster.py (+10/-0) |
To merge this branch: | bzr merge lp:~jtv/launchpad/bug-836743 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
William Grant | code | Approve | |
Review via email: mp+73267@code.launchpad.net |
Commit message
[r=wgrant][bug=836743] Make publish_ftpmaster resistant to configless archives.
Description of the change
= Summary =
The publish-ftpmaster script broke when it encountered a distribution archive without a publisher config. Could be a bit of a handicap when iterating over all derived distributions, including any that haven't had their configuration set up.
== Proposed fix ==
Have getPubConfig return None for archives that have no configuration in the database. Have publish_ftpmaster ignore distros without archive configs.
== Pre-implementation notes ==
This came up while trying out the publisher's --all-derived option on dogfood. Apparently the publisher config needs to be set up in the UI; distros that don't have it set up yet evidently aren't ready for publishing.
== Implementation details ==
You'll note that I made getConfigs() skip missing configs _per archive_, but main() check for and skip missing configs _per distro_. A distro can have multiple archives.
But the publisher config in the database is keyed off the distro's main archive. So there seems to be no middle ground between "distro without configs" and "distro with configs," unless it's a distro without archives.
== Tests ==
{{{
./bin/test -vvc lp.archivepubli
}}}
== Demo and Q/A ==
Run "cronscripts/
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/