#ubuntu-autopilot 2014-07-21
<greyback> o/
<elopio> hey greyback. I've tried the tests, and I see the problem.
<elopio> and I don't see a good solution.
<greyback> then we need a bad solution ;)
<elopio> greyback: lets say we hack the autopilot input  so when we click, it will do y + panel height
<elopio> then, I won't be able to click the panel.
<greyback> elopio: then tests for fullscreen apps will be broken
<elopio> there are tests where we need to use the panel and the app.
<elopio> greyback: that too.
<greyback> right, we can't hard-code it globally
<greyback> so need to fix the globalRect to return the correct value
<elopio> that, or on each click of each app test, check if we are running under mir and if so, increase the y value.
<elopio> for each click, for each test, for each app, that's too much.
<greyback> except if app fullscreen
<greyback> it's still hacky
<greyback> how about testing on tablet and sidestage, where sides stage app is over to the right of the screen
<greyback> we can do a hack for now, but this is a problem that has to be solved ultimately
<elopio> yes
<elopio> greyback: how hard is to make Mir behave as X does? is that not an option?
<greyback> elopio: Mir & X are quite different. Apps do not know their position on screen. Only unity8 does
<greyback> (mir being a library that unity8 uses)
<elopio> greyback: but if you can change whether the app draws over the panel or not, can't you update the x and y properly?
<elopio> or maybe, I don't know, paint an invisible panel inside the app that's the same size as the top bar, so all the coordinates still make sense?
<elopio> hum, I suppose you went all over those options already.
<greyback> "invisible panel inside the app" is what is happening with Mir right now
<greyback> and we removed that, it's a hack
<elopio> ah, that's why it used to work.
<greyback> yep. It was a waste of memory and caused visual glitches
<elopio> greyback: Here is the only place where I think we have some chance:
<elopio> http://bazaar.launchpad.net/~autopilot/autopilot-qt/trunk/view/head:/driver/introspection.cpp#L164
<greyback> elopio: Is it dynamic? As in, if you're testing an app and part of the test is to reposition the app's window, will it reflect that?
<elopio> greyback: it should, yes.
<elopio> at least on X that works.
<greyback> elopio: that's not a safe comparison :) Mir != X in many ways
<elopio> greyback: I know. What I'm saying is that if it doesn't work on Mir, we need to fix it.
<elopio> we need it to work on both.
<greyback> elopio: sure
<elopio> but to answer your question: yes, everytime we call globalRect, it's refreshed.
<greyback> ok cool
<greyback> thomi: hey, when you've had your morning coffee, can we have a chat? I need your advice
<greyback> and help probably
<thomi> greyback: heh, sure - we can chat now if you like
<greyback> thomi: ok cool. So we've been working on a thing called QtCompositor, which changes how Mir renders stuff to screen
<greyback> part of those changes is problematic to autopilot
<thomi> uh oh
<greyback> with the old (current) architecture, every application got a fullscreen surface, and it deliberately kept an invisible border at the top, so the app contents would not be covered by the panel
<greyback> the new (qtcomp) arch, the application gets a surface of the exact size it needs, and that surface positioned under the panel
<thomi> ok
<greyback> it seems that AP tests for Mir are injecting input events via uevent. Those events must be in screen coordinates.
<thomi> yes, they should be
<greyback> when the app had a fullscreen surface, the surface coordinates = screen coordinates
<thomi> ahhh
<greyback> but now with qt comp, that is no longer the case
<thomi> I see where you're going with this :)
<greyback> :)
<thomi> so, in libautopilot-qt, we ask Qt to translate each widget's coordinates to screen-space
<thomi> and report those back to the autopilot test
<thomi> so In the past, Qt knew enough to be able to do that translation
<thomi> let me find the code real quick, one second
<greyback> yeah, X let Qt find the current screen position of the window. However Mir does _not_
<barry> thomi: hi.  i wasn't very helpful about those 64 datetimes :/
<thomi> greyback: https://bazaar.launchpad.net/~autopilot/autopilot-qt/trunk/view/head:/driver/introspection.cpp#L171
<thomi> barry: I'll take a look in a moment and get back to you - you'll be online in 30 minutes or so?
<barry> thomi: yep
<greyback> thomi: with qtcomp, the only thing which knows the current surface position is unity8
<thomi> greyback: so if we can't do that, this is potentially a very large problem
<thomi> hmmm
<greyback> thomi: what I can do is expose that information out of unity8 somehow, either via AP helper, or dbus at the worst.
<greyback> but that ofc means AP depends on unity8
<thomi> well, we can make it depend on unity8 on the phablet devices only for now
<thomi> and we really need to be able to get that information without having to put u8 into testability mode
<thomi> which means some sort of separate IPC, and dbus seems appropriate
<greyback> ack
<thomi> so this is a bit of an engineering problem from our side, but I'm sure it's solvable
<thomi> hmmmk
<thomi> The easiest way to do it would be to detect that we're on mir in autopilot-qt and do the dbus call there
<thomi> so autopilot itself wouldn't have to change
<greyback> ok
<thomi> and once we're doing that, we may as well store the surface coordinates in the app somehow
<thomi> however, that means making sure all apps can access the new u8 dbus interface (apparmour etc)
<greyback> how to identify a surface? appid would be unique, but is that info available?
<thomi> hmmm, not AFAIK, not in autopiot-qt anyway
<thomi> greyback: could you use the caller from the dbus call?
<greyback> thomi: possibly yes
<thomi> so the u8 interface would simply be "tell me my surface geometry"
<greyback> makes sense
<thomi> greyback: does the surface geometry ever change?
<thomi> Presumably it will when the app moves from the side stage to the main stage
<greyback> thomi: it can
<greyback> yep
<greyback> also device rotation will resize the app surface (moving the panel)
<thomi> ok, so ideally we'd like a dbus signal for when that happens so we don't need to make this dbus call every time
<thomi> ..for when either of those things happens :)
<thomi> like 'geometry_changed(new_geom)'
<greyback> but how to identify that surface?
<thomi> ahhh
<thomi> hmmm
<thomi> ugh
<greyback> tbh the app knows when its surface has resized
<greyback> it doesn't need dbus to tell it that
<greyback> but repositioned...
<thomi> hmmmm
<thomi> but I'm not convinced that autopilot-qt knows that
<thomi> so, taking a step back here, there is another option
<thomi> which is to inject input events directly into the Qt event loop directly from autopilot-qt
<greyback> AP-qt should be able to connect to the widthChanged and heightChanged signals on the QQUickView/Window
<thomi> hmmmm
<thomi> ap-qt has a rather limited view of the application tree. It can be tricky to find the specific node we want
<thomi> ugh
<greyback> thomi: re inject-into-qt, it has a similar issue, those are just relatively positioned input events, Qt will not know then need to be transformed to the coord space of the surface
<thomi> yeah
<thomi> hmmmm
<thomi> ok, so what about if we got the geometry information from autopilot itself
<thomi> we could then pass u8 the app id
<thomi> crap, we can't monitor signals from AP at the moment
<greyback> thomi: pid is unique and something we could use to identify surfaces
<thomi> ok, we have that too
<greyback> can send signals: surface with pid x has a geometry change
<thomi> so the problem doing it from the AP client side is that we can't monitor dbus signals from the test
<greyback> no? oh
<thomi> because we don't have an event loop running, since the test runner is all synchronous calls
<thomi> and python-dbus won't run an event loop in a thread :(
<greyback> sux
<thomi> we could hack something together with multiprocessing, but... that'd be awful
<thomi> greyback: It seems to me like the best option here is to expose the surface geometry information to Qt in such a way that the  'mapToGlobal' call continues to work
<thomi> greyback: to my mind, we're braking the contract between Qt and whatever sits above it if we don't supply that information any more
<thomi> and, while I'd be happy hacking around it at a lower level, it seems like there's going to be some implementation issues no matter how we do it
<thomi> I don't know anything about that interface, but is it not possible to do the work required there, so that method call continues to do the right thing?
<balloons> hey thomi, we should chat about when you get some time https://bugs.launchpad.net/ubuntu-calendar-app/+bug/1328600
<greyback> thomi: I can't say I'm a big fan of that. I don't see why an app really needs to know its position on screen. But I'll put it to the Mir guys
<thomi> greyback: well, the point isn't so much whether it needs to know or not
<thomi> greyback: the point is that the API exists - there's a contract between Qt and the platform it runs on, and you're breaking that
<thomi> balloons: ok, there's a queue for my attention at the moment, I'll add you to it :)
<thomi> greyback: but like I say, I have no idea how much work that is. If it's less than 2 weeks development time, it's likely to be the fastest solution IMO
<thomi> 'cos any effort that involves refactoring autopilot / autopilot-qt is going to be rather slow and tedious
<greyback> thomi: again I disagree, a pre-existing client API should not define the features of Mir.
<greyback> but I'll see if the Mir team are happy to expose this info
<thomi> greyback: I agree that it should not, but in this case it does. Autopilot won't be  the only app that makes use of that Qt method, sooner or later something else will break
<thomi> ideally that method would be part of a Qt platform module, or similar
<thomi> so different platforms can define how much they expose
<thomi> but as it is, being a method on QWidget, you kind of have a responsibility to provide it, or you're breaking API
<thomi> greyback: anyway, talk to the mir guys, and see what they say. I wonder if you could CC me in on that email please?
<greyback> that api call is backed by the qt platform api, but whether it is implemented is up to the implementer. I think that mapToGlobal is badly documented tbh
<thomi> ok, well, depending on the amount of work, it may be the shortest path to a solution
<thomi> unless we can think of something better
<thomi> or you have a few extra developer-hours to patch autopilot-qt :)
<thomi> balloons: barry, are you guys available for a quick hangout?
<barry> thomi: yep, in 2m
<balloons> sure ^^
<balloons> well.. hmm.. I might be voice only, my bw is tapped hard right now
<thomi> I never understand how I have better internet in Dunedin, NZ than most people seem to in the states
<thomi> are you guys still running on telegrams or something?
<barry> i'm voice-only 'cause i'm not wearing pants
<barry> thomi: i'm on
<thomi> https://plus.google.com/hangouts/_/g5odhpdf2zamosefl75lvqyrp4a?authuser=1&hl=en
<thomi> balloons:
<thomi> ^^'
<balloons> hopefully there isn't horrible lag :-) I can hear you
<barry> https://docs.python.org/3/library/datetime.html#datetime.datetime.replace
<barry> aware = naive.replace(tz=localtz)
<barry> aware = naive.replace(tzinfo=localtz)
<thomi> greyback: please also CC veebers in the email with the mir guys, since he'll be coordinating our side
<greyback> ack
#ubuntu-autopilot 2014-07-22
<balloons> barry, you about?
<barry> balloons: hi, yep.  late lunch but i'm here now
<balloons> barry, hey, no worries. I was struggling with the timestamp stuff, but I've arrived at a solution I think
<barry> balloons: yay!  what have you ended up with?
<balloons> basically the timezone offset is variable.. so tzlocal is not always the same
<balloons> I'll push something for you to have a peek at in a few mins
<barry> cool
<balloons> barry, here's what I'm doing: http://paste.ubuntu.com/7837538/
<balloons> ohh and import pytz
<barry> balloons: yep.  looks pretty good
<balloons> woot success.. just in time for thomi to rip it apart :-p
<thomi> that's what I do best!
#ubuntu-autopilot 2014-07-24
<gerlowskija> Is anyone around familiar with adt-run?  I've got a quick syntax question that I couldn't puzzle out from the man page.
#ubuntu-autopilot 2015-07-21
<Letozaf_> hey guys how do I get this installed on my desktop PC: https://code.launchpad.net/~qqworini/ubuntu-rssreader-app/reboot-add-cmake  the version I have of shorts app is quite different from this one and I have this PPA installed: http://ppa.launchpad.net/ubuntu-touch-coreapps-drivers/daily/ubuntu wily
<Letozaf_> need this for fixing autopilot tests
<balloons> Letozaf_, I'm confused by your question
<balloons> it looks like joey hasn't landed that branch yet
<balloons> they should make a new series so it's easier to checkout
<Letozaf_> oops sorry had a lack of electricity and got back now
<balloons> ohh
<balloons> Letozaf_, essentially branch his code and work off it
<Letozaf_> balloons, I did that but when I launch autopilot tests the old shorts launches instead of the "new" one
<Letozaf_> balloons, the one under /usr/share/shorts-app the installed one
<Letozaf_> balloons, should I change the code just for testing so to launch the  new shots app ?
<balloons> Letozaf_, certainly.
<balloons> of course you won't be able to merge it to trunk after. It'll go into that vbranch
<Letozaf_> balloons, yes ok thanks.
<balloons> Letozaf_, ahh the MainView12 issue is something that should be fixed by autopilot 1.6
<balloons> it's like the old issues with Page11, remember those?
<Letozaf_> balloons, oh thanks for the info, but autopilot 1.6 ? isn't it autopilot3 now ?
<Letozaf_> balloons, Autopilot Source Version: 1.5.0 Autopilot Package Version:
<Letozaf_> balloons, got it :-P
<Letozaf_> balloons, so it's autopilot3 vers. 1.6  :-P
#ubuntu-autopilot 2015-07-22
<Laney> hi
<Laney> can anyone help me find Christopher Lee please?
<Laney> ah, that's veebers, I see
<balloons> Laney, correct
#ubuntu-autopilot 2016-07-26
<siva_> Hi. I following http://www.ubuntu.com/download/cloud/install-openstack-with-autopilot. This link tells us to use ubuntu 14.04[trusty] for installing openstack Autopilot. This is latest link? Can I use the same link for installing OpeStack autopilot on Ubuntu 15.10 .
