16:02:21 #startmeeting marconi 16:02:22 Meeting started Fri Aug 2 16:02:21 2013 UTC and is due to finish in 60 minutes. The chair is flaper87. Information about MeetBot at http://wiki.debian.org/MeetBot. 16:02:23 Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 16:02:25 The meeting name has been set to 'marconi' 16:02:32 Awesome. 16:02:41 :) 16:02:43 Yo yo guys!!!!!! 16:02:56 #topic agenda 16:02:56 yo! :P 16:02:59 #link https://wiki.openstack.org/wiki/Meetings/Marconi#Agenda 16:03:07 so, that's the agenda for today's meeting 16:03:25 lets get it started 16:03:29 Time to review some action items. :D 16:03:29 Can we also add a new meeting time to the agenda, plz? 16:03:32 #topic review action items 16:03:36 #link http://eavesdrop.openstack.org/meetings/marconi/2013/marconi.2013-07-18-19.05.html 16:03:59 cppcabrera: to turn apiclient-marconi etherpad into bps/bugs 16:04:18 I should've been more involved in that, sorry 16:04:21 I don't believe I got around to that. 16:04:23 any news about that ? 16:04:33 ok, lets schedule it for the next meeting 16:04:35 I may have done some Trello'ing, but that's a blur to me at the moment. 16:04:40 #action cppcabrera flaper87 to turn apiclient-marconi etherpad into bps/bugs 16:04:44 +1 16:04:56 cppcabrera: to tie up loose ends re python-marconicient v1 design 16:04:57 ? 16:05:13 Yes, there's been progress there. :) 16:05:15 #link https://wiki.openstack.org/wiki/Python_Marconi_Client 16:05:24 I've since added some ideas on pubsub design. 16:05:35 I still have some concerns. 16:05:46 cppcabrera: awesome, thanks! 16:05:55 I want to talk about openstack sdk/cli design with someone who's written such clients. 16:06:04 For example, I'm a little dubious about the naming of methods. 16:06:06 list 16:06:08 get 16:06:10 post 16:06:28 Is this something that worths a thread in the m-l ? 16:06:28 It's... very HTTP-targeted, when I, as a user of the SDK, think it terms of resources. 16:06:35 Like client.queues, etc. 16:06:41 I believe so. 16:06:47 s/it/in 16:06:50 We can get some of the best minds around this design process 16:07:01 m-l? 16:07:04 I'll start that discussion on the mailing list. 16:07:05 tedross: mailing list 16:07:16 awesome! thanks! 16:07:17 openstack-dev, woot. :) 16:07:33 flaper87: to investigate mongo insert performance 16:07:45 so, I did, I've some work done on that area 16:07:45 #action cppcabrera to ask about client design on mailing list 16:07:57 cppcabrera, pls feel free to reachout to tedross or me re client apis 16:07:58 there's still some work left there 16:08:07 whenry: Thanks! 16:08:09 we'll look at the link 16:08:12 let us know how we can help 16:08:24 woot! awesome. 16:08:30 tedross: whenry awesome, thanks guys! 16:08:39 Yes, much appreciated. :) 16:08:59 last action item was: to finalize placement service strategy 16:09:15 * cppcabrera looks for the wiki page... 16:09:20 I guess cppcabrera worked more on that one and we'll discuss it in the second part of this meeting 16:09:32 lets get to the next topic and then go back there 16:09:36 There was quite a discussion on that. Lots of progress there :) 16:09:40 pls let us know the process: e.g. is it, opesntac-dev [marconi] for banter around ideas and then someone will update the docs? 16:09:40 #link https://wiki.openstack.org/wiki/Marconi/bp/placement-service 16:09:55 oops sorry off topic 16:10:03 whenry: we discuss most of the things on #openstack-marconi 16:10:17 but, if there are some discussions that worth bringing up to the m-l, then we do it there 16:10:27 I actually added our IRC channel to the official list a few minutes ago, heh. :P 16:10:27 #topic Test re-factor and improvements 16:10:29 flaper87, ah, good to know. 16:10:35 * whenry adds to favs 16:10:44 cppcabrera: malini ^ 16:10:48 https://etherpad.openstack.org/marconi-test-refactoring 16:10:52 Floor is all yours 16:11:01 #link https://blueprints.launchpad.net/marconi/+spec/refactor-system-tests 16:11:17 Awesome, malini. 16:11:24 * whenry closes #opensack-marconi and fixes typo 16:11:40 whenry: lol 16:11:40 Can we first take a stab at the long term vision, how we want the tests organized? 16:11:49 malini: sure 16:12:09 Currently, I have some concerns about our functional tests. I think that as we're growing them now, they're getting a little fragile and need some DRYing up. 16:12:10 we have had quite some discussions around this & have it documented in the etherpad 16:12:43 cppcabrera: can you elaborate on the fragile part? 16:12:51 more specifics 16:12:54 malini and I spoke about it a lot offline, and I'll elaborate on that for sure. 16:13:08 malini: cppcabrera lets keep going on the structure and then get back there 16:13:12 There are two problems that I see wrt fragility. 16:13:14 +1 16:13:22 flaper87: +1 16:13:42 w.r.t structure, lets get all the tests out of the core marconi code 16:13:59 malini: AFAIS, the structure in the etherpad is much like we discussed, right? 16:14:01 1. There are hidden ordering dependencies in the test at the moment. They've been crafted up to this point very carefully, and I see that. However, when others start contributing tests, they might not be aware of the conventions and introduce subtle breaks. 16:14:04 am I missing something ? 16:14:43 malini: ^ 16:14:56 flaper87: yes, + we did some pokng around other OS repos & came up with what we have in the etherpad 16:15:00 2. The tests allocate resources and don't guarantee clean up of those resources in the presence of test assertion failures. 16:15:08 That's it for fragility. 16:15:18 those are bad for testing 16:15:31 that's why i +1 for using context manager 16:15:36 cppcabrera, zyuan: lets first address the structure part first 16:15:45 malini: I think the structure in the etherpad makes sense 16:15:50 does everybody agree on the etherpad? 16:15:51 Alright, structure. :) 16:15:57 zyuan: the fixtures lib gives you context manager for free 16:16:08 zyuan: with a bunch of common fixtures baked in 16:16:13 Yes, the structure looks good. 16:16:27 clarkb: iknow. just... they are not common 16:16:30 I think system should be on the same level as unit 16:16:49 cppcabrera: as in not under v1?? 16:16:51 So 'tests/{system, unit, smoke, ...} 16:17:03 where is the etherpad? 16:17:10 mmh, actually, I agree with cppcabrera 16:17:12 zyuan: https://etherpad.openstack.org/marconi-test-refactoring 16:17:25 then we should have {v1, v2} where needed 16:17:35 i.e: transport 16:17:42 cppcabrera: the argument somebody had for tht was unit tests won't change between versions 16:18:10 malini: +1. The unit tests should evolve with the code. 16:18:15 They are version agnostic. 16:18:24 cppcabrera: mmh, not sure about that 16:18:34 does system test use utils under tests/ 16:18:35 ? 16:18:54 If we make changes in the API, the API unittests for v1 will remain the same and then we'll have some for v2 16:18:54 zyuan: Not yet. 16:19:04 so, we need v1 and v2 under transport 16:19:28 flaper87: I see what you're saying. It makes sense to me. I typically envision unit test structure mirroring implementation structure. 16:19:56 I'm less certain about the structure of functional/system tests. 16:20:23 the functional tests are independent of the code structure 16:20:29 +1 malini 16:20:35 application code structure* 16:20:42 I feel like they should mirror the endpoints, instead. 16:20:51 so, what about unit and functional in the same level and then adding {v1,v2} under functional instead ? 16:20:51 it should be more in terms of functionality 16:20:59 to keep consistency in the structure 16:21:08 type/functionality/version 16:21:15 unit/transport/v1 16:21:16 flaper87: +1 16:21:18 I like the idea of that. 16:21:21 functional/transport/v1 16:21:43 functional/http/v1, functional/zmq/v1? 16:22:01 we can either do that or just have test_impl_zmq.py 16:22:07 and test_impl_wsgi.py 16:22:11 I'm good with both 16:22:35 Alright, I'm +1 with the proposed structuring. 16:22:36 yes.. functional/transport/http/v1 also seems good. 16:22:37 functional/v1/test_impl_wsgi.py 16:22:50 hmmm... 16:22:53 functional tests should be at a very high level 16:23:08 yes..tht's why we will not have functional/v1/test_impl_wsgi.py 16:23:11 it does not know about "transport", IMO 16:23:28 it only know "the procedures to use" 16:23:41 we'll have functional/v1/test_queue.py, functional/v1/test_messages.py, functional/v1/test_claim.py etc. 16:24:02 +1 malini. That matches up more clearly for me with the idea of testing endpoints. 16:24:10 or functional/v1/http/* ?? 16:24:22 functional/v1/zmq/* 16:24:22 Yeah, we might break it down by transport at some point. 16:24:22 ^^ yea 16:24:26 etc. ?? 16:24:29 When we get there. :) 16:24:34 if test_impl_wsgi is too large 16:24:35 s/might/should 16:24:38 break it into http/ 16:24:43 +1 16:24:51 why have version down inside the topology ? 16:24:59 instead of higher up? 16:25:10 sorry I missed that 16:25:13 whenry: consistency with the structure 16:25:19 type/../../ 16:25:21 unit/../ 16:25:24 functional/... 16:25:26 and so on 16:25:28 openstack test structure ? 16:25:33 not exactly 16:25:43 most projects do that, though 16:25:47 whenry: were you referring to v1 ? 16:25:53 so type might have a diff version than functional? 16:25:57 malini, yes 16:26:02 plus, functional tests can be used for other things than just transport tests 16:26:13 or does v1 mean the same v across these ? 16:26:16 what if we've a cache library we want to test ? 16:26:16 v1 is the application code version tht it'll test 16:26:22 we might need some functional tests for that 16:26:28 api version 16:26:29 that have to live under functional/ 16:27:13 16:26 UTC, Can we say we agreed on the structure ? 16:27:19 +1 16:27:42 I'd like to discuss the test strategy re: fragility. ^ 16:27:52 #action malini to update the etherpad and start working on the re-factor 16:27:54 cppcabrera: go ahead 16:28:34 I mentioned previously that the tests are fragile atm. 1) hidden ordering dependencies and 2) resources allocated not guaranteed to be cleaned up in the presence of test assertion failures. 16:28:47 * kgriffs is here - had to get a new chair and make it through the welcome gauntlet 16:28:49 I have a patch pending that addresses these issues, and I'd like to gather thoughts on that. 16:29:10 can I first address the two issues, before we discuss the patch ? 16:29:26 Certainly, malini. :) 16:30:05 The functional tests are designed to simulate user behavior 16:30:39 i.e follow sequence of events like create queue, post message, claim them, delete messages etc. , sort of what we expect in a real world 16:31:23 so for message tests, the system tests have a pre-requisite to create a queue 16:31:29 malini: iirc, there is a testing tool to use a | separated table to discribe it? 16:31:59 zyuan: you are refrring to robot framework ? 16:32:07 yea 16:32:15 we moved away from robot to nose, to make it easier for everybody to understand 16:32:27 +1 to that, malini 16:32:29 we all understand the need of action dependency 16:32:33 +1 for nose! :) 16:32:43 +1 for nose 16:32:44 ok..so back to what I was referring 16:32:47 just, such a dependency should not across tests 16:33:10 I agree that there is a place for tests that simulate random user behavior, and can get messy. 16:33:11 tht where we disgree 16:33:21 you can use context manager, fixture, or even very long tests if you want 16:33:22 Thanks to those tests, we were able to find the truncated JSON reply. 16:33:37 My argument is that the functional tests, or the system tests, are not the place for that. 16:33:46 yes, & we found it because we had data from the prev test 16:33:47 we need some form of test that is highly reproducible and consistent. 16:34:09 i have a suggestion 16:34:13 To guarantee that reproducibility, we need to eliminate dependencies across test case boundaries. 16:34:14 we found the truncated JSON because thesystem tests cud repro it consistently 16:34:16 IMHO random behavior is kind of like fuzzing in securty - it can find particular types of errors, but is probably less helpful than other types of tests. 16:34:25 put test in non-test member-functions 16:34:30 kgriffs: +1 16:34:30 we are not talking random behavior 16:34:32 and call them randomly, explicitly 16:34:55 namely, controlly messy 16:35:00 we are talking abt using the API realistically 16:35:16 malini: correct me if I'm wrong, but that is what the functional tests do today, right? 16:35:41 kgriffs: can you clarify the what in ur question? 16:35:48 I'd like to see functional tests being triggered by tox 16:35:51 with other tests 16:35:55 flaper87: +1 16:35:58 sorry, just confirming 16:36:05 tox -e nightly, tox -e smoke, tox -e system 16:36:10 :) 16:36:10 and IMHO, the functional tests suit should run marconi itself 16:36:19 flaper87: +1 16:36:34 * seems to agree with everything flaper87 has' 16:36:35 I think if we want to do random behavior (with 2-3 seeds for repeatability) that is a new bp 16:36:36 to me random behaviour testing (or using api realistically) falls under load testing (where diff scenarios are fed as inputs) 16:36:39 and we should do it later 16:36:47 Can we say that's the next step for our functional tests? 16:36:56 amitgandhi, malini: Makes me think of tsung. 16:36:59 clarification: we are NOT testing random behavior in system tests now 16:37:06 malini is right. 16:37:08 1) re-structure 2) run marconi 3) run with tox ? 16:37:12 The tests atm are NOT random. 16:37:23 They just have ordering dependencies. 16:37:28 right, I am just saying that we should not do a lot of work now to support that 16:37:30 They must execute as test_001, test_002, ... 16:37:33 Or an error occurs. 16:37:43 (to support arbitrary test ordering) 16:38:04 The work is done, kgriffs. :P 16:38:15 we already have tsung doing some of that, albeit not repeatable randomness 16:38:27 The work is done to support arbitrary ordering, I should say, 16:38:31 #link https://review.openstack.org/#/c/39369/ 16:38:40 cppcabrera: does it break linear testing? 16:38:44 will come to the patch soon 16:38:53 can we finish the discussion first? 16:39:05 malini: Yes. :) 16:39:10 kgriffs: Linear testing? 16:39:30 sorry, ordered testing, whatever you want to call it 16:39:42 functional testing, I guess 16:39:52 Is the "it" the patch? 16:39:53 So if we want to keep the tests independent, we should first have make sure that the pre-requisites are covered 16:40:05 'it' = patch 16:40:10 Cool. 16:40:22 The patch does not break ordered testing. 16:40:57 it doesnt make sense to have an independent list queues test that can run in parallel with create queue, if all list queue does is return a list with one ASCII queue 16:40:57 Could you elaborate on the pre-reqs, malini? 16:41:20 I don't think functional tests should be independent 16:41:21 hence the current ordering in today's tests 16:41:33 I'm missing something, I guess 16:41:38 flaper87: +1 16:41:46 I feel like I'm missing something, too... 16:41:49 ok 16:41:58 let me see If can summarize 16:41:59 I might be thinking of a different testing strategy that checks whether the API behaves as expected. 16:42:09 Versus what a user might do.. 16:42:11 it seems like we have two different kinds of tests in mind 16:42:15 Yes! 16:42:18 and trying to do it with a single set of tests 16:42:29 we need to guarantee the same behavior on each test run, which we do today 16:42:48 16:42 UTC (there won't be time for placement) 16:42:57 yeap, we are from different schools of thought 16:43:17 I am thinking user, cppcabrera is thinking code 16:43:18 I think it would be better to make a random-ish/load test as a separate thing 16:43:24 and factor out the common bits 16:43:32 that can be shared with functional tests 16:43:33 kgriffs: +1 16:43:39 kgriffs: +1 16:43:44 we dont have random-ish tests today 16:43:46 but that's a third test suit for me 16:43:52 malini: understood 16:44:09 unit, functional. random/load 16:44:21 load is tricky 16:44:35 unit, functional, random :P 16:44:36 :D 16:44:44 :P 16:44:45 I guess you would simulate kosher client behavior at the same time as naughty behavior 16:44:52 (to kind of simulate the real world) 16:44:54 the point of disagreement is, do the functional tests (within a test suite) need to be independent of each other ? 16:45:13 i want them to be independent 16:45:16 Yeah, I think it comes down to that. 16:45:18 I don't think so, since by definition, they are dependent? 16:45:24 or 16:45:37 functional tests are test 16:45:40 not simulation 16:45:41 is it a matter of just refactoring so each test does just-in-time setup 16:45:44 zyuan: +! 16:45:46 zyuan: +1 16:45:59 The dependencies are established at the suite level, and the test cases perform operations. 16:46:05 kgriffs: yes, that's what needs to be done! 16:46:12 I think test suite shud be independent, no the tests themeselves 16:46:20 malini: +1 16:46:30 it makes sense for unit tests to be independent, not the functional tests 16:46:33 Using contextmanagers, JIT dep setup is easy. :D 16:46:52 cppcabrera: what are we gaining by doing that ? 16:47:14 Seems like it would slow things down. 16:47:17 easy to add new tests 16:47:29 ametts: what wud slow things down ? 16:47:44 Setting up and tearing down for each and every test in a suite. 16:47:48 more important: less time spend on find the reason of a very waired result 16:47:52 ametts: That setup/teardown is actually not very expensive. At the moment, the suite takes 10s to execute. 16:47:56 ametts: not every, some. 16:48:02 All 43 tests. 16:48:04 ametts: it's donw with cppcabrera's patch 16:48:21 cppcabrera: but when it comes to functional tests it might be a bit slower 16:48:24 cppcabrera: 10 sec curently with or without teardown? 16:48:37 10s w/ teardown + setup 16:48:40 I mean, setUp marconi-server (db, whatsoever) run everything and then restart 16:48:41 Against mongodb 16:48:43 Live marconi 16:48:44 nice 16:48:51 & the current test suite takes 13 sec ,let me add 16:49:03 malini: if you worry about it becomes hard to write complex & long test, you can call test in another test 16:49:07 malini: so, currently, each method within the class is numbered to ensure they run in a certain order, correct? 16:49:08 Performance is not an issue, IMO. 16:49:24 kgriffs: yes 16:49:24 cppcabrera: +1 16:49:25 currently yes 16:49:25 My argument is for helping long-term maintainability. 16:49:27 yes they are ordered. 16:49:31 let's stay on topic 16:49:39 ok 16:49:48 and in Robot they are ordered, right? 16:50:03 yes (& Robot is dead now :( ) 16:50:13 it's just nosetests 16:50:26 ok, so this is the way you found to simulate what robot was doing 16:50:41 yes.. 16:50:53 I'd like to just make an a-priori assumption here that order matters in tests, and malini needs to be able to enforce it somehow 16:50:58 & really the numbering is just for the entire test suite setup 16:51:15 if 000 is the set up & 999 is the teardown for the suite 16:51:15 also... 16:51:18 git lgo 16:51:20 ops 16:51:37 as long as those happen, the tests are mostly covered 16:51:42 is the order really necessary ? 16:51:45 the downside is that adding a new test can kind of be a pain 16:51:59 since you have to shift the numbers 16:52:04 and it's hard find the reason beased on the result 16:52:07 000 can be replaced by setUpClass, and 999 can be replaced by tearDownClass - those are respected bu python test runners. 16:52:07 kgriffs: no 16:52:15 because the result depends on unrelated running of tests 16:52:23 but setuoClass & teardown is just at test level 16:52:25 Why do we need that order ? 16:52:27 not for the test suite 16:52:34 malini: good point 16:52:37 No. setUp is at test case level. setUpClass is at suite level. :) 16:52:38 tht''s the only reason we have 000 & 999 16:52:46 setUpClass() 16:52:48 cppcabrera: no, I tries it 16:52:49 I verified that a few times working on my last project. 16:52:53 * kgriffs learns something everyday 16:52:59 @classmethod setUpClass 16:53:01 cppcabrea: tried* 16:53:07 @classmethod tearDownClass() 16:53:46 hmmm 16:53:48 cppcabrera: IF you are right, we can get rid of the numbers in the suite 16:53:55 'IF' ;) 16:53:57 :D 16:54:08 actually, i thing waht Robot does it to simulate a state machine 16:54:19 lets not talk Robot..its goe 16:54:23 gone* 16:54:25 but a sequencial numbering is just a linear action 16:54:31 gone loooong back!! 16:54:43 ok, 6 mins to go 16:54:47 lets fire some actions 16:54:49 Yup, let's wrap up. 16:54:50 :D 16:54:51 i suggest we to find some better appraoch to simulate a state machine 16:54:59 (without using the numbers) 16:55:06 I am adding it to the bp 16:55:06 So, what are the next steps w.r.t functional tests? 16:55:13 Suggested actions: discuss patch further, develop user testing strategy, restructure tests 16:55:17 right now..FREEZE! 16:55:25 Can we make them launch marconi-server and then make them run with tox ? 16:55:44 * flaper87 freezes 16:55:47 flaper87: Definitely. 16:55:50 * flaper87 is frozen 16:55:57 flaper87: Even launch a DB 16:55:58 we have too many changes in the api at the moment & the next two weeks are critical for us to wrap things up. 16:56:03 * cppcabrera defrosts flaper87 16:56:10 malini: +1 16:56:13 cppcabrera: thaanks :D 16:56:15 malini: good point 16:56:21 didn't think about that 16:56:23 +1 16:56:26 I wont suggest making any radical changes right now, but need to add it to the bp & address it in two weeks 16:56:33 after two weeks* 16:56:38 + 1 zillion 16:56:39 +1 16:56:45 functional tests are important for incubation, though! 16:56:56 we have to have a good test suit 16:57:03 flaper87: is refactoring the tests important? 16:57:34 malini: it is important running them with tox so they can run in the gate 16:57:57 flaper87: ok.let's add tht to the things needed in 2 weeks 16:58:01 and having them, obviously (which most probably means updating them with the latest API) 16:58:07 cool 16:58:33 I can get it running in tox with the current tests (which is being updated for API changes) 16:58:36 #action malini to make functional tests run with tox 16:58:40 +1 16:58:55 I think we can polish later. We will need to do some non-trivial tooling to get really elegant, robot-like behavior out of nose/unittest 16:59:26 I am going to add our discussion items to bp..we certainly have some great ideas to start hacking on in two weeks 16:59:38 #action malini cppcabrera to update the etherpad with new strategies and changes for functional tests 16:59:44 malini: and to the etherpad ^ 16:59:46 pls 16:59:54 :D 16:59:56 be sure to include a note about state machine for future discussion 16:59:57 now lets talk placement :D 16:59:59 Any lasSure thing. :) 17:00:04 +200 17:00:10 #action kgriffs to buy pop-tarts for the next summit 17:00:16 erm, 1 min left 17:00:19 kgriffs: sure 17:00:22 **the typos^^ 17:00:23 :D 17:00:33 I think we're out of time. :P 17:00:40 oh noes. 17:00:42 AWESOME MEETING!!!! 17:00:50 #endmeeting