*** openstackstatus has quit IRC | 03:01 | |
*** jmccrory has quit IRC | 03:26 | |
*** jmccrory has joined #storyboard | 03:26 | |
*** persia has quit IRC | 04:31 | |
*** persia has joined #storyboard | 04:33 | |
*** alexismonville has quit IRC | 04:56 | |
jtomasek | krotscheck: I see you've been doing changes in the npm related jenkins jobs. The registry error is not happening any more. Now I am hitting 'npm ERR! extraneous' http://logs.openstack.org/82/295882/3/check/gate-tripleo-ui-npm-run-test/a3adc64/console.html is it something related to ongoing changes you're doing? | 05:35 |
---|---|---|
*** mrmartin has joined #storyboard | 06:34 | |
*** mrmartin has quit IRC | 07:08 | |
*** mrmartin has joined #storyboard | 07:36 | |
*** openstackstatus has joined #storyboard | 08:30 | |
*** ChanServ sets mode: +v openstackstatus | 08:30 | |
-openstackstatus- NOTICE: jobs depending on npm are now working again | 08:35 | |
Zara | morning, storyboard! | 09:47 |
*** mrmartin has quit IRC | 10:18 | |
* Zara goes back to gerrit stream event things | 10:37 | |
Zara | well... getEvent() gets one event,the most recent | 10:39 |
pedroalvarez | Looking at the code, looks like "startWatching" starts a thread that populates a queue with the events | 10:43 |
pedroalvarez | getEvent gives you one from the queue | 10:43 |
pedroalvarez | so you can maybe create a loop ("while True" ?) where you `getEvent` and then do something with that event, | 10:44 |
pedroalvarez | maybe just print it | 10:44 |
Zara | heh, yeah, I just tried with a small loop to test | 10:45 |
Zara | just counting from 1-10, printing while | 10:45 |
Zara | it works, but they don't print until the loop completes | 10:45 |
Zara | so while True probably won't show anything up, probably just bad control flow, will tinker | 10:46 |
pedroalvarez | hm, that's odd | 10:46 |
Zara | maybe it just took a while to print them and then just did it all at seemingly the same time | 10:46 |
Zara | ahh, there we go | 10:48 |
Zara | I waited for a bit and then the events started covering my screen | 10:48 |
Zara | this is going to be... interesting to test. | 10:49 |
pedroalvarez | oh, getEvent is a blocking call | 10:50 |
pedroalvarez | so, when you run it, the program will block unitl an item is available in the queue | 10:51 |
pedroalvarez | that's why you had to wait a bit | 10:51 |
Zara | aha | 10:52 |
* Zara tries pasting to have a thing on hand to look at easily, doesn't quite work out. http://paste.openstack.org/show/493293/ | 11:01 | |
pedroalvarez | that's what you get with getEvent? | 11:14 |
Zara | I think it was getEvent().items() | 11:17 |
Zara | I'm still wandering around and seeing what I can see | 11:17 |
pedroalvarez | :) | 11:17 |
Zara | I'm not yet sure how to say to it, 'if x key has y value, do a thing', but that's just because I haven't used python much; should work it out soon | 11:20 |
Zara | got it, yay | 11:28 |
pedroalvarez | :D | 11:28 |
Zara | nice that that's built in | 11:28 |
Zara | I think I used it ages ago for the email templates, but lol like I have a memory | 11:28 |
pedroalvarez | if dict['x'] == y: | 11:29 |
pedroalvarez | do a thing :) | 11:29 |
Zara | hmph | 11:29 |
pedroalvarez | there will be more ways, of course | 11:30 |
Zara | for key, value in gerritProjects: | 11:30 |
Zara | if (key=="change"): | 11:30 |
Zara | print value | 11:30 |
Zara | was what I had | 11:30 |
Zara | as a first step | 11:30 |
Zara | so then it'd just be a further 'if' with the value... and then tidy it | 11:31 |
Zara | but the dict option is tidier | 11:31 |
Zara | so I'm stealing it | 11:31 |
pedroalvarez | bear in mind that if gerritProjects['change'] doesn't exist, it will throw an exception | 11:31 |
*** mrmartin has joined #storyboard | 11:51 | |
*** jhesketh has joined #storyboard | 12:01 | |
*** ChanServ changes topic to "storyboard" | 12:01 | |
*** ChanServ changes topic to "StoryBoard - A task tracker for OpenStack development needs :: http://storyboard.openstack.org/ :: https://wiki.openstack.org/wiki/StoryBoard" | 12:02 | |
*** jhesketh has quit IRC | 12:07 | |
*** jhesketh has joined #storyboard | 12:07 | |
krotscheck | jtomasek: Dunno, how about I go look :) | 12:09 |
krotscheck | Oh, that's shrinkwrap telling you that you have extraneous unused modules in your dependencies. Which... is understandably odd, because it's a clean install. Is tripleo doing something wacky and installing extra things? | 12:10 |
jtomasek | krotscheck: it does not. we're using patternfly (currently v 2.10.0) and the issue seems to come from there, but when I look at package.json there the dependencies I see the errors at are listed there | 12:12 |
jtomasek | krotscheck: https://github.com/patternfly/patternfly/blob/v2.10.0/package.json | 12:13 |
jtomasek | krotscheck: If I try to reproduce the issue by running clear npm install and npm shrinkwrap on my local setup, it executes just fine | 12:14 |
krotscheck | Definitely odd | 12:14 |
jtomasek | krotscheck: my setup has npm 3.8.3, node 5.10.0 | 12:14 |
krotscheck | I've got a vm here with the correct versions, just a minute | 12:15 |
krotscheck | jtomasek: Is there a better channel for us to talk about this? I'm thinking infra... what's the tripleo project name? | 12:18 |
krotscheck | sorry- channel nam,e? | 12:18 |
jtomasek | krotscheck: project is tripleo-ui we can go to #tripleo or #openstack-infra | 12:19 |
Zara | okay so that took me a ridiculous amount of time because I thought an object was the same as a dict. nothing to see here, carry on, carry on. | 12:53 |
*** mrmartin has quit IRC | 12:53 | |
Zara | bit more confident on accessing things from a dict, anyway. | 12:54 |
Zara | ;_; | 12:54 |
persia | Just be careful to try the dict access, in case the key is absent, and all should be fine. | 12:55 |
Zara | I was just using completely the wrong methods and things because I was searching 'objects' when I was trying to access a dict | 12:56 |
Zara | I don't think js differentiates between objects and dicts | 12:57 |
Zara | and I'm used to just going foo[bar].baz to access properties and values and things | 12:57 |
Zara | so that was fun; turns out it's really easy and I just didn't know the right runes | 12:57 |
Zara | it's a running theme. | 12:59 |
*** mrmartin has joined #storyboard | 13:00 | |
Zara | so after far too long, I have for key, value in gerritEvents.items(): | 13:05 |
Zara | if (key=="change"): | 13:05 |
Zara | print value.get('commitMessage') | 13:05 |
Zara | so for changing a status, the next step would be to check commitMessage for a specific string that mapped to task_id, | 13:05 |
Zara | but we won't get those in the wild | 13:06 |
Zara | aces, status and commit message are in the same dict | 13:08 |
Zara | I'd guess we only update for NEW (review), MERGED (merged) and ABANDONED(todo) | 13:10 |
Zara | there's a 'SUBMITTED' option but sb doesn't have a way of representing it | 13:11 |
Zara | (at least, if I've understood it right | 13:11 |
Zara | I believe it means, 'someone has clicked workflow +1 but now it needs to pass all the tests' | 13:11 |
Zara | learnin' python, learnin' python, learnin' me some python | 13:12 |
Zara | (I probably seem strange for talking to myself at length, but I use this channel so I don't have to make another text file with my notes as I'm working things out and things are public, so hahahahaha.) | 13:17 |
*** mrmartin has quit IRC | 13:19 | |
persia | Again, you might want to use "try:\n if (key=="change"):\n print value.get('commitMessage')\nexcept KeyError:\n" | 13:24 |
persia | Otherwise, if you happen to get an event that doesn't have the key you want, you will exit. Alternately, you may have mapped it safely somewhere else, so it doesn't matter (because that doesn't look like a dict access). | 13:24 |
Zara | okay, I don't know whether or not gerrit lets people upload changes without messages or statuses, though I agree it's good to be careful with it. Right now this whole thing is horrible and hacky in worse ways (hardcoded user token, anyone? :D) | 13:32 |
Zara | I can add that but I'm changing everything around a lot while I learn how to do things | 13:32 |
*** b3rnard0_away is now known as b3rnard0 | 13:33 | |
Zara | ... python has tuples... | 13:33 |
Zara | long have I wished for something like this in the things I use more | 13:34 |
*** mrmartin has joined #storyboard | 13:48 | |
*** mrmartin has quit IRC | 13:52 | |
*** mrmartin has joined #storyboard | 13:55 | |
*** NikitaKonovalov_ has joined #storyboard | 14:05 | |
Zara | I think I'm almost ready to test updating a storyboard instance from review.o.o, though it won't yet do anything exciting | 14:08 |
Zara | I think it worked | 14:13 |
Zara | yup, it does | 14:14 |
Zara | I can add commit messages as task links | 14:14 |
Zara | we'd probably want that plus the url | 14:14 |
*** NikitaKonovalov_ has quit IRC | 14:15 | |
Zara | so yeah, we can get a storyboard instance updating from a gerrit instance, and if I managed it it's not that hard. :) | 14:16 |
Zara | though this is horrible hacky stuff | 14:16 |
*** NikitaKonovalov_ has joined #storyboard | 14:16 | |
Zara | not production quality | 14:16 |
Zara | and that's just with one event, not the ongoing stream... but I'll put the code I have so far up somewhere | 14:17 |
Zara | I'm guessing we should have a new repo for the storyboard bot | 14:17 |
Zara | but idk if I can face proposing a new project yet :P | 14:19 |
pedroalvarez | Zara: go for your github for now, it will be easier :) | 14:21 |
persia | http://docs.openstack.org/infra/manual/creators.html#add-new-repository-to-the-governance-repository isn't that hard, really. | 14:22 |
Zara | I'm considering putting it up in the pythonclient, even though it doesn't belong there | 14:22 |
Zara | that way people can see what kinda thing the pythonclient can be used for | 14:23 |
Zara | I don't advocate merging it there or anything, dw | 14:23 |
persia | It's hard to remove things from git repos once pushed. If it's a simple script, just paste it somewhere. If it's more complex, then a repo could work (and githb could work), but it probably belongs as it's own thing. | 14:23 |
Zara | it's a simple script and bad atm, I mainly want to push it because it makes it easier for other people to see | 14:24 |
persia | If it's really hacky and you don't want to have the history, ignore me, and put it somewhere private :) | 14:24 |
persia | Just copy to a pastebin then. | 14:24 |
persia | (after censoring it, of course) | 14:24 |
Zara | it is incredibly hacky, I'm not sure it matters if people see the access token for sb and things though, given it's a vm that's just on my office network | 14:25 |
persia | Oh .heh :) | 14:25 |
persia | Although, what openid provider are you using? If a public one, this may be relevant. | 14:25 |
Zara | hm, it goes through launchpad | 14:25 |
* persia doesn't know enough about the nature of these access tokens to know if this would leak information | 14:25 | |
Zara | I thought it was a storyboard-specific access-token, it just makes a new one each time you log in iirc | 14:26 |
persia | So, yeah, you don't want to publish your LP credentials, even though you're only accessing some local instance somewhere. | 14:26 |
Zara | okay, I think it's actually fine but I won't risk it | 14:26 |
persia | If you're confident it's safe, then use it :) | 14:26 |
Zara | not confident enough | 14:26 |
* persia really doesn't know enough, but is very paranoid about this sort of thing | 14:26 | |
Zara | I don't know how it's generated from the lp things, so could be work-outable from that | 14:26 |
Zara | in pratice I have no power anyway so nobody could do anything interesting with it if they got it, but it'd be annoying xD | 14:27 |
Zara | so yeah, very hacky, lots of awful variable names and random stuff that doesn't need to be in there, mainly pasting in case someone wants to play and wants a better base than I had: http://paste.openstack.org/show/493342/ | 14:29 |
Zara | it takes one event, updates a specified task to match some things from that event | 14:30 |
Zara | the task is currently hardcoded | 14:30 |
Zara | the access token is hardcoded so will expire after an hour | 14:30 |
Zara | (well, it's redacted there, but yeah) | 14:30 |
Zara | I'm just happy that gerrit can definitely talk to storyboard. | 14:30 |
Zara | really you want to analyze the commit message for a string that identifies the task_id, and update that task, but there isn't that kind of thing on r.o.o | 14:31 |
Zara | you'd also want to do it from the events continually, of course :P | 14:32 |
Zara | and atm it'll crash in the case persia mentioned | 14:33 |
persia | Reading that makes me think it would be nifty to be able to add a task to a story in SB with a commit message, for the case where one is shaving a yak, and doesn't want to have to fiddle the SB interface to identify the extra stuff one did to complete a story. | 14:36 |
Zara | yeah, atm I'm just not even thinking about that because I don't know how to map a task in gerrit to a storyboard story | 14:38 |
Zara | *commit in gerrit | 14:38 |
Zara | well, you'd need a story identifier in the message | 14:38 |
Zara | and a way of checking that the task wasn't there already | 14:39 |
persia | Right. As a first pass, I think looking for "^Task: #\d+$" in the commit message, and updating that task is a sensible interface. | 14:42 |
Zara | okay, is there a chance people are already 'Task:' as a trigger for anything else? | 14:42 |
Zara | eg: launchpad, whatever other tracker? | 14:43 |
persia | As a second pass, maybe look for "^Story: #\d+$" in the case where there is no "^Task: \d+$", and create a new one? | 14:43 |
persia | In LP, the trigger string is "LP: #\d+", which may appear anywhere in a line, I believe. | 14:43 |
persia | I also believe that LP tracks the repo to which something was committed to decide which task to modify. | 14:44 |
Zara | okay. second pass sounds fine, but I'd rather get task status updates working, then refine it into something that can be used somewhere other than my instance, then come back to adding features. | 14:44 |
Zara | yeah, storyboard could track the project, and I can see it making new projects trivially enough that way | 14:45 |
Zara | but other than that, not sure it's worth it | 14:45 |
Zara | since sb things have unique ids anyway | 14:45 |
persia | That said, I think submitting a commit message including "^Closes-Bug: #\d+$" triggers LP, which is different than what LP does natively. | 14:45 |
persia | But my knowledge of LP is outdated, and my knowledge of gerrit<->LP interaction entirely based on http://docs.openstack.org/infra/manual/developers.html | 14:46 |
Zara | heh | 14:47 |
Zara | probably better than mine | 14:47 |
Zara | well, I looked at the launchpad bot, and it seemed complicated so I ran away again | 14:47 |
Zara | and tbf I actually managed to do this despite no python and no real experience of getting apis to communicate, so hey. | 14:47 |
* pedroalvarez reads how this is going and gets excited | 14:48 | |
persia | Now that you've done that, take another look at the LP bot. I suspect you'll find it easier reading. | 14:48 |
Zara | (hah, tried to get it updating a bunch of times, managed to just make the task update the same way around 1000 times) | 14:50 |
persia | Given that you've hardcoded the task ID and update string, this isn't surprising :) | 14:52 |
persia | As a quick hack, you could pass an ID to storyboardUpdater, which was just a counter for the number of events processed. | 14:53 |
persia | This would update the *wrong* tasks, but it would let you see a selection of updates. | 14:54 |
Zara | ah, I didn't mean that the same task was updating | 14:56 |
*** NikitaKonovalov_ has quit IRC | 14:56 | |
Zara | it should be updating the commit message | 14:57 |
Zara | well, the task link, with the commit message | 14:57 |
*** NikitaKonovalov_ has joined #storyboard | 14:57 | |
Zara | but that's not changing | 14:57 |
Zara | so I think what I *should* be seeing is the message changing each time I refresh the page | 14:57 |
Zara | instead, nothing changes, but I can see the PUTs in my webclient logs | 14:57 |
Zara | my conclusion: it's applying the same data 1000-odd times | 14:58 |
Zara | and my control flow is probably screwed up | 14:58 |
persia | That's one possibility. The other is that it is doing 1000 PUTs so fast that by the time your browser can examine it, you're already looking at the final result. | 14:59 |
Zara | yeah, I wondered about that, but I could see them happening in realtime in the logs | 14:59 |
Zara | so seems a bit weird that the two would be out of sync like that | 14:59 |
Zara | (well, I assume realtime, maybe delayed, but why) | 15:00 |
persia | That said, given your paste, I'd probably put the call to storyboardUpdater inside msgAndStatus, so that it gets called on every event. | 15:00 |
persia | Or some other loop, because the paste looks like it gets the event once, and then does other things. | 15:00 |
*** NikitaKonovalov_ has quit IRC | 15:01 | |
*** NikitaKonovalov_ has joined #storyboard | 15:01 | |
Zara | yeah, I added the loop after the paste | 15:01 |
Zara | just to be extra confusing | 15:01 |
Zara | but I just stuck storyboardUpdater in a loop | 15:01 |
Zara | my favourite bit of that hacky code | 15:02 |
Zara | is that msgAndStatus returns a tuple, so the position matters | 15:02 |
Zara | but I put the name of the function the opposite way round from the things returned | 15:02 |
persia | Paste again? | 15:03 |
Zara | count = 0 | 15:04 |
Zara | while (count < 1000): | 15:04 |
Zara | storyboardUpdater(status, message) | 15:04 |
Zara | count = count+1 | 15:04 |
Zara | it's just that | 15:04 |
Zara | could just be bad syntax, or anything, really | 15:05 |
persia | No, that's correct. | 15:05 |
persia | The issue is that you're calling that with static data. You need to refresh status and message inside the loop. | 15:05 |
persia | So something like storyboardUpdater(msgAndStatus(gerritEvents)) | 15:06 |
Zara | yeah | 15:06 |
Zara | hm, I thought 'status, message' would be equivalent to msgAndStatus(gerritEvents) there | 15:07 |
Zara | gerritStatusMessage = msgAndStatus(gerritEvents) | 15:07 |
Zara | status, message = gerritStatusMessage | 15:07 |
Zara | ^ since that's how I got them... tbf this whole thing isn't sensibly scoped or abstracted or anything | 15:07 |
persia | = is assignment, not assertion of equivalence. | 15:08 |
persia | so it assigns the value at that point in the program flow, and doesn't change again until reassigned. | 15:08 |
Zara | I think I was thinking that as status and message are the things returned by msgAndStatus, it ends up being called each time they're asked for | 15:10 |
persia | That's what I thought :) Yes, it doesn't work that way with the current syntax. | 15:10 |
persia | Passing a variable only passes the assigned value for the variable, rather than calling the function. If you want the function to be called each time, you need to call it explicitly. | 15:11 |
Zara | I wonder if this is because I'm used to something a bit different in js land, or just because I'm tired. :P | 15:11 |
persia | Also, on loop syntax, consider "for count in range(0, 1000):" | 15:12 |
persia | Javascript works the same way for simple variables. I think you're more used to operating on objects and using angular, which reduces the use of bare variables. | 15:12 |
Zara | yup | 15:14 |
Zara | I want to look at this more but I have to do an install guide for another thing (not storyboard) so I might not get to it tonight | 15:26 |
Zara | I also wanted to document my work so far so someone else could take a look | 15:26 |
Zara | but yeahhh | 15:26 |
Zara | so best thing is for anyone looking at this to ping me | 15:27 |
Zara | if you're trying to get your own one working up to the point I'd got it | 15:27 |
Zara | and something's not working | 15:27 |
Zara | does anyone mind if I push it to the pythonclient repo and -2 it | 15:49 |
Zara | ? | 15:49 |
*** mrmartin has quit IRC | 15:55 | |
* Zara pushes | 15:57 | |
openstackgerrit | Zara proposed openstack-infra/python-storyboardclient: WIP Proof of Concept Storyboard Updating from Gerrit https://review.openstack.org/302912 | 15:57 |
*** mrmartin has joined #storyboard | 16:21 | |
anteaya | Zara: when is the storyboard meetup again? | 16:46 |
anteaya | I don't see it listed here yet: https://wiki.openstack.org/wiki/Sprints | 16:47 |
anteaya | I can clean this up and you can add it or you can clean it up and add it, either way | 16:47 |
anteaya | I have to go offline now for a bit and while check back later | 16:47 |
Zara | ohhh, I think we said 16th of May? | 16:52 |
Zara | I should know... it's probably on the storyboard page, hang on | 16:52 |
Zara | heh, yes https://wiki.openstack.org/wiki/StoryBoard/Milestone_1_Meetup | 16:58 |
Zara | no text in it yet | 16:58 |
Zara | I'm behind on getting my notes together for the summit | 16:59 |
Zara | let alone milestone 1 ;_; | 16:59 |
Zara | also, I hope your house is less watery! | 16:59 |
Zara | I've been very distracted this week, so I'm sorry not to be more engaged with that :/ | 16:59 |
*** NikitaKonovalov_ has quit IRC | 17:03 | |
Zara | hah, I love how much pep8 hates my wip | 17:30 |
*** mrmartin has quit IRC | 18:09 | |
*** NikitaKonovalov_ has joined #storyboard | 19:36 | |
*** jtomasek has quit IRC | 20:03 | |
*** jtomasek has joined #storyboard | 20:05 | |
*** mrmartin has joined #storyboard | 20:21 | |
*** mrmartin has quit IRC | 21:24 | |
*** b3rnard0 is now known as b3rnard0_away | 21:35 | |
*** NikitaKonovalov_ has quit IRC | 22:20 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!