/srv/irclogs.ubuntu.com/2015/06/18/#launchpad-dev.txt

blrwgrant: can I render a value from services.config without setting the property on the view?00:41
wgrantblr: modules/lp.services.config/config in TALES will get you the current configuration.00:42
blrwgrant: ah excellent thanks00:43
maozhou_wgrant: do you kown how to delete a series on my test launchpad server?02:36
maozhou_ Is there anynone knows how to delete a series?02:43
maozhouoh,the network is bad02:49
maozhouis there anyone knows how to delete the series?02:53
wgrantmaozhou: It's not possible to delete a distroseries without complex DB surgery.03:10
maozhouok03:13
maozhouand how to delete a builder ? It's not possible to delete a builder  without modification of DB?03:15
wgrantno, builders can't be deleted, as they're referenced by builds that they have performed. when we decommission a builder, we unset "builder ok" and "publicly visible" to dispose of it.03:19
maozhoubut sometimes the builder is not available, if we can't delete it, the list of builders will be more and more.03:26
wgrantmaozhou: unchecking the "publicly visible" flag hides it from the list03:40
maozhouwgrant: that's a good idea03:44
blrwgrant: sorry, could you clarify what you mean by the view should have a _label_ of "configure code"03:54
blrdid you mean a heading in the template? where your inline comment was placed it seemed like you were asking for an update to the docstring in the view class03:55
blrhave added an h2 with context/name at any rate.03:58
wgrantblr: Ah, sorry, views have two special properties.04:01
wgrantpage_title, and label.04:01
blrwgrant: added a .note class, does this look okay? http://i.imgur.com/J1N7L4g.png04:01
blrwgrant: ah I see, no need to have it in the template.04:01
wgrantblr: label appears as the h1 on the page, page_title in the breadrumbs in the head.04:02
wgrantYep04:02
wgrantblr: That looks fine, yep.;04:02
blrwgrant: any thoughts on an appropriate name for the vcs inferring function if I push it into the model?04:30
blrinferred_vcs or default_vcs?04:31
wgrantblr: inferred_vcs makes sense to me.04:35
blrthanks04:35
wgrantblr: It won't be around for terribly long, I suspect, as we can fill in all existing rows once the UI to change it is in palce.04:35
maozhouI create a series which derives from "utopic", but I can't find arch of 386, why? like this : http://imgur.com/8wEriuZ04:36
wgrantmaozhou: That architecture apparently doesn't exist in the previous series of that distribution.04:38
wgrantOnly the first series in a distribution can copy from another distribution; subsequent series always copy from the previous series in the same distro.04:38
maozhouwgrant:It's the first series in a distribution, I have created a new distribution.04:41
wgrantmaozhou: Are you sure that your version of utopic has i386?04:43
maozhouwgrant: Yes , I'm sure. like this: http://imgur.com/ytOFPQC04:47
wgrantmaozhou: Is there an i386 checkbox on the new distribution's primary archive's admin page?04:50
maozhou wgrant: what's the URL of the new distribution's primary archive's admin page??04:53
wgrantmaozhou: Like https://launchpad.dev/ubuntu/+archive/primary/+admin, except not ubuntu04:54
blrwgrant: should productseries-setbranch.pt be in code/templates?05:00
wgrantblr: I'd say so. It's on a Registry object, but it's a totally Code-specific view.05:00
wgrantRegistry is quite big enough :)05:00
blrwgrant: ok, I'll take this opportunity to move it - I just cargoculted product-setbranch from that, so figured that was where it should live!05:01
wgrantblr: By no means an unreasonable assumption.05:01
maozhouwgrant: I can't find the i386 checkbox .http://imgur.com/NVI7ePR05:04
wgrantmaozhou: It would be immediately below the bottom of that image.05:05
wgrantA checkbox for each architecture, if you're running modern code.05:05
wgrantOr potentially none, if you're running old code.05:05
maozhouwgrant:http://i.imgur.com/OXU5S1s.png . I still can't it ,may be I'm running old code.05:10
wgrantmaozhou: Right, in that case it's not relevant.05:10
wgrantmaozhou: I think I may know what the problem is, though.05:10
wgrantIf you're running a largely unmodified development config, your batch navigator settings will be configured to use very small batches.05:11
wgrant+initseries assumes that all of the architectures will be returned in a single batch.05:11
wgrant(because all production-like systems have a default batch size of 75, far higher than the number of architectures)05:12
wgrantTry increasing config.launchpad.default_batch_size to 75 or so, restarting the application, and refreshing the page.05:13
maozhouwgrant: what's the "batch size" mean?05:18
wgrantmaozhou: When a request is made for a potentially large collections of objects, only a fixed number are returned at a time. eg. https://bugs.launchpad.net/ubuntu/ only shows the first 75 bugs.05:19
wgrantmaozhou: In the development config, the number is 5, not 75.05:20
maozhouI understand05:21
maozhouwgrant: how to increasing config.launchpad.default_batch_size? need I modify DB or code?05:26
wgrantmaozhou: launchpad-lazr.conmf05:27
wgrant-m05:27
maozhouok05:28
maozhouwgrant: I have increased config.launchpad.default_batch_size to 75 ,after running "make run_all" , I still can't find arch of i386.05:34
wgrantmaozhou: Perhaps that was not the problem after all. Does https://launchpad.dev/api/devel/ubuntu/utopic/architectures list i386?05:37
maozhouBut,I can find arch of i386 if the series is  derives from other series, eg. 14.04 .....05:38
wgrantSELECT architecturetag, enabled FROM distroarchseries WHERE distroseries = (SELECT id FROM distroseries WHERE name = 'utopic' AND distribution = 1);05:38
maozhouwgrant: https://launchpad.dev/api/devel/ubuntu/utopic/architectures  doesn't list i386.05:43
wgrantI suspect, then, that someone has set the disabled flag on it.05:43
wgrantThe SQL statement will confirm.05:43
maozhouok05:43
maozhouwgrant: You are right , arch of i386 has been disabled by someone, I recovered it , then I find the arch of i386.  Thank you.05:49
wgrantGreat.05:49
wgrantDisabling an architecture is meant to be permanent, so you may run into trouble. But it may be fine depending on when they did it.05:49
maozhouyes05:52
maozhouOnly the first series in a distribution can copy from another distribution, Is it reasonable?05:56
maozhouIf the first series is incomplete, we can't delete it, and the subsequent series can't copy from another distribution, that's in trouble06:01
wgrantCorrect, you need to be careful and work out what you're going to do.06:06
wgrantLaunchpad can only do so much automatically, due to file conflicts.06:06
wgrantPlanning how a distro will operate before you start using it is absolutely essential.06:07
wgrantIn some cases you may want to initialise it without any packages and copy the relevant packages in yourself.06:07
maozhouI understand.06:17
maozhouwgrant: If I have created new distribution and series. how to upload the chroot-xxx-.tar.bz2 to the series? I can only upload it to the series which belong to ubuntu.06:58
=== frankban_ is now known as frankban
wgrantmaozhou: manage-chroot defaults to Ubuntu, but you can tell it to use any distro.07:14
maozhouok,thans07:23
maozhouthanks07:23
maozhouwgrant: I have created new distribution and series, and the series is initialized successful. But  I can't find the series which belong to the new distribution. And upload thd chroot-xxx.tar.bz2 is error. http://imgur.com/zc8ijjW   http://imgur.com/mAbPLux07:40
wgrantmaozhou: You'll find the series if you click "All series". The distro page doesn't show series with status=Experimental by default; you probably want to set it to Development.07:41
wgrantThe manage-chroot error is a permission problem.07:41
wgrantSpecifically, you need to be either an admin or a member of the primary archive's owner team to manage its chroots.07:43
maozhouwgrant:but I can upload the chroot file to "ubuntu:utopic" successful  in the same way07:46
wgrantmaozhou: The user you're logged in as is probably a member of the team that owns your Ubuntu's primary archive.07:47
maozhouwgrant: how to add current user to the team that owns my distribution‘s archive?07:50
wgrantmaozhou: The primary archive will be owned by the distribution's original owner.07:52
wgrantThat may, in this case, be the ~name16 user.07:52
maozhouwgrant: but the current user is ~name16 (admin@canonical.com)07:55
wgrantmaozhou: What does https://launchpad.dev/api/devel/kylin2/+archive/primary say about the owner_link?07:56
maozhouwgrant : I'm sorry, there are something wrong with my notebook, it's panic just now , can you repeat it?08:11
wgrant17:56:31   wgrant | maozhou: What does https://launchpad.dev/api/devel/kylin2/+archive/primary say about the owner_link?08:12
maozhou#wgrant:  http://imgur.com/p8y9tsa08:19
wgrantmaozhou: Mysterious. Are you sure your API client is authenticated as ~name16?08:21
maozhouwgrant: the user who login launchpad.dev is ~name16, http://imgur.com/CPel39308:27
wgrantmaozhou: But manage-chroot uses an OAuth token, not your browser cookie directly. It depends who you were logged in as when you first ran an API client against launchpad.dev.08:28
wgrantYou can run seahorse and delete the launchpad.dev entry to force it to reauthenticate.08:29
maozhoubut how to authenticate my API client as ~name16?08:29
wgrantIf there's no token in gnome-keyring (which seahorse manages), running manage-chroot will prompt you to use your browser to authorise the client again.08:30
wgrantIt will authenticate as ~name16 if you authorise it from a browser logged in as ~name16.08:30
maozhouwhat's seahorse?08:33
wgrantmaozhou: seahorse is the graphical GNOME Keyring manager.08:35
maozhoui understand08:37
maozhouwgrant: which passwd should I delete? It is "Password for 'System-wide: Ubuntu (kylin)@https://api.launchpad.dev/' on 'launchpadlib'" ?08:48
wgrantmaozhou: That's the one.08:51
maozhouok08:53
cjwatsonmaozhou: You said name16's e-mail address was admin@canonical.com.  Please change that (or, better, create a new user to add to the same teams and deactivate name16); that's the address you spammed a couple of months ago, and you said yesterday you were going to change the sampledata addresses.08:54
cjwatsonmaozhou: If you change the existing user's address, please do it manually with SQL so that LP doesn't send an address change notification to the old address.08:55
maozhoucjwatson: I'm sorry about that, I will modify DB about the mail addresses now.08:59
maozhoucjwatson: Which email addresses  spammed you?09:00
maozhoucjwatson: I'm surprised about it , I haven't configured the email. The vaule of Mailer is stub in "devel/zcml/package-includes/mail-configure-normal.zcml"09:14
cjwatsonmaozhou: I don't know what was the source address, because I'm not behind admin@canonical.com; it was reported by one of our sysadmins.09:44
=== anthonyf is now known as Guest73520
cjwatsonblr: Fixed your code-in-swift nit; can I take your comment as an Approve vote?13:52
cjwatson(and thanks)13:52
=== mgz_ is now known as mgz
=== Spads is now known as M-SpaceHobo
=== M-SpaceHobo is now known as Spads
cjwatsonwgrant,blr: I've tested self-imports from LP git to LP bzr, and they work fine now, both https:// and (should anyone so desire) git://.16:07
cjwatsonSo definitely no firewall problems there.16:07
* cjwatson creates https://code.launchpad.net/~cjwatson/launchpad/git-import-test to see what will happen16:36
cjwatsonwgrant,blr: Oh dear, this plan may work for turnip but apparently not for Launchpad itself.  http://launchpadlibrarian.net/209437153/cjwatson-launchpad-git-import-test.log16:41
cjwatsonMaybe code-import-worker could bump its recursion depth, but I have no idea what it would need to bump it to16:43
cjwatsonblr: code-in-swift is just the first pass, BTW; I've been looking through some other deployments and the wsgi-app charm, and working out how I want this to look.  wsgi-app (although we can't use it directly because we have significant non-WSGI components) does something not a million miles away from what deployment-manager does, and I think we want the same kind of thing: [current_symlink, previous_symlink, build_label] config ...17:05
cjwatson... entries, mojo spec looks at build_label and pushes a tarball for that rev into swift if it needs to, charm ensures that it has unpacked copies from swift of all the configured things and GCs old unused ones17:05
cjwatsonTo upgrade we juju set previous_symlink to current_symlink, build_label and current_symlink to the new rev, and mojo run --manifest manifest-upgrade17:06
cjwatsonTo rollback we mojo run --manifest manifest-rollback, which does juju set current_symlink=$previous_symlink17:07
cjwatson(and the rest)17:07
cjwatsonAnd upgrades shouldn't have the scary thing of overwriting the running code in place any more17:09
cjwatsonAnyway, I'm EOD and on leave tomorrow, so will pick this up on my back burner next week if I get time17:10
blrcjwatson: oh yes, of course :)20:44
blrcjwatson: that sounds like an excellent improvement20:45
blrhmm no comments on your issue yet wgrant, clearly you've put the fear in them.20:52
blrwgrant: hmm, does it make sense for ProductSeries to also have inferred_vcs? the context is of course now different in ProductSetBranchView22:02
blrI suspect I should just check for the existence of self.context.inferred_vcs in initial_values instead22:03
blrah ForbiddenAttribute :|22:10
blrwgrant: how can I check for a property on a proxied object?22:11
wgrantcjwatson: The LP repo is packed with depth=200 IIRC. I'm tempted to fix dulwich to not recurse, though.22:26
wgrantblr: You need to add it to the interface (or configure.zcml manually, if that class names attributes directly rather than using its interfaces for security)22:27
blrwgrant: I think I want the latter, I'm not sure it makes sense for ProductSeries to have the property22:30
wgrantblr: Oh, I missed the first part of your question, sorry.22:38
wgrantblr: ProductSeries.vcs doesn't make sense, so you always want to find Product.inferred_vcs.22:39
wgrantblr: Consider always using self.context.pillar.inferred_vcs.22:39
wgrant.pillar is on a lot of Registry objects as a way to get to the Product or Distribution that contains the object.22:39
wgrantIt even works on Product and Distribution themselves.22:39
blrah wasn't aware of that, useful thanks22:40
blrwgrant: is it acceptable to call a private method from the view?23:12
blr(in this case Product._default_git_repository)23:13
blrwell, a cachedprop.23:15
wgrantblr: Not usually. Why?23:18
wgrantIf you want the default repo, I would define a property on the view that uses IGitRepositorySet23:18
blrwgrant: for the configure code link, which currently only checks for development_focus.branch23:19
wgrantblr: Ah, you misunderstood my recommendation.23:21
blrquite possibly!23:21
wgrantblr: The need for the check goes away if you fix it so the link isn't randomly different from the others.23:21
wgrantNone of the others change based on whether a branch is set or not.23:21
wgrants/a branch/the config/23:21
wgrantIf we keep the check, it needs to be fixed to consider the Git case too.23:22
wgrantBut I don't think we need to keep the check.23:22
blrwgrant: ah, so you're happy for it to just read 'configure code' in either case23:22
blragreed, I don't think we're losing much by having a simple link23:22
wgrantWe don't lose much, and we gain simplicity, performance and consistency.23:23
blr'Configure code' and 'Configure code for this project' for text and summary work?23:24
wgrantLink summaries are silly, as they only appear as tooltips, but that works for consistency.23:27
wgrantcjwatson: I think your sampledata was out of date. Will testfix if you're not around.23:31
wgrantHave fixed the dulwich issue, trying an import locally now.23:36
wgrantLooks happy.23:38

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