launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #23899
[Merge] lp:~wgrant/launchpad/dmp-redirect-2 into lp:launchpad
William Grant has proposed merging lp:~wgrant/launchpad/dmp-redirect-2 into lp:launchpad.
Commit message:
Also allow archive mirrors to redirect pool files.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #1836712 in Launchpad itself: "Launchpad mirror prober considers http redirects broken"
https://bugs.launchpad.net/launchpad/+bug/1836712
For more details, see:
https://code.launchpad.net/~wgrant/launchpad/dmp-redirect-2/+merge/371705
The base ProberProtocol is now unused, but that refactoring can wait.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/dmp-redirect-2 into lp:launchpad.
=== modified file 'lib/lp/registry/doc/distribution-mirror.txt'
--- lib/lp/registry/doc/distribution-mirror.txt 2019-07-23 14:52:01 +0000
+++ lib/lp/registry/doc/distribution-mirror.txt 2019-08-23 02:32:08 +0000
@@ -767,6 +767,19 @@
>>> archive_mirror.getOverallFreshness().title
'Up to date'
+apt has supported HTTP redirects since Ubuntu 9.04, so mirrors that redirect are treated as good:
+
+ >>> archive_mirror = mirrorset.getByName('archive-redirect-mirror')
+ >>> mirror_arch_series = (
+ ... archive_mirror.getSummarizedMirroredArchSeries())
+
+ # We only have a few publishing records, so most of the cdimage mirrors
+ # will have Unknown as their freshness.
+ >>> for mirror_arch_series in mirror_arch_series:
+ ... print (mirror_arch_series.distro_arch_series.displayname,
+ ... mirror_arch_series.freshness.title)
+ (u'Ubuntu Warty i386', 'Up to date')
+
Now we check the MirrorCDImageDistroSeriess of a cdimage mirror.
=== modified file 'lib/lp/registry/scripts/distributionmirror_prober.py'
--- lib/lp/registry/scripts/distributionmirror_prober.py 2019-07-23 14:52:01 +0000
+++ lib/lp/registry/scripts/distributionmirror_prober.py 2019-08-23 02:32:08 +0000
@@ -505,7 +505,7 @@
# there.
arch_or_source_mirror.freshness = MirrorFreshness.UNKNOWN
for freshness, url in freshness_url_map.items():
- prober = ProberFactory(url)
+ prober = RedirectAwareProberFactory(url)
deferred = request_manager.run(prober.request_host, prober.probe)
deferred.addCallback(
self.setMirrorFreshness, arch_or_source_mirror, freshness,
Follow ups