Thursday, 2016-06-23

*** yuikotakadamori has joined #openstack-sprint00:03
*** baoli has joined #openstack-sprint00:06
*** baoli has quit IRC00:06
*** baoli has joined #openstack-sprint00:14
*** baoli has quit IRC00:15
*** baoli has joined #openstack-sprint00:33
*** baoli has quit IRC00:36
*** baoli has joined #openstack-sprint00:41
*** baoli has quit IRC00:42
*** baoli has joined #openstack-sprint00:54
*** rfolco has quit IRC00:56
*** baoli_ has joined #openstack-sprint01:02
*** baoli has quit IRC01:05
*** cdelatte has quit IRC01:38
*** baoli_ has quit IRC01:43
*** baoli has joined #openstack-sprint01:44
*** baoli has quit IRC03:19
*** baoli has joined #openstack-sprint03:23
*** baoli has quit IRC04:10
*** hieulq has joined #openstack-sprint07:09
*** yuikotakadamori has quit IRC08:25
ttxOhai08:33
* ttx will dedicate next two hours to the StoryBoard sprint08:35
*** hieulq has quit IRC08:45
*** hieulq has joined #openstack-sprint09:06
*** zhenguo_ has joined #openstack-sprint09:25
SotKhey ttx :)09:29
*** hieulq has quit IRC09:30
ttxSotK: Trying to fix a UI glitch. Did I mention I hate CSS ?09:36
Zara:)09:38
SotKheh, join the club!09:38
Zarahm, there's a note in the backscroll that the gerrit integration means that tasks update status. As far as I know, this isn't yet implemented; the integration means that gerrit can post comments on stories.09:50
Zaraah yeah, http://eavesdrop.openstack.org/irclogs/%23openstack-sprint/%23openstack-sprint.2016-06-22.log.html#t2016-06-22T19:48:3109:54
Zaraso stories only have a status as a function of their constituent tasks09:54
Zaraso the idea is to get the task status to update from gerrit09:54
Zarausing the task id as an identifier. The story is here: https://storyboard.openstack.org/#!/story/200001209:56
ttxSotK: see my comment on that review... I did not find teh right solution I fear10:13
ttxAnd that burnt my whole sprint time :/10:14
ttxThat's what I get for pretending to know what I'm doing10:15
Zarahahaha, thanks for your help, I'll look in a bit (and thanks for reviewing, too!)10:35
ZaraI never have any idea what I'm doing. \o/10:36
*** rfolco has joined #openstack-sprint11:53
ttxHm, that one should look better12:05
SotKttx: looks good, thanks!12:54
ttxSotK: only drawback is that all events now take the full width. I've been trying to work around that unsuccessfully12:54
ttxprobably needs some extra div container so that width limits the outside container but the text with the border inside can potentially be smaller12:55
*** baoli has joined #openstack-sprint13:01
SotKmaybe setting max-width rather than width would work?13:02
*** david-lyle_ has joined #openstack-sprint13:32
*** baoli_ has joined #openstack-sprint13:33
*** baoli has quit IRC13:35
*** david-lyle has quit IRC13:36
*** baoli_ has quit IRC14:19
*** baoli has joined #openstack-sprint14:21
*** baoli has quit IRC14:43
*** baoli has joined #openstack-sprint14:48
*** baoli has quit IRC14:52
*** baoli has joined #openstack-sprint14:54
*** david-lyle_ is now known as david-lyle14:59
*** baoli has quit IRC15:15
*** baoli has joined #openstack-sprint15:23
*** baoli has quit IRC15:23
*** baoli has joined #openstack-sprint15:25
anteayattx: thanks for helping with teh sprint15:55
anteayaZara: yes, zaro wants additional information on what the gerrit storyboard plugin should do15:55
anteayait was important to me that it be functioning for yesterday and today so we could at least have a common understanding of current functionality15:56
anteayaalso, which I do believe that any measure of gerrit storyboard interaction is necessary to migrate everyone to storyboard I'm not convinced the task update status needs to be in place on the plugin as a blocker to migration15:57
anteayaso for my money, as far as what is needed from gerrit storyboard integration in order to migrate, I think we are there15:57
anteayawe can tweak the plugin after the migration in my book (or whilst the decisions are being made)15:58
Zaraokay, thanks for clarifying :)16:06
anteaya:)16:12
zaroyup, change id are currently linked to a story.  I guess it might make more sense to link it with a task?16:14
Zarayeah, I think so16:15
zaroSo maybe you can think about how that would work?16:15
Zarathere was a bit here: https://storyboard.openstack.org/#!/story/200058416:16
zaroi mean what should happen when a comment is made in a gerrit change?16:16
Zara(or one option is to be able to list either story or task, and use the former for comments, the later for status changes)16:16
zarojust my opinion but that might be over complicated for users16:17
zaroconfusing more than complicated16:18
Zarayeah, an alternative would be to derive the story id from the task, since a task can't be in multiple stories16:18
Zarait should be possible to do it that way, more work to implement and I haven't yet thought much about the implementation for that on the plugin side16:18
zarothat should be possible as long as there's an rest api for to do that16:19
zarocan't there be mutiple stories related to a task?16:21
Zarano. a story can be related to multiple projects, and a story can contain multiple tasks16:21
Zarabut each task will only be in one story16:21
Zarais https://storyboard.openstack.org/api/v1/tasks helpful at all?16:22
zaroyes, that would work.16:23
zarowhat about api to get a single task?16:23
Zarasomething like https://storyboard.openstack.org/api/v1/tasks/1 ?16:25
zarolooks good. probably all we need then.16:27
Zara\o/16:27
zarowhat's the transition you would expect? for example new patch for task 1 should do what?16:27
Zaraso, that's why I made the storyboard bot example thing, https://review.openstack.org/#/c/302912/4/storyboardclient/v1/storyboard_bot.py . the mapping is roughly okay16:28
Zarathe code is horrible, but that should show what should happen-- though one thing is that that currently replaces task notes with the commit message, whereas I'd rather append it16:29
Zaraso, new patch for task 1, task 1 changes status to review and has the commit message appended in the task notes16:29
Zarathe task notes might get a bit weird after a while but eh, first pass16:29
zarothat's  all that task notes should contain?  what if sb user manually changes notes?16:33
zarohmm, how does a user even find a task id?  i don't see any references to task ids from UI or url.16:34
Zarathat's why I want it to append them, rather than replace them, so the manually-added notes are kept. it does mean they'll end up with a lot of noise where a patch is updated a lot, so if that's going to be annoying then I'm fine with it not updating them at all (or if someone thinks of something better, go for it, but that was as far as I got)16:35
Zaraah, yeah, I have a patch for displaying task ids in the ui16:35
ZaraI think it needs a rebase, it's old16:35
Zaraatm there's no nice way to do it, gimme a sec16:35
zarook, well. i think that's a requirement before changing from linking story to taskid16:36
Zarayes, agreed.16:37
zaroyou think you want gerrit plugin in place before or after changing links from story to task id?16:37
SotKI would append a link to the gerrit change rather than the commit message16:39
zaroSotK: you mean task notes?16:41
SotKyeah16:42
SotKappending the commit message each time seems like duplication for no reason16:42
pleia2does lp have things like this? I'd make it as similar to lp as possible16:42
zarolp doesn't have tasks, issues in lp are equivalent to stories i believe16:43
zaroso currently it really is equivalent to what lp does16:43
zaroexcept for the auto transition part16:43
SotKI'd also update the task status to "review" when a patch is sent, "todo" when a patch is abandoned (maybe some syntax in abandonment message to make it invalid instead, but that is a stretch goal), and "merged" when a patch is merged16:44
zaroSotK: yeah, we are talking about how we can get to a point where we can map transitions.  looks like there's a critical missing right now.  namely, how do SB users even find task ids to add to their commit message?16:46
pleia2lp does have tasks, let me see if I can find one with them16:48
fungiwell, lp has "tasks" which roughly correspond to a project and optionally a series16:49
zaropleia2: difference is that transitions happen on issues, not tasks?16:49
* pleia2 tried to load tasks, gets a timeout error \o/16:49
Zarahttps://review.openstack.org/#/c/272667/ there, rebased16:49
fungiit's how you can make a bug "affect" multiple projects, or multiple branches/releases16:49
anteayazaro: good question, the only way I know of finding the task id is by querying the api for all tasks on a story `story/11/tasks` then looking for the last id output in returned values16:49
anteayait isn't labelled task_id, just id as is story16:49
fungibut lp lacks the idea of multiple tasks for the same project+series afaik16:49
pleia2fungi: ah yes16:50
Zarazaro: https://review.openstack.org/#/c/272667/ the patch I mentioned, now with extra rebase.16:50
Zarayeah, would prefer to link url in the notes, not commit message, sorry.16:51
fungihere's a recent security bug with multiple tasks (assuming you reload enough times to not have lp time out on you like it did to me) https://launchpad.net/bugs/149080416:51
openstackLaunchpad bug 1490804 in OpenStack Identity (keystone) kilo "[OSSA 2016-005] PKI Token Revocation Bypass (CVE-2015-7546)" [High,Fix committed]16:51
ZaraSotK: that matches the mapping in the proof of concept bot, yay16:52
* fungi shakes fist at lp timeouts16:52
fungithere we go16:52
anteayathat worked? yay!16:52
fungiso you can see tasks for keystone (master and kilo), security advisories/notes, and several libraries16:52
fungithose are all "bugtasks" in lp's world16:53
fungithey can be assigned independently, with discrete status/importance and targeted at different milestones16:53
fungithe main improvement over that in the original sb design spec/poc was the idea that there could be a many-to-one relationship for tasks to projects in a story16:55
zarofungi: we currently link to an LP bug so I believe jeepyb only automates transitions for bugs not tasks correct?16:56
fungiwithout having to create fixed "series" for the projects to apply each task to16:56
fungizaro: sort of16:56
fungizaro: jeepyb looks up the bug number referenced, then tries to map the project and branch for the change to an equivalent project and series for that bug in lp, then updates the corresponding task if there is one16:57
zarook, i guess we are talking about doing the same with SB then.  lookup story from task id16:58
zaroupdate story if need and transition the task if needed.16:58
fungithe difference being, as i said, in sb there can be multiple tasks for any given project (getting rid of the series concept entirely there so branch mapping is irrelevant i think), so finding the right task might be hard16:58
fungiif i have a bug with two tasks for the openstack-infra/project-config repo and i merge a change to project/config referencing that story id, how do we know which task to change the status on?16:59
zaroyou a human finding the right task to add to the git commit message?16:59
fungiright, if there are fixed task identifiers, we could solve that by specifying the task id in the commit message16:59
anteayathere are task ids17:00
anteayaeach task has its own id17:00
fungiwhich is something we don't do in lp because the model is different17:00
fungiso just trying to outline the main distinction here as to why the finding algorithm we use in lp doesn't map directly to sb17:00
anteayahttp://paste.openstack.org/show/521708/ output from curl https://storyboard.openstack.org/api/v1/stories/11/tasks17:01
anteayafungi: ah thank you17:01
anteayadata from one task: {"status": "merged", "priority": null, "branch_id": 1, "title": "API Paging", "story_id": 11, "created_at": "2014-03-04T20:06:04+00:00", "updated_at": "2014-04-12T01:04:46+00:00", "assignee_id": null, "creator_id": null, "link": null, "milestone_id": null, "project_id": 456, "id": 15}17:02
SotKif you put the task id in the commit message you can just do `GET https://storyboard.openstack.org/api/v1/tasks/:id` and look at the "story_id" in the response, if you wanted the story ID for some reason17:02
anteayaso the id for that task is 15 and it has a story_id of 1117:02
fungithis might be a clean way to go about it... if you see a story id in the commit message but no task id, and there is only one matching task for that project in that story, then assume that's the task to act on. if there are multiple tasks for that project in the referenced story, don't alter the tasks only leave story comments. if there is only a task referenced in the commit message, and the17:02
fungiproject associated with the task matches the project for the change, assume that's the task to update and its corresponding parent story is where you should leave the comments17:02
anteayafungi: that seems reasonable17:03
anteayazaro: is that doable?17:03
fungiso we optimize for the typical case, and we have a safe fallback for the corner case with a more specific solution people can implement if they need to get granular17:04
SotKhm, I suspect we will need to be careful to check that someone hasn't put a story id when they meant to put a task id17:04
zaroit seems like it all can be driven with task id, not sure why we would need story id?17:04
fungitrue, though for lp we mitigate typos by double-checking that the bug has a task associated with the project for the change17:05
fungizaro: i guess we could mandate only matching the task id, however for bug migration purposes if we want to still link from historical changes to bug ids (which will be a 1:1 match for story ids during migration) then we still need the concept17:06
zarobug id?  are you refering to LP or SB?17:07
fungiso we could in theory just stick with story/bug ids as links in changes, but only actually update stories if there's a task mentioned in the commit message17:07
fungiif i say bug id i mean lp, but after migration we're going to have a bunch of changes that have commit messages saying things like "closes-bug: 1234" which we can link to story 1234 in sb17:07
openstackbug 1234 in Launchpad itself "Gina is an unmaintainable mess of command line options, environment variables and shell scripts" [Medium,Fix released] https://launchpad.net/bugs/1234 - Assigned to Daniel Henrique Debonzi (debonzi)17:07
fungigrrr17:08
fungisilly bugbot17:08
anteayaha ha ha17:08
fungibasically trying to make sure that following links from old changes takes us to the migrated lp bugs which are now stories in sb17:09
fungiso that could just be a matter of updating our commentlinks regex for those, and the its-storyboard plugin for gerrit could only care about task ids17:10
zaroi see.  makes sense17:10
fungithat's a pretty significant difference in behavior though, so merits some additional discussion in case others can think of issues with that i'm not seeing17:11
zaroi guess this means we should have everything on SB side to support task ids before installing its-storyboard plugin?17:12
anteayafungi: can we perhaps add this as an item for next week's infra meeting?17:12
anteayathen we can get some agreement and move forward17:12
zaroi will be vacationing next week17:12
anteayazaro: ah okay17:12
fungifor example, if there's an outstanding change proposed for bug nnnn, and then we migrate lp bugs into storyboard, and then that change lands it's not going to update sb to indicate that if we're only matching on task ids in the plugin. however that's an eventually consistent thing we can maybe just live with until it shakes out17:12
anteayazaro: how long are you off?17:12
zarountil 7/417:13
anteayaare we having a meeting July 5th?17:13
fungiand if people really care about making sure the story for their outstanding change gets updated after the migration, they can always adjust their commit message with a new patchset to link the correct task id instead17:14
pleia2I'll be around July 5th17:14
anteayafungi: yeah I think our fallback is update it by hand17:14
zaroisn't next meeting 6/28?17:14
fungianteaya: i'm having a meeting july 5th. anyone who wants to is free to join me, but if they have other things to do then that's (as always) perfectly fine17:14
fungizaro: yep17:14
anteayabut yes do our best to integrate as a result of the move17:14
anteayazaro: you said you are away next week17:15
anteayazaro: so I asked about the week after17:15
anteayaI'm glad we are talking about it and getting ideas17:15
zaroohh yeah, should be able to join then17:15
anteayabut it would be nice to say we'll decide at the latest on the 5th of July meeting17:15
anteayagreat17:15
anteayaif we decide before, so much the better17:16
anteayazaro: so does this seem doable to you?17:16
fungiso anyway, if it's easy to solve for that consistency issue in the plugin and allow people to use story ids for convenience indefinitely when they don't need to be specific about a task id, then great. if it's not trivial to accommodate then we can always put the onus on the people who care about it to either fix it or use less convenient workarounds17:16
anteayaI'm happy we have something in place, we already have at least one happy customer in #storyboard who feels the current interation is tight17:17
anteayaso I'm really pleased17:17
fungiwe could also consider a syntax like "story: xxx:yyy" to indicate the task, rather than just going with a raw task id in a vacuum17:17
anteayafungi: that would be interesting17:18
zaroyeah, i think it's doable.  just need to merge zara's patch to locate task ids17:18
anteayaif two arguments the second is task id, if just one argument just story id17:18
fungiand punt to the easy case of just commenting on the story mentioned if the :yyy task suffix is missing, but update the task status if someone specifies the :yyy17:18
anteayayeah17:19
fungiit's a less convenient syntax, but perhaps less ambiguous17:19
fungianyway, this is all design bikeshed17:19
zaroit's probably easier to have two seperate links, story: xxx and task: yyyy17:19
anteayaI think it also informs the user of their options because of the design syntax17:20
anteayazaro: oh17:20
anteayazaro: well whatever you can put in place17:20
fungiyep, looking for separate headers would make sense as an alternative17:20
anteayaif we make it too hard, we don't get anything since you get busy with other things17:20
fungiright, i don't want to get overly specific on designing this, there are several ways to go about it and i'd rather the people doing the implementation pick solutions that address use cases they see as important in ways which make sense to them17:22
anteayamakes sense17:22
zaroZara: can users get to a task from a url on the SB ui?17:22
fungiand i trust the people doing the development on sb and the plugin. they're all smart folks who make wise choices17:22
anteayathey have proven themselves to be17:24
anteayaquestion: Zara would like the api doc examples to point to the storyboard-dev server as opposed to the storyboard server, any thoughts or objections to that suggestion?17:24
anteayazaro: I'm unable to navigate to a task using the task id in the url17:26
anteayaZara: very pretty orange17:27
zaroso i guess action plan is to be able to identify task ids (zara's change) then make changes to its-storyboard to update (comments/transitions) tasks and related story.  test on review-dev.o.o then install on review.o.o17:28
zarodoes that sound about right?17:28
anteayathat workflow works for me17:28
Zarathat sounds right to me :) (also yeah, I don't think it's possible to get to a task from an url on the ui)17:29
zarothat would be nice, but i guess probably not necessary for its-storyboard to do its thing.17:30
anteayaZara: noone objects to your suggested use of storyboard-dev in the api doc examples so I'm going to get something to eat and then I'll make that change, thank you17:30
Zara\o/17:30
Zaraand thanks everyone for being so flattering! :D17:31
anteayayou are awesome17:31
anteayaas are SotK and pedroalvarez17:31
anteayawooo team!17:31
pleia2oh, I met one of their colleagues at an openstack event last week17:31
anteayaoh?17:32
pleia2promptly forgot his name, because that's what I do17:32
anteayadescribe him17:32
pleia2white dude, taller than me17:32
anteayawhat did he talk about?17:32
Zarauh oh.17:32
pleia2he said he recognised me from the summit and said he worked with Zara and SotK17:32
anteayawas it Danny?17:33
anteayadark hair, close cut17:33
anteayalarge gentleman?17:33
pleia2it was in SF, I think he's based somewhere around here?17:33
pleia2could be17:33
zaroi'll need to know how to update a task status from REST api, doesn't look like that's in the documentation17:33
anteayaDanny has been in California since after summit17:33
pleia2ok, probably him then :)17:33
anteayazaro: key17:33
pleia2he was nice17:33
Zara7 ft lebanese guy? :D17:33
Zaraif it's him, he goes by dabukalam on irc17:34
anteayazaro: http://docs-draft.openstack.org/46/332946/14/check/gate-storyboard-docs/3b4578a//doc/build/html/webapi/v1.html#put--v1-stories--story_id--tasks17:34
anteayazaro: here is the patch: https://review.openstack.org/#/c/332946/17:34
anteayazaro: as I say in the comment in the tasks file: Key is one of: "key": "review", "key": "todo", "key": "invalid", "key": "merged", "key": "inprogress"17:35
anteayazaro: let me know if you need more17:35
anteayapleia2: Danny is awesome nice17:35
anteayait was likely Danny, persia you know and I don't know anyone else involved with codethink in attendance17:36
anteayabesides Zara and SotK17:36
anteayapleia2: you have yet to meet pedroalvarez, who is awesome17:36
pleia2indeed!17:37
pleia2the in person storyboard sprints always sneak up on me17:37
zaroanteaya: that one requires knowing the story id, would prefer to use the 'PUT /v1/tasks' endpoint17:37
zarohttp://docs-draft.openstack.org/46/332946/14/check/gate-storyboard-docs/3b4578a//doc/build/html/webapi/v1.html#put--v1-tasks17:37
anteayazaro: ah okay17:38
anteayazaro: I haven't gotten around to documenting an example for that one yet17:38
zarook. keep me posted. thanks.17:38
Zarayes, they're both ace :)17:42
anteayazaro: working on it, so far I haven't found the right incantation17:44
ZaraI'm heading home soon; unfortunately I've only changed task-statuses via the python client and the webclient so I can't help with the incatation.17:46
Zara*incantation17:47
Zaraahh, timezones :)17:48
ZaraI can check both channels every so often this evening17:50
anteayaZara: thanks for a great two days17:51
anteayaenjoy your evening17:51
anteayazaro: I'm going to get some food and come back to this17:52
anteayazaro: I'll let know now if I find it17:52
anteayas/now//17:52
persiaJust to add to the bikeshedding above: I believe comments on changes in gerrit should not be copied to the story.  One of the issues I had with LP was do-called "workflow bugs" which only exist to allow developer discussion about an implementation, independent the discussion about the problem.  Having separate comment streams in gerrit and SB ensures that different audiences can usefully consume appropriate messages17:54
persiaThat said, it is all bikeshedding, so if others feel differently, I do not mind.17:55
anteayapersia: thanks for picking up a brush and joining in :)17:57
zaropersia: shouldn't be difficult to accomodated either use case, should be just configuration to do that.17:59
zarobut i'm sure well all have better idea once its setup and we can ajust to taste.18:00
persiazaro: yep :)18:00
persia(for clarity, I do not actually have an SB instance anywhere: I'm just very opinionated about requirements tracking)18:01
*** zara_the_lemur__ has joined #openstack-sprint18:43
anteayazaro: http://paste.openstack.org/show/521729/19:11
anteaya'https://storyboard-dev.openstack.org/api/v1/tasks' -X PUT19:11
anteaya--data-binary '{"task_id":20,"status":"merged"}'19:11
anteayaso I don't know what key is here19:12
anteayabut status is what you need to use here19:12
anteayaand apparently you don't need story_id here19:12
anteayazaro: this is how you update the assignee: --data-binary '{"task_id":20,"assignee_id":12}'19:25
anteaya12 it turns out is pedroalvarez19:25
anteayathis gets all your users: curl --insecure 'https://storyboard-dev.openstack.org/api/v1/users'19:28
anteayaI'm trying to see if I can get a user id if I give it a name19:28
anteayazaro: this gives you several results for users matching a search term: curl --insecure https://storyboard-dev.openstack.org/api/v1/users/search?q=James19:36
zaroanteaya: thanks.19:37
anteayawelcome19:38
anteayathis gives me an error: curl --insecure https://storyboard-dev.openstack.org/api/v1/users --data-binary '{"full_name":"Anita Kuno"}'19:38
anteayaso I don't know how I am supposed to offer up the full_name parameter19:39
anteayabut is says I should be able to: http://docs.openstack.org/infra/storyboard/webapi/v1.html#get--v1-users19:40
zara_the_lemur__I don't know the syntax for curl. fwiw https://storyboard-dev.openstack.org/api/v1/users?full_name=Anita%20Kuno works as a link, so I think it's just a matter of finding the right syntax19:45
anteayazara_the_lemur__: thank you19:45
anteayathat is the syntax curl will accept too: curl --insecure https://storyboard-dev.openstack.org/api/v1/users?full_name=Anita%20Kuno19:46
anteayaI don't know if that is the only syntax but this syntax works19:47
anteayawooo19:47
anteayaso I am going to update the api docs againg19:47
anteayaagain19:47
anteayaI can't get delete to work and suspect it won't work via the api, so I will just remove the TODO on delete for now and disccuss more when folks have time19:48
anteayaI'll add bits for tasks in a separate patch19:48
anteayazaro: zara_the_lemur__ found the syntax to query for user output based on name19:49
anteayaso search works and full_name if full_name in gerrit matches full_name in storyboard19:49
anteayafungi: is it safe to assume full_name in gerrit matches full_name in storyboard since they both use openid?19:50
funginot really safe, no19:50
anteayahmmm19:50
fungigerrit uses the openid data it gets at first login to populate its database19:51
fungihowever, after that gerrit allows you to change your name19:51
anteayaah19:51
zara_the_lemur__anteaya: okay, thanks :) glad I could help, given I know pretty much nothing about curl! there might be better ways of doing things that I don't know about; hopefully someone with stronger api skills can look over things later.19:51
* zara_the_lemur__ vanishes again19:51
anteayazara_the_lemur__: working suits me fine19:51
fungithere is no guarantee the full name reported by openid matches the full name tracked in gerrit at an arbitrary point in the future after account creation19:51
anteayaif someone wants to throw stones I'm an easy target19:51
anteayazara_the_lemur__: thanks for your help!19:51
anteayafungi: okey dokey19:52
anteayazaro: I guess we are at some combination of search and full_name to get storyboard user_id19:52
clarkbanteaya: fungi you can also change your full name in gerrit19:52
anteayatoo bad the user api didn't allow searching on openid19:52
anteayaclarkb: yeah19:52
clarkbat https://review.openstack.org/#/settings/contact19:52
fungiclarkb: right, that was what i meant, but you can do it in lp too i guess, i should have mentioned it's both places19:53
anteaya:(19:53
fungianteaya: zaro: i suggest you try something similar to what we do in gerrit19:53
fungier, in jeepyb19:53
anteayaevery storyboard user has an openid which right now is a launchpad url19:53
anteaya"openid": "https://login.launchpad.net/+id/7PrMEYW" is mine19:53
fungiwe query launchpad using the openid url we have, and lp has a reverse lookup account by openid method in its api19:53
anteayawould that match with gerrit?19:53
anteayaah yeah okay19:54
fungimost of the time, yes19:54
anteayatoo bad we can't just query the storyboard user api with it19:54
fungi_if_ they log into gerrit with a different lp account than they log into sb with, it could get weird19:54
fungialso in a reasonable openid consumer system, the account may be associated with multiple openids19:54
anteayafungi: then they come running to us and someone looks at the db, is my prediction19:54
fungiso you might need to iterate through them19:55
fungianyway, it may be that we need the sb api to grow a "lookup by openid" feature19:55
anteayaokay so it looks like changing the status of a task is really easy task_id and status19:55
anteayabut setting assignee needs a user id19:55
anteayaand getting the user id looks more complex19:56
fungiso if the sb api had a method where we can query with an openid and get back the corresponding sb account id that would be great (or if any methods taking an account id optionally could take an openid string as well)19:56
anteayazaro: if you can do changing status with a task id for now that would be great, that looks like the simple one19:56
anteayafungi: yes I agree19:57
anteayafungi: I think if I am to look at that myself I would have to set up an instance of storyboard first19:57
anteayaI don't know of SotK or zara_the_lemur__ have changed the api in the past19:57
fungiso that the plugin could just say "i want task nnnn reassigned to the sb user with openid xxxx"19:58
anteayaso don't know what would be entailed on their end19:58
fungiand then have sb act on that, would simplify things greatly19:58
anteayafungi: yeah, that would be so much easier, then all the other lookup loops19:58
anteayaagreed19:58
anteayaokay I don't know how to extend the api but I think in this instance it is worth examining19:59
anteayahopefully someone will beat me to it19:59
fungithis is, for example, one of the things gerrit's api does well (though it's missing openid as an identifier option), you can identify an account in an api call by id or username or e-mail address19:59
fungior full name19:59
anteayaright, choices19:59
anteayareasonable ones19:59
anteayamost user accounts on storyboard right now don't have an email19:59
anteayaeveryone's email is null20:00
anteayasince you don't need to set it to sign in I don't predict many folks will bother setting it20:00
fungimakes for fewer api calls/round-trips if you have only one of those pieces of information since the api doesn't insist on only accepting the index id20:00
anteayawell null email on the -dev server anyway20:00
anteayaright20:01
fungiso you don't have to start with a lookup query to map to the account number and then make a separate call to use it20:01
anteayayup20:01
anteayasomeone was thinking20:01
fungianyway, that's _probably_ a simple addition to the sb api, but i say that having not looked closely at that part of teh codebase and as someone who likely won't have time to implement it20:01
fungitherefore, grain of salt and whatever20:02
anteayaI'm sure it would be simple for someone20:02
anteayahefty grain of salt if this ends up on me20:02
SotKregarding `DELETE /v1/stories/:id`, I think only admins can do it20:04
anteayaSotK: okay thanks, any thoughts on how I should document that?20:05
* SotK doesn't really know20:05
SotKmaybe a note that its admin only near the example20:05
anteayaI can't create the example20:05
SotK(I think the 405 you got was because of a typo in your command last night, it said "-DELETE" instead of "DELETE")20:05
anteayacould an admin give me the example command?20:06
anteayadid it, thank you20:06
SotKwould you like me to write a quick patch for lookin up users by openid url?20:07
SotKs/lookin/looking/20:07
anteayaSotK: oh would you?20:07
anteayayou are awesome20:08
SotKuser accounts will have an email btw, we just don't have it publically accessible20:08
anteayayes, I would like that20:08
anteayaoh okay20:08
SotKI don't think the openid url is either, but I don't see any reason to disallow lookups20:09
anteayathanks20:09
SotKthough, maybe it is if you see users as having it20:09
anteayaI can see all users openid's20:09
anteayacurl --insecure 'https://storyboard-dev.openstack.org/api/v1/users'20:10
anteayas/did it, thank you/did I? thank you20:13
SotKargh, my VM here is being super slow today20:21
anteayait happens20:23
SotKanteaya, fungi: https://review.openstack.org/33356720:26
SotK`GET /v1/users?openid=dQxpCYE` will find me with that patch for example20:27
*** Daviey has quit IRC20:27
*** Kiall has quit IRC20:27
*** zaro has quit IRC20:27
*** morgabra has quit IRC20:27
*** natorious has quit IRC20:27
* SotK tries using the full url20:27
*** Kiall has joined #openstack-sprint20:27
fungiright, at least as far as precedent, launchpad's api allows account lookup by openid, and gerrit's api allows account lookup by e-mail. they're both relatively innocuous20:28
fungiSotK: neat, so it's just a substring match on the openid field then?20:29
SotKyep20:29
*** morgabra has joined #openstack-sprint20:29
anteayaSotK: what does your full curl command look like if you don't mind20:29
*** natorious has joined #openstack-sprint20:30
* SotK did it in browser, one sec20:30
anteayathanks20:30
*** zaro has joined #openstack-sprint20:32
*** Daviey has joined #openstack-sprint20:34
*** rfolco has quit IRC20:35
SotKanteaya: `curl --insecure https://storyboard-dev.openstack.org/api/v1/users?openid=dQxpCYE` will work once that patch is merged20:35
*** rfolco has joined #openstack-sprint20:35
anteayathanks20:39
anteayaSotK: we are waiting on a review from zara_the_lemur__ the merge that patch?20:40
anteayato merge20:40
anteayaSotK: any idea if we can also find by email?20:41
SotKaye, or someone else with +2 on that repo20:41
SotKI can write a patch for it20:41
anteayathanks20:41
SotKI'll update that one actually20:41
anteayawill it work even if you can't find the email via the api?20:41
SotK(others with +2 on that repo are NikitaKonovalov and infra cores iirc)20:42
anteayathe api won't show me emails because you said you told it not to20:42
SotKyeah, it will do20:42
anteayaSotK: cool thanks20:42
anteayaSotK: I'll wait on your update then bug20:42
SotKI don't see a problem with being able to say "does this email have an account", since that is less likely to be used as a vector for obtaining email addresses I imagine20:42
anteayaI think so too20:43
SotKanteaya, fungi: https://review.openstack.org/333567 now with emails!20:53
fungiSotK: well, allowing to search for account by e-mail address substring allows for brute-forcing e-mail addresses in very few steps (you can guess one character at a time rather than having to guess them all at once)20:53
fungiSotK: for our use case i don't really care because we treat e-mail addresses as entirely public data, but other organizations might20:54
fungiso up to you how you choose to try and secure that20:55
anteayafungi: would you prefer email was not added to the api?20:56
fungii don't have a preference, though it seems useful20:56
anteayait seems useful to me too20:56
fungiit would probably be just as useful though if e-mail address and openid lookups were full-string rather than substring matching20:56
anteayabut yes, back to SotK's email information concern regarding hiding all the email info, this could compromise that position20:57
fungii have no idea if that's significantly more complicated with the current implementation20:57
anteayaoh a match rather than a filter20:58
SotKhm, actually, the api doesn't return the email addresses in the result20:58
anteayaSotK: yeah that is what I was seeing20:58
anteayaall my returned email addresses are null20:59
anteayaon -dev anyway20:59
fungimy point was that if you can substring match on e-mail address, even if it doesn't return the address, you can quickly figure out what addresses are in use21:00
fungistart, say, matching on @openstack.org and you see a handful of accounts returned, then a@openstack.org and nothing, try b@openstack.org ... when you try y@openstack.org you'll find my account coming back again, so now try ay@openstack.org... et cetera21:01
SotKthat makes sense, I'll make it full-match on emails21:01
anteayaonly four James on storyboard all have email null21:01
fungieventually you find that jeremy@openstack.org returns exactly one account and <anything>jeremy@openstack.org never returns any matches, then you know that's a valid e-mail address21:01
fungiprobably a few thousand api calls to get there, but not that many when it comes to automating stuff with computers21:02
fungiokay, more than a _few_ thousand, but it changes the work factor from something like 6^26 to something more like 26^621:03
*** rfolco has quit IRC21:03
SotKdo we care about openids being substring matched too?21:04
fungiand that's of course for a completely uninformed brute-force run. with some heuristics that could come way, way down21:04
fungiSotK: i don't personally, but i also don't see a lot of point in substring matching on an openid21:04
fungiit's sort of like being able to say, "return all the accounts whose index number ends in the digits 361"21:05
fungieither you have the whole openid and can query with that, or you're going to use something else21:05
SotKheh, the point was it was less code to do it that way, but now that is irrelevant21:06
fungithe situations where you usefully have only part of an openid is basically nil21:06
fungiyep, i get why it was done that way (name searches are useful that way)21:06
fungiparticularly for auto-completion21:06
fungie-mail addresses _could_ be useful that way (gerrit does that, for example) but gerrit also doesn't attempt to hide e-mail addresses. you can just query up a whole list of them if you like21:07
fungiif you do care about securing e-mail addresses, then subscring matches for them through the api is a questionable choice21:07
clarkbfungi: which makes sense considering they are all published in the git trees anyways21:07
fungiclarkb: well, yes and no. if you submit a patchset it will be in the commit, and if you leave a vote it may be in got notes, but if you're just browsing and have an account there it's not necessarily going to show up in git21:08
clarkbthats true, but browsing also doesn't require an account or email addr to be provided21:09
fungiregardless, i agree gerrit's use case is different enough from storyboard's that its api choices may not be reasonable in the other context21:09
persiaYes, but watching does.21:09
SotKfungi, anteaya: https://review.openstack.org/333567 now only with full matching21:30
anteayayay full matching21:31
clarkbpersia: good point21:32
fungiSotK: cool--thanks!21:36
anteayafungi: clarkb if you want to approve that patch so that zaro can keep working, that would be great21:38
anteayaI can fix my docstring nit in a follow up patch21:39
fungiwas just waiting for tests to come back on that last patchset before looking closer21:40
clarkb333567?21:41
clarkbI am not super familiar with that code base so would prefer to not approve changes there21:41
anteayaclarkb: yes, and fair enough21:43
anteayafungi: yup, makes sense21:43
fungithe change looks reasonable, and at this point i don't know of anyone more familiar with that code base than the author of the change, so willing to approve it if tests pass21:46
anteayafungi: thank you21:46
fungiis gate-storyboard-js-integration expected to fail? i see it's nonvoting but not sure if that's for other reasons21:53
fungiERROR: unknown environment 'grunt'21:54
anteayayeah I have seen that a lot21:55
anteayaI can't recall the reason21:55
zara_the_lemur__heh, yeah, that test is broken atm. (I'm heading off to bed now, but will take a look at patches in the morning if necessary)21:55
anteayabut I have seen that error in the past21:55
anteayazara_the_lemur__: thank you21:55
zara_the_lemur__'night!21:56
anteayazara_the_lemur__: enjoy sleep21:56
*** zara_the_lemur__ has quit IRC21:56
SotKyeah, it doesn't work on any change to openstack-infra/storyboard, and we haven't ever had time to devote to fixing it21:57
*** baoli has quit IRC21:57
SotKthat is why it is non-voting (plus idk how implemented the test part of it is)21:57
anteayashould we move it to experimental do you think?22:00
anteayauntil someone has time to spend fixing it?22:01
anteayano sense having it run everytime if it always fails and noone looks at it22:01
anteayahttps://review.openstack.org/#/c/333604/22:08
anteayathanks Adam22:16
SotKyw :)22:18
SotKthanks for the patch22:18
anteaya:)22:19
anteayawelcome22:19
anteayafungi: jenkins is happy in all but one test https://review.openstack.org/#/c/333567/4 we are demoting that test: https://review.openstack.org/#/c/333604/22:20
anteayapleia2: would you have time to try a delete command and see if you can get it to work?23:12
anteayapleia2: Adam feels only admins can delete and I'm not an admin23:13
anteayaif you get a command that works if you could add the command in a comment on my patch I'll include it23:13
pleia2anteaya: what should I try to delete?23:13
anteayaa story?23:14
pleia2ok23:14
anteayahttp://docs.openstack.org/infra/storyboard/webapi/v1.html#delete--v1-stories23:14
pleia2ah, with the api?23:15
pleia2in the web ui for https://storyboard-dev.openstack.org/#!/story/5 I have a "Remove this story" link23:15
anteayayeah with the api23:16
anteayaI do not have a "Remove this story" link when I view that story23:16
pleia2ok, so here's how the webui looks for me as an admin: http://princessleia.com/temp/Screenshot_2016-06-23_16-15-42.png23:16
anteayathis is for an example for the api docs23:16
pleia2crafting my api command now23:16
pleia2thanks23:17
anteayathank you23:17
anteayapleia2: here is my view: http://imgur.com/q8GDR9Q23:18
anteayaand I'm the author23:18
anteayaand not an admin23:18
pleia2if I delete every story in the dev instance, tell them it was someone else23:23
anteayaha ha ha23:24
pleia2taking me a few minutes while I figure this out :)23:26
anteayaI _totally_ understand23:27
anteayathe amount of time Ihave to spend on each command is exactly why I wanted the docs to have examples23:28
anteayano way we are going to be able to sell this great api to folks unless they can use it23:28
pleia2struggling to figure out what we want in the json23:33
pleia2doesn't want the id:23:33
pleia2looking at the code23:34
pleia2aha! story_id23:35
pleia2ok, this is what we want:23:35
pleia2curl -X DELETE 'https://storyboard-dev.openstack.org/api/v1/stories' -H 'Authorization: Bearer TOKEN' -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json, text/plain, */*' --data-binary '{"story_id":5}' --insecure23:35
pleia2where "5" is the story_id23:36
pleia2also, I hope you don't mind that I deleted your story :)23:36
anteayanope that is what is was there for23:37
anteayaand thank you23:37
anteayayay a command that works!23:37
anteayacan you add that to my patch as a comment?23:37
pleia2sure23:37
anteayathanks23:37
anteayahave you the strength to try to delete a task now? http://docs.openstack.org/infra/storyboard/webapi/v1.html#delete--v1-stories--story_id--tasks23:37
anteayahopefully the command is similar23:38
anteayaI got 404: GET /api/v1/stories/5: Story 5 not found23:38
anteayaby the way a whole lot of these errors are really unncessary23:39
pleia2sure, can you find a deletable task for me while I poke at the API?23:39
anteayaany 404 redirects me to the dashboard anyway23:39
anteayayes23:39
pleia2yeah, same23:40
anteaya{"status": "merged", "priority": "medium", "branch_id": 153, "title": "Task Foo", "story_id": 11, "created_at": "2016-06-23T18:59:29+00:00", "updated_at": "2016-06-23T19:24:02+00:00", "assignee_id": 12, "creator_id": 13, "link": null, "milestone_id": null, "project_id": 153, "id": 20}23:40
anteayathat should be a good one to delete23:40
anteayathe task id is at the end: 2023:41
pleia2ok, let me bring it up in the webui so i can see before/after23:41
anteayahttps://storyboard-dev.openstack.org/#!/story/1123:41
pleia2story 1123:41
anteayayup23:41
pleia2success \o/ adding this comment in the review too23:42
anteayayay23:42
anteayathanks so much23:42
anteayaoh can you add the output too?23:42
anteayazaro asked for the examples to provide their output23:43
anteayahopefully it is a page up away23:43
pleia2neither had any output23:43
anteayaoh okay thanks23:43
anteayajust gave you back your cursor23:43
pleia2ok, saved inline in gerrit23:45
anteayathank you so much23:48
pleia2happy to help :) with these examples documented we should be the last people to struggle through this!23:49
anteayaoh I do hope so23:50
anteayaI hope then the other sections at least follow some of the patterns23:50
* pleia2 nods23:50
anteayaI would like to get the stories section agreed to and merged then work on the other sections23:50
pleia2nice work on tackling this, it's going to be a huge help23:52
anteayathank you23:55
anteayaI've been doing curl url -x REST ACTION23:55
anteayawill your delete still work if I move the rest action after the url?23:56
anteayaI think it will23:56
anteayaoh and that should be capital x there23:56
anteaya-X23:56
anteayapleia2: ^^23:56
pleia2it didn't matter where --insecure went, so I have no reason to believe moving the -X DELETE flat won't do the same23:57
pleia2s/flat/flag23:57
anteayaokay thanks23:58
pleia2I'll confirm with another task on that story23:58
anteayaawesome thanks23:58

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