krotscheck | zaro: Then don’t - it’s there as a convenience tool. | 00:00 |
---|---|---|
*** MaxV has quit IRC | 00:01 | |
zaro | krotscheck: 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 |
krotscheck | zaro: I’m afraid not. It uses the defaults from openstack_citest which assumes 127.0.0.1 | 00:07 |
krotscheck | i.e. it’s hardcoded. | 00:07 |
*** reed has quit IRC | 00:22 | |
*** MaxV has joined #storyboard | 00:56 | |
*** MaxV has quit IRC | 01:01 | |
*** rainya has quit IRC | 01:07 | |
*** mgagne has quit IRC | 01:10 | |
*** mgagne has joined #storyboard | 01:21 | |
*** rainya has joined #storyboard | 01:21 | |
*** mgagne is now known as Guest76511 | 01:21 | |
*** Guest76511 is now known as mgagne | 01:22 | |
*** mgagne is now known as Guest51339 | 01:23 | |
*** openstackgerrit has joined #storyboard | 01:31 | |
*** MaxV has joined #storyboard | 01:57 | |
*** MaxV has quit IRC | 02:01 | |
*** MaxV has joined #storyboard | 02:58 | |
*** MaxV has quit IRC | 03:02 | |
*** openstackgerrit has quit IRC | 03:10 | |
*** tteggel has quit IRC | 03:22 | |
*** anteaya has quit IRC | 03:37 | |
*** omnibus7 has joined #storyboard | 03:38 | |
*** davidlenwell has quit IRC | 03:40 | |
*** mordred has quit IRC | 03:43 | |
*** mordred has joined #storyboard | 03:45 | |
*** anteaya has joined #storyboard | 03:45 | |
*** MaxV has joined #storyboard | 03:58 | |
*** MaxV has quit IRC | 04:03 | |
*** MaxV has joined #storyboard | 04:59 | |
*** MaxV has quit IRC | 05:03 | |
*** MaxV has joined #storyboard | 06:00 | |
*** jcoufal has joined #storyboard | 06:02 | |
*** jcoufal has quit IRC | 06:03 | |
*** jcoufal has joined #storyboard | 06:03 | |
*** MaxV has quit IRC | 06:04 | |
*** k4n0 has joined #storyboard | 06:37 | |
*** alexismonville has joined #storyboard | 06:48 | |
*** jtomasek_ has joined #storyboard | 06:51 | |
*** MaxV has joined #storyboard | 07:01 | |
*** MaxV has quit IRC | 07:05 | |
*** alexismonville has quit IRC | 07:58 | |
*** MaxV has joined #storyboard | 08:01 | |
*** MaxV_ has joined #storyboard | 08:03 | |
*** MaxV has quit IRC | 08:03 | |
*** SotK has joined #storyboard | 08:04 | |
*** ilyashakhat has quit IRC | 08:07 | |
*** ilyashakhat has joined #storyboard | 08:19 | |
*** alexismonville has joined #storyboard | 08:35 | |
*** alexismonville has quit IRC | 08:49 | |
*** jedimike has joined #storyboard | 09:22 | |
*** alexismonville has joined #storyboard | 09:28 | |
*** NikitaKonovalov has quit IRC | 09:51 | |
*** SergeyLukjanov has quit IRC | 09:51 | |
*** ruhe has quit IRC | 09:51 | |
*** NikitaKonovalov has joined #storyboard | 09:53 | |
*** ruhe has joined #storyboard | 09:53 | |
*** SergeyLukjanov has joined #storyboard | 09:53 | |
*** alexismonville has quit IRC | 10:24 | |
*** jcoufal has quit IRC | 10:26 | |
*** alexismonville has joined #storyboard | 10:51 | |
*** jcoufal has joined #storyboard | 11:04 | |
*** alexismonville has quit IRC | 11:11 | |
*** alexismonville has joined #storyboard | 11:12 | |
*** alexismonville has quit IRC | 11:13 | |
*** miqui has joined #storyboard | 12:15 | |
*** alexismonville has joined #storyboard | 12:20 | |
jedimike | maybe 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 IRC | 12:53 | |
*** MaxV_ has quit IRC | 13:13 | |
*** MaxV has joined #storyboard | 13:19 | |
*** MaxV has quit IRC | 13:22 | |
*** MaxV has joined #storyboard | 13:22 | |
*** MaxV has quit IRC | 13:28 | |
*** MaxV has joined #storyboard | 13:47 | |
*** MaxV has quit IRC | 13:49 | |
yolanda | yes, i saw that as well | 14:01 |
yolanda | i didn't see any pagination samples in our code | 14:01 |
jedimike | there'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 paginate | 14:01 |
jedimike | so wondering if I'm missing something | 14:01 |
*** coolsvap has quit IRC | 14:02 | |
jedimike | yolanda, i watched about 6 hours of angular talks yesterday to get up to speed with controllers, services, directives, etc. :) | 14:02 |
yolanda | nice! you know more than me then, i just read some tutorials and started coding things | 14:02 |
yolanda | i got one change merged yesterday, i'm happy about it | 14:03 |
yolanda | and i need to correct another one, just a simple reverse of order pending, but i've been super busy this week | 14:03 |
jedimike | i'm pretty confident with it now, I have the front end able to change page, but I can't see how the backend supports it | 14:03 |
yolanda | i 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 clean | 14:04 |
jedimike | yeah it's pretty nice once you understand how the injection and directives work | 14: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 scope | 14:05 |
jedimike | yolanda, 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 :D | 14:07 |
jedimike | so I'm not too worried about the presentation right now, more about getting the api calls working | 14:08 |
jedimike | so 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 codebase | 14:18 |
*** jtomasek_ has quit IRC | 14:30 | |
*** jtomasek has joined #storyboard | 14:32 | |
*** k4n0 has quit IRC | 14:34 | |
*** wenlock has joined #storyboard | 14:36 | |
*** miqui has quit IRC | 14:51 | |
*** MaxV has joined #storyboard | 15:00 | |
*** MaxV has quit IRC | 15:04 | |
*** jtomasek has quit IRC | 15:19 | |
*** MaxV has joined #storyboard | 15:23 | |
*** alexismonville has joined #storyboard | 15:30 | |
*** alexismonville has quit IRC | 15:37 | |
NikitaKonovalov | jedimike: the pagination is now supported through marker and limit parameters | 16:02 |
jedimike | NikitaKonovalov, ah! What is "marker"? Is that the same as offset? | 16:03 |
NikitaKonovalov | marker is an id of the last record that should be skipped from the begining of the list | 16:03 |
jedimike | oh | 16:03 |
jedimike | thanks :) | 16:03 |
jedimike | that makes the ui slightly more complex... | 16:04 |
NikitaKonovalov | the records are returned ordered by id which is an incrementing automatically | 16:04 |
NikitaKonovalov | untill you set another order field and direction | 16:04 |
jedimike | ah! that makes more sense :) | 16:04 |
jedimike | so, just like LIMIT ... OFFSET would work | 16:04 |
NikitaKonovalov | if the records are never removed, then marker and the offset have the same sense | 16:06 |
NikitaKonovalov | but 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 deleted | 16:07 |
*** mattfarina has joined #storyboard | 16:08 | |
NikitaKonovalov | the absolute offset in this case will return a different result | 16:08 |
jedimike | NikitaKonovalov, so is it just like ROWNUM in oracle, or OFFSET in postgres? | 16:08 |
NikitaKonovalov | jedimike: unfortunately i've never worked with either oracle or postgres | 16:11 |
jedimike | NikitaKonovalov, 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 effect | 16:12 |
NikitaKonovalov | jedimike: are you runnig StoryBoard locally, or you're sending requests to storyboard.o.o? | 16:13 |
jedimike | NikitaKonovalov, sorry, ignore that, it was cached :) | 16:13 |
jedimike | thank you :) | 16:13 |
jedimike | yolanda, it's marker, not offset :) | 16:13 |
yolanda | marker?! | 16:13 |
jedimike | yep | 16:13 |
jedimike | must be an SqlAlchemy term | 16:14 |
krotscheck | It’s an oslo thing | 16:14 |
jedimike | sorry, i'm trying this out and it's not making sense to me | 16:18 |
jedimike | if I specify maker=10, will that start at the tenth result? | 16:19 |
jedimike | marker=10, even | 16:20 |
* jedimike switches on query logging to see what's going on :) | 16:26 | |
krotscheck | jedimike: 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 |
krotscheck | jedimike: 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 |
jedimike | krotscheck, so it's the primary key of the record? | 16:43 |
krotscheck | jedimike: yep | 16:44 |
jedimike | doesn't that make for some hideous sql, because you can't just say where (OFFSET|ROWNUM) > n | 16:46 |
jedimike | as soon as you order by anything but id, you have to do horrible things, don't you? | 16:47 |
krotscheck | jedimike: Depends on the database. You’d have to dig into oslo.db to determine the details. | 16:47 |
jedimike | i'm unclear why we're using the id as a marker and not using the built in offset capabilities of the database | 16:48 |
krotscheck | I’m not really concerned at this time about supporting that, given how many abstraction layers are between us and raw SQL. | 16:48 |
krotscheck | jedimike: 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 |
krotscheck | So you refresh the page to see your changes and the entire data set changes. | 16:49 |
krotscheck | because you used offset | 16:50 |
krotscheck | But 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 |
jedimike | yes, 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 marker | 16:50 |
krotscheck | And changes to the UI are restricted to the ones that directly impact the records you’re working on. | 16:50 |
jedimike | and that can change | 16:50 |
jedimike | so going forward through pages, that's fine, going backwards is more work and more queries and still volatile | 16:51 |
jedimike | and if you refresh the page, the only record guaranteed to be the same is the first one on the page | 16:52 |
krotscheck | jedimike: I don’t really feel this is the right venue for this discussion, want to bounce over to #openstack-oslo? | 16:52 |
jedimike | yeah :) | 16:52 |
*** MaxV has quit IRC | 17:13 | |
*** jcoufal has quit IRC | 17:24 | |
*** tteggel has joined #storyboard | 18:02 | |
*** jtomasek has joined #storyboard | 18:51 | |
krotscheck | NikitaKonovalov: Bug in production, with test coverage: https://review.openstack.org/#/c/131564/ | 20:02 |
*** mattfarina has quit IRC | 20:52 | |
*** mattfarina has joined #storyboard | 21:15 | |
*** mattfarina has quit IRC | 21:37 | |
*** coolsvap has joined #storyboard | 22:41 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!