/srv/irclogs.ubuntu.com/2020/06/12/#launchpad-dev.txt

SpecialK|Canonhttps://code.launchpad.net/~doismellburning/launchpad/+git/launchpad/+merge/385644 - my og_title assert is failing and it's not yet clear to me if my template code is wrong or I should be poking makeTemplateView to inject more info - would appreciate feedback please15:33
SpecialK|Canon(both specific and general!)15:33
cjwatsonSpecialK|Canon: What's the error message?15:34
SpecialK|Canoncjwatson: `testtools.matchers._impl.MismatchError: 'http' not in None`15:35
SpecialK|Canonpresumably because `request/URL` is None15:35
cjwatsonI normally write more like content.find('meta', property='og.title'), but your syntax should work too15:35
cjwatsonrequest/URL is used in og:url rather than og:title though15:35
SpecialK|Canoncjwatson: property is a builtin in some modern Pythons though15:35
SpecialK|Canoncjwatson: hence I went for the dict15:35
cjwatsonAh yeah, fair point15:36
SpecialK|Canon(otherwise I would have)15:36
cjwatson"modern" :)15:36
SpecialK|Canonbah sorry, og_url not og_title15:36
SpecialK|Canonhttps://pastebin.canonical.com/p/y7S2VGN6YQ/ in full15:37
SpecialK|Canonhttps://pastebin.ubuntu.com/p/DFWsYspMcf/ even15:37
SpecialK|Canonvery few things declare recommended_canonical_url, fine (I do mean to add tests for some of those later)15:38
cjwatsonMkay, having a look15:38
cjwatsonI think soupmatchers would make this clearer FWIW15:38
cjwatsonI always like composite tests to test as much as they can at once, because it means you get better error messages15:39
SpecialK|CanonHm that does look interesting15:43
cjwatsonrequest/URL should evaluate to http://launchpad.test here, since that's what makeTemplateView sets up ...15:44
SpecialK|CanonThat's what I assumed; I'm struggling to find much in the way of docs about `request` though15:45
* cjwatson sets a breakpoint on recommended_canonical_url15:45
cjwatsonIt's a LaunchpadTestRequest in this case15:45
SpecialK|Canonhttps://zope.readthedocs.io/en/latest/zopebook/AppendixC.html#tales-overview helpfully tells me it's a thing, but not much more15:46
SpecialK|CanonAh15:46
SpecialK|Canon...yes in hindsight it is, isn't it15:46
cjwatsonWhich is a thin layer over https://zopepublisher.readthedocs.io/en/latest/browser_api.html#zope.publisher.browser.TestRequest15:47
cjwatsonAs for template language docs, I generally point at https://pagetemplates.readthedocs.io/en/latest/ instead of that old Zope 2 doc15:50
SpecialK|CanonDigging a little more I suspect I may instead want view/url or context/url based on other usages, but I've not yet found anything definitive15:51
SpecialK|CanonAh thanks15:51
cjwatsonAh15:52
cjwatsonSpecialK|Canon: alternate expressions after | only get evaluated if the previous expressions *fail*, not just return None15:53
SpecialK|CanonWell, https://pagetemplates.readthedocs.io/en/latest/history/TutorialPart2.html?highlight=view%2Furl#inserting-text uses request/URL, but I'm still not clear on the exact different semantics15:53
cjwatsonSpecialK|Canon: Try "python: view.recommended_canonical_url or request.URL" instead15:53
SpecialK|Canoncjwatson: ...that'll do it, thanks15:53
SpecialK|Canonhurrah, cheers :)15:55
tomwardillhopefully make css generation repeatable enough: https://code.launchpad.net/~twom/launchpad/+git/launchpad/+merge/38567816:13
tomwardillnote, this disables compressed output for now, it makes the file ~80K bigger, but it's a single file that is then cached16:13
tomwardillbut means SASS leaves the comments in, so I can work out which file is which!16:13
tomwardillI'll re-enable compressed output when this bug is confirmed fixed16:14
cjwatsonWill you be able to compare between qastaging/staging/dogfood or something?16:15
cjwatsonr=me anyway16:15
tomwardillthat's the hope, yes16:15
tomwardillwe have enough environments that build this that I can see if we get consistent results from it16:16
tomwardillI kind of dislike that we have rules that are dependant on the ordering of the filesystem16:16
tomwardill(apparently)16:16
cjwatsonYes, we clearly shouldn't16:19
tomwardillhopefully this will fix it for now, a better fix would probably be to create a SCSS _index file and use that rather than the jsbuild mechanisms16:21
cjwatsonYeah16:23
cjwatsonBah, another buildbot failure due to me16:23
cjwatsonhttps://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/385680 - quick testfix review?16:33
tomwardilllooking16:37
tomwardillcjwatson: +116:38
cjwatsoncheers16:38
cjwatsonI think that's about all the useful stuff I'm going to get done today.  Have a good weekend16:45
SpecialK|Canoncjwatson: you too!16:47
SpecialK|Canonhttps://code.launchpad.net/~doismellburning/launchpad/+git/launchpad/+merge/385644 if anyone's still around...?16:47
tomwardillmind blanked, what's the env var I need to use lp-shell with a local instance?16:50
tomwardilldisables the SSL validation16:50
tomwardillLP_DISABLE_SSL_CERTIFICATE_VALIDATION=16:52
tomwardillthat would do it16:52
SpecialK|Canonso https://dev.launchpad.net/Running - presumably "Point your usual web browser at https://launchpad.test, and accept the local self-signed certificate." predates "it is advisable to try Launchpad in an LXC/LXD container"16:56
cjwatsonProbably, but I don't get the connection16:57
SpecialK|Canonis there anything more modern somewhere else?16:58
cjwatsonWhat is your objection?16:58
SpecialK|Canoncjwatson: well the latter means that doing the former won't achieve much16:58
cjwatsonNot so16:58
SpecialK|Canoncjwatson: because I'm running LP in a container16:58
cjwatsonWorks fine16:58
cjwatsonYou do have to follow the link to https://dev.launchpad.net/Running/RemoteAccess16:59
SpecialK|Canonand my host is not aware of launchpad.test16:59
SpecialK|CanonRight16:59
cjwatsonIt will be if you do the stuff in Running/RemoteAccess :)16:59
cjwatsonRunning may just need to be reordered a bit16:59
SpecialK|Canon"Works fine" *if* you have read some as-yet-unmentioned docs is...a stretch ;P17:00
cjwatsonYeah, I hadn't noticed that RemoteAccess is actually mentioned further down the page17:00
SpecialK|CanonBut yes, thanks for the pointer, I'll rejig that a bit17:00
cjwatsonA few people have been through the docs without mentioning that :)17:00
* tomwardill always reads the entire paper before answering questions ;)17:01
tomwardillhttps://code.launchpad.net/~twom/launchpad/+git/launchpad/+merge/385683 add gitrepository.id to the API17:01
cjwatsonGood catch that it's misordered though17:01
tomwardill(one of my previous statements is a complete lie)17:01
tomwardillI think at least myself and pappacena were given both links at the same time, so it's less obvious17:02
cjwatsonCould be17:02
cjwatsonhttps://dev.launchpad.net/Running/LXD also emphasises it a bit at the end17:03
cjwatsonAnyway, not here :)17:03
* tomwardill -> also not here, before dog eats anything else he's not meant to because I haven't fed him yet17:03
SpecialK|CanonCheers :)17:06
SpecialK|CanonHave good weekends!17:06

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