/srv/irclogs.ubuntu.com/2020/04/24/#launchpad-dev.txt

tomwardillthe hardest part about retries is writing tests for them08:51
SpecialK|Canonahja08:52
tomwardillhttps://github.com/jd/tenacity is neat though08:52
tomwardillAdd retries for ConnectionError in registry client: https://code.launchpad.net/~twom/launchpad/+git/launchpad/+merge/382904 and matching dep addition: https://code.launchpad.net/~twom/lp-source-dependencies/+git/lp-source-dependencies/+merge/38290309:06
cjwatsonThanks, looking09:14
cjwatsonOh, Julien Danjou, good09:16
tomwardillit's a maintained fork of the retrying library09:18
tomwardillthe backoff library is currently unbuildable from source09:18
cjwatsonQuestion in there for you09:20
tomwardillyep, we can shorten the retry, I just picked a number09:21
tomwardill5 seconds * 5 retries?09:21
cjwatson3 seconds maybe?  I'm not super-happy about 15 seconds either but it's hopefully tolerable at least until we figure out something better09:23
tomwardillsure09:24
tomwardillcjwatson: changed and pushed09:24
cjwatsonr=me with a few more comments09:28
tomwardillcjwatson: oh good call on the sleep patch, that has massively simplified things09:37
cjwatsonOh good09:37
tomwardillin theory it'd be possible to remove the inner patch / exception raising, but I'm going to leave it so we're not _just_ trusting tenacity to tell us it's retried09:38
* tomwardill adds comments to that effect09:42
tomwardillcjwatson: how do I land the dependencies branch, just top approve and wait for it to be merged?09:47
cjwatsontomwardill: Yep10:01
tomwardillexcellent, landing then10:02
tomwardilllanding retry10:09
tomwardillboth merged10:17
SpecialK|CanonSo uh10:28
SpecialK|CanonAutomagic links on the OCI image build page for "we built it AND pushed so it's available at example.com/badger"10:29
SpecialK|CanonIs that as painfully hard/unpossible as I suspect?10:29
tomwardillSnap has something similar, iirc10:33
SpecialK|Canonpresumably easier there because they're only going to be pushing it to one place10:34
cjwatsonSpecialK|Canon: I started working on that the other day10:35
tomwardillyeah, but we know the registry url, so we should be able to work it out from that10:35
tomwardill'should'10:35
SpecialK|Canoncjwatson: <310:35
cjwatsonAt least to provide the status of pushes.  I expect I'd need help on figuring out the target URL10:35
cjwatsontomwardill: I don't suppose it's something the registry tells us in a push response?10:36
cjwatsonIf so, the push job could stash it.  (That's what we do for snap)10:36
tomwardillI've not looked, but https://registry_url/image_name should just work10:36
tomwardillas that's what the `docker pull` command would be (we have to assume there's no web front end on a registry)10:37
cjwatsonReliably for all registries?  OK10:37
tomwardilloh, for us it'd be https://registry_url/image_name:edge to perform a no-interaction pull10:38
tomwardillwhere 'edge' is the result of OCIRegistryClient._calculateTag (which could move to OCIRecipeBuild reasonably easily)10:39
cjwatsonOr the build job could stash what it did10:40
cjwatsonTrade-off is that that puts the URLs in the DB so they're harder to fix if we get them wrong10:40
tomwardillor that10:40
tomwardillbut is immune to changes in the calculation affecting past images10:41
tomwardillgiven we know that image_name and tag is going to change soonish10:41
ilasccjwatson: acknowledging I saw your comments in the OCI UI doc and all makes perfect sense, working in that direction, thank you !10:42
cjwatsonilasc: you might as well take advantage of my painful experience working out that permissions UI :)  my notes say spec started 2018-08-10, blog post about the completed feature posted 2019-01-1010:44
ilasc:)10:46
cjwatsonthough of course a lot of that was working out the correct underlying model10:46
cjwatsonOK, 2018-10-05 "started experimenting with git permissions UI"; 2018-10-31 proposed the MP10:48
cjwatsonthat's probably slightly more representative10:48
* tomwardill nearly defenestrated that matching algorithm, many times10:48
tomwardilland I actually could've done, because I had it printed out and covered in red pen10:48
ilascwow :) OK10:49
ilascyes, I am currently using a similar approach to parse the form data10:49

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!