Thursday, 2014-10-30

krotscheckzaro: Then don’t - it’s there as a convenience tool.00:00
*** MaxV has quit IRC00:01
zarokrotscheck: so i still don't know how to make tests use my personal remote mysql db.  is there a way to do that?00:06
krotscheckzaro: I’m afraid not. It uses the defaults from openstack_citest which assumes 127.0.0.100:07
krotschecki.e. it’s hardcoded.00:07
*** reed has quit IRC00:22
*** MaxV has joined #storyboard00:56
*** MaxV has quit IRC01:01
*** rainya has quit IRC01:07
*** mgagne has quit IRC01:10
*** mgagne has joined #storyboard01:21
*** rainya has joined #storyboard01:21
*** mgagne is now known as Guest7651101:21
*** Guest76511 is now known as mgagne01:22
*** mgagne is now known as Guest5133901:23
*** openstackgerrit has joined #storyboard01:31
*** MaxV has joined #storyboard01:57
*** MaxV has quit IRC02:01
*** MaxV has joined #storyboard02:58
*** MaxV has quit IRC03:02
*** openstackgerrit has quit IRC03:10
*** tteggel has quit IRC03:22
*** anteaya has quit IRC03:37
*** omnibus7 has joined #storyboard03:38
*** davidlenwell has quit IRC03:40
*** mordred has quit IRC03:43
*** mordred has joined #storyboard03:45
*** anteaya has joined #storyboard03:45
*** MaxV has joined #storyboard03:58
*** MaxV has quit IRC04:03
*** MaxV has joined #storyboard04:59
*** MaxV has quit IRC05:03
*** MaxV has joined #storyboard06:00
*** jcoufal has joined #storyboard06:02
*** jcoufal has quit IRC06:03
*** jcoufal has joined #storyboard06:03
*** MaxV has quit IRC06:04
*** k4n0 has joined #storyboard06:37
*** alexismonville has joined #storyboard06:48
*** jtomasek_ has joined #storyboard06:51
*** MaxV has joined #storyboard07:01
*** MaxV has quit IRC07:05
*** alexismonville has quit IRC07:58
*** MaxV has joined #storyboard08:01
*** MaxV_ has joined #storyboard08:03
*** MaxV has quit IRC08:03
*** SotK has joined #storyboard08:04
*** ilyashakhat has quit IRC08:07
*** ilyashakhat has joined #storyboard08:19
*** alexismonville has joined #storyboard08:35
*** alexismonville has quit IRC08:49
*** jedimike has joined #storyboard09:22
*** alexismonville has joined #storyboard09:28
*** NikitaKonovalov has quit IRC09:51
*** SergeyLukjanov has quit IRC09:51
*** ruhe has quit IRC09:51
*** NikitaKonovalov has joined #storyboard09:53
*** ruhe has joined #storyboard09:53
*** SergeyLukjanov has joined #storyboard09:53
*** alexismonville has quit IRC10:24
*** jcoufal has quit IRC10:26
*** alexismonville has joined #storyboard10:51
*** jcoufal has joined #storyboard11:04
*** alexismonville has quit IRC11:11
*** alexismonville has joined #storyboard11:12
*** alexismonville has quit IRC11:13
*** miqui has joined #storyboard12:15
*** alexismonville has joined #storyboard12:20
jedimikemaybe I'm being dumb, but I can't see how the api supports pagination. You can supply a limit, but no offset to start at. If I want a page size of 10, and to get back the 100th page, I'd have to get back 1000 results and only render the last 10...?12:37
*** alexismonville has quit IRC12:53
*** MaxV_ has quit IRC13:13
*** MaxV has joined #storyboard13:19
*** MaxV has quit IRC13:22
*** MaxV has joined #storyboard13:22
*** MaxV has quit IRC13:28
*** MaxV has joined #storyboard13:47
*** MaxV has quit IRC13:49
yolandayes, i saw that as well14:01
yolandai didn't see any pagination samples in our code14:01
jedimikethere's a pagination story for the api, it's marked as done, but i can't see how it could be done, the api can't paginate14:01
jedimikeso wondering if I'm missing something14:01
*** coolsvap has quit IRC14:02
jedimikeyolanda, i watched about 6 hours of angular talks yesterday to get up to speed with controllers, services, directives, etc. :)14:02
yolandanice! you know more than me then, i just read some tutorials and started coding things14:02
yolandai got one change merged yesterday, i'm happy about it14:03
yolandaand i need to correct another one, just a simple reverse of order pending, but i've been super busy this week14:03
jedimikei'm pretty confident with it now, I have the front end able to change page, but I can't see how the backend supports it14:03
yolandai really like how storyboard encapsulates the jquery stuff, for lots of my code i should have dealt with the DOM, jquery show/hide... and in angular it looks so clean14:04
jedimikeyeah it's pretty nice once you understand how the injection and directives work14:04
jedimike`scope: true` doesn't quite work how I expected though, but there aren't too many examples of using that out there. People seem to prefer explicitly defining the scope14:05
jedimikeyolanda, so at the moment I have an input where you type in the page number, just to get the directive working :) but http://angular-ui.github.io/bootstrap/ has a load of directives for rendering all kinds of ui stuff, including pagers :D14:07
jedimikeso I'm not too worried about the presentation right now, more about getting the api calls working14:08
jedimikeso I'll probably refactor the pagination code anyway, put it into a decorator so that we're not repeating the same paginate_query call over and over in the codebase14:18
*** jtomasek_ has quit IRC14:30
*** jtomasek has joined #storyboard14:32
*** k4n0 has quit IRC14:34
*** wenlock has joined #storyboard14:36
*** miqui has quit IRC14:51
*** MaxV has joined #storyboard15:00
*** MaxV has quit IRC15:04
*** jtomasek has quit IRC15:19
*** MaxV has joined #storyboard15:23
*** alexismonville has joined #storyboard15:30
*** alexismonville has quit IRC15:37
NikitaKonovalovjedimike: the pagination is now supported through marker and limit parameters16:02
jedimikeNikitaKonovalov, ah! What is "marker"? Is that the same as offset?16:03
NikitaKonovalovmarker is an id of the last record that should be skipped from the begining of the list16:03
jedimikeoh16:03
jedimikethanks :)16:03
jedimikethat makes the ui slightly more complex...16:04
NikitaKonovalovthe records are returned ordered by id which is an incrementing automatically16:04
NikitaKonovalovuntill you set another order field and direction16:04
jedimikeah! that makes more sense :)16:04
jedimikeso, just like LIMIT ... OFFSET would work16:04
NikitaKonovalovif the records are never removed, then marker and the offset have the same sense16:06
NikitaKonovalovbut we do delete objects, so if you repeat a query with the same marker it still returns the result even if some objects with lower id have been deleted16:07
*** mattfarina has joined #storyboard16:08
NikitaKonovalovthe absolute offset in this case will return a different result16:08
jedimikeNikitaKonovalov, so is it just like ROWNUM in oracle, or OFFSET in postgres?16:08
NikitaKonovalovjedimike: unfortunately i've never worked with either oracle or postgres16:11
jedimikeNikitaKonovalov, I tried to get this url: /v1/stories?limit=10&marker=5&sort_dir=asc&sort_field=id&status=active but the marker parameter has no effect16:12
NikitaKonovalovjedimike: are you runnig StoryBoard locally, or you're sending requests to storyboard.o.o?16:13
jedimikeNikitaKonovalov, sorry, ignore that, it was cached :)16:13
jedimikethank you :)16:13
jedimikeyolanda, it's marker, not offset :)16:13
yolandamarker?!16:13
jedimikeyep16:13
jedimikemust be an SqlAlchemy term16:14
krotscheckIt’s an oslo thing16:14
jedimikesorry, i'm trying this out and it's not making sense to me16:18
jedimikeif I specify maker=10, will that start at the tenth result?16:19
jedimikemarker=10, even16:20
* jedimike switches on query logging to see what's going on :)16:26
krotscheckjedimike: If your first page result comes back with [{id:1},{id:5},{id:7}], and you then set marker=5, then you will get back [{id:7}]16:43
krotscheckjedimike: It’s supposed to go off of record ID, not off of page number.16:43
krotscheck(Mind you, it might not work? But I do have test coverage on it)16:43
jedimikekrotscheck, so it's the primary key of the record?16:43
krotscheckjedimike: yep16:44
jedimikedoesn't that make for some hideous sql, because you can't just say where (OFFSET|ROWNUM) > n16:46
jedimikeas soon as you order by anything but id, you have to do horrible things, don't you?16:47
krotscheckjedimike: Depends on the database. You’d have to dig into oslo.db to determine the details.16:47
jedimikei'm unclear why we're using the id as a marker and not using the built in offset capabilities of the database16:48
krotscheckI’m not really concerned at this time about supporting that, given how many abstraction layers are between us and raw SQL.16:48
krotscheckjedimike: Ok, assume that you’re paging through a rapidly changing data set, and you’re on page 500, and somewhere in pages 1-500 a bunch of records are deleted.16:49
krotscheckSo you refresh the page to see your changes and the entire data set changes.16:49
krotscheckbecause you used offset16:50
krotscheckBut if instead you think of paging as “Ok, I want all records after this one” then the location in the pages doesn’t really matter.16:50
jedimikeyes, and you have the same problems navigating pages going backwards because on each page, you have to retrieve the previous page as well to get the marker16:50
krotscheckAnd changes to the UI are restricted to the ones that directly impact the records you’re working on.16:50
jedimikeand that can change16:50
jedimikeso going forward through pages, that's fine, going backwards is more work and more queries and still volatile16:51
jedimikeand if you refresh the page, the only record guaranteed to be the same is the first one on the page16:52
krotscheckjedimike: I don’t really feel this is the right venue for this discussion, want to bounce over to #openstack-oslo?16:52
jedimikeyeah :)16:52
*** MaxV has quit IRC17:13
*** jcoufal has quit IRC17:24
*** tteggel has joined #storyboard18:02
*** jtomasek has joined #storyboard18:51
krotscheckNikitaKonovalov: Bug in production, with test coverage: https://review.openstack.org/#/c/131564/20:02
*** mattfarina has quit IRC20:52
*** mattfarina has joined #storyboard21:15
*** mattfarina has quit IRC21:37
*** coolsvap has joined #storyboard22:41

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