Monday, 2014-04-14

*** shakamunyi has joined #openstack-sahara00:31
*** shakamunyi has quit IRC00:37
*** IlyaE has quit IRC00:43
*** IlyaE has joined #openstack-sahara01:06
*** RockKuo_ has joined #openstack-sahara01:11
*** tmckay has joined #openstack-sahara01:19
*** tmckay has quit IRC01:37
*** akuznetsov has joined #openstack-sahara04:41
*** akuznetsov has joined #openstack-sahara04:51
*** IlyaE has quit IRC05:02
*** IlyaE has joined #openstack-sahara05:50
openstackgerritJenkins proposed a change to openstack/sahara: Imported Translations from Transifex  https://review.openstack.org/8650706:06
*** skolekonov has joined #openstack-sahara06:13
*** IlyaE has quit IRC07:44
*** witlessb has joined #openstack-sahara07:48
*** witlessb has quit IRC07:48
*** witlessb has joined #openstack-sahara07:49
openstackgerritVadim Rovachev proposed a change to openstack/sahara: Add tenant_id getting in integration tests  https://review.openstack.org/8478109:28
*** tosky has joined #openstack-sahara10:00
*** _crobertsrh is now known as crobertsrh11:16
*** RockKuo_ has quit IRC11:46
openstackgerritA change was merged to openstack/sahara-image-elements: Add RHEL as an expected platform  https://review.openstack.org/8697712:05
openstackgerritA change was merged to openstack/sahara-image-elements: Reformat the usage message  https://review.openstack.org/8698612:06
openstackgerritA change was merged to openstack/sahara-image-elements: Refactor logic around selinux bug 1204824  https://review.openstack.org/8698712:06
*** skolekonov has quit IRC12:54
*** elmiko has joined #openstack-sahara13:10
openstackgerritA change was merged to openstack/sahara: Add *.log files to gitignore  https://review.openstack.org/8652213:22
*** tmckay has joined #openstack-sahara13:27
*** sballe has joined #openstack-sahara13:40
*** witlessb has quit IRC14:06
*** witlessb has joined #openstack-sahara14:08
*** witlessb has quit IRC14:11
*** witlessb has joined #openstack-sahara14:12
*** witlessb has quit IRC14:16
*** witlessb has joined #openstack-sahara14:17
*** bob_nettleton has joined #openstack-sahara14:38
*** bob_nettleton has quit IRC14:39
*** ErikB has joined #openstack-sahara14:40
*** IlyaE has joined #openstack-sahara14:51
*** bob_nettleton has joined #openstack-sahara15:06
*** bob_nettleton has quit IRC15:28
*** coolsvap1 has joined #openstack-sahara16:02
*** coolsvap1 has quit IRC16:03
*** coolsvap1 has joined #openstack-sahara16:04
*** coolsvap1 has quit IRC16:08
*** IlyaE has quit IRC16:09
*** akuznetsov has quit IRC16:19
*** akuznetsov has joined #openstack-sahara16:31
openstackgerritAndrew Lazarev proposed a change to openstack/sahara: Added support of multi-region environment  https://review.openstack.org/7979516:56
*** IlyaE has joined #openstack-sahara17:58
*** IlyaE has quit IRC18:23
*** bob_nettleton has joined #openstack-sahara18:30
*** IlyaE has joined #openstack-sahara18:40
elmikocrobertsrh: ping18:47
crobertsrhyes?18:47
elmikoin sahara.service.validations.edp.job.JOB_SCHEMA, do you know if the ordering of the job types matters?18:48
crobertsrhOrder should not matter.18:49
elmikook, we might have a test that is getting fussy about the order. i'm gonna dig a little more18:49
crobertsrhSeems like it would be a bad idea to rely on the order there.18:49
elmikoi'm trying to do a little refactor on the edp-job-type-constants and i'm running into interesting stuff when i create a list of all job types and then start using it in the code base18:50
*** tosky has quit IRC18:52
crobertsrhAh...ok.  I think Trevor found an oddity or two with some of the validation code before, so there could be something nasty lurking.18:53
elmikolol, thanks for the heads up18:53
elmikowe'll see how deep the rabbit hole goes...18:53
*** tellesnobrega has joined #openstack-sahara18:56
elmikoi need some help on this one. could someone explain test_jar_rejected in sahara/tests/unit/service/validation/edp/test_job.py?19:26
elmikoand more to the point, why does changing the job type ordering in sahara.service.validation.edp.job.JOB_SCHEMA make it fail?19:27
tmckayelmiko, I'll take a look at the test ...19:29
elmikotmckay: thanks19:30
elmikoi'm quite stumped why changing that schema order would matter19:30
tmckaymy head is swimming from reviews ...19:30
tmckayk, this will be fun19:30
*** tosky has joined #openstack-sahara19:30
elmikoyea, it touches a lot of code19:32
tmckayelmiko, okay, so the point of the test is that "Jar" was the original name for "MapReduce", and for a while we supported it as a synonym.  It got weird when we added Java actions ... what the heck is jar?19:32
tmckaythat's the point.  as to why order matters, I'll keep looking ...19:32
elmikomy thought is it has something to do with the validate decoration that occurs in sahara.tests.unit.service.validation.utils.ValidationTestCase._assert_create_object_validation19:34
*** bob_nettleton has quit IRC19:34
elmikobut i don't know these functions that well, so i'm having to read a lot to figure out what they are supposed to do19:35
tmckayelmiko, so what order change did you make?19:38
elmikoi tried a bunch, but just swap the order of pig and hive19:39
tmckayin what, the json schema?19:39
elmikoyes19:39
elmikowell, in JOB_SCHEMA["properties19:40
elmiko"]["type"]["enum"]19:40
tmckayah19:41
tmckayk, the validation stuff is somewhat builtin19:41
tmckayThe junk that is testing the json is producing the exception message based on the order19:41
tmckayWe are asserting that the exception message matches the literal text in the test ...19:42
elmikoright19:42
tmckaybut the order of the enum determines what the json checker will spit out19:42
tmckayso all we have to do is change the text in the test19:42
elmikohmm, where is the text of the test?19:42
tmckayNot much of a way around that, unless we find a way to generalize the test and not look at the specific message19:42
tmckay            bad_req_i=(1, "VALIDATION_ERROR",19:43
tmckay                       "'Jar' is not one of "19:43
tmckay                       "['Pig', 'Hive', 'MapReduce', "19:43
tmckay                       "'MapReduce.Streaming', 'Java']"))19:43
elmikooh, ok. that text19:43
tmckayend of test_jar_rejected19:43
tmckay:)19:43
tmckayall we have to do is make that message match19:43
tmckayso the order should just match whatever your enum order is19:43
elmikowe should just be able to use "'Jar' is note one of " + edp.JOB_TYPES_ALL, or some such19:43
elmikoor str(edp.JOB_TYPES_ALL) or something19:44
tmckayyou, with a join() maybe19:44
tmckaywhat?  you?  that makes no sense19:44
tmckaybut I think you're on the right track19:44
elmikogood spot, i was deep into how we are decorting mock.Mock() lol19:45
tmckaylol, yeah, sometimes the simple things are really simple19:45
elmikoi didn't even recognize the order was the same as the error output19:45
* elmiko facepalm19:45
tmckaynp, I've been taken to school by unit tests more than once19:46
tmckayyou develop a sick intuition for what is happening19:46
tmckaythat was way more fun than reviews19:46
elmikoyea, my python intuition has not fully blossomed yet ;)19:46
tmckaywell, I wouldn't even say python in this case ... flask json validation is closer, I think19:47
tmckaypersonally, mock decorators make me dizzy19:48
elmikook, i never played with the json validation in flask19:48
elmikoi didn't even realize it had that type of validation19:48
elmikolol, ok yep, add str(edp.JOB_TYPES_ALL) to the end of that messge fixed it19:49
tmckayelmiko, cool.  to be honest, I don't know how much of this stuff is provided by flask, and how much was written as part of sahara.  I've never drilled that deep19:50
openstackgerritMichael McCune proposed a change to openstack/sahara: Implementing constants for the job types used by EDP  https://review.openstack.org/8035219:51
elmikoi've played with flask a bunch, but usually for making website not so much the rest side of things19:51
elmikoi can see where json validation is really important for rest stuff19:51
tmckay looks like it might be coming from python-jsonschema19:51
elmikoahh ok19:51
tmckayso maybe not flask per se19:52
*** akuznetsov has quit IRC20:11
*** akuznetsov has joined #openstack-sahara20:20
*** akuznetsov has quit IRC20:22
*** ErikB has quit IRC20:56
*** ErikB has joined #openstack-sahara21:00
*** crobertsrh is now known as _crobertsrh21:00
*** witlessb has quit IRC21:06
*** ErikB has quit IRC21:27
*** ErikB has joined #openstack-sahara21:48
*** akuznetsov has joined #openstack-sahara22:34
*** akuznetsov has quit IRC22:37
*** IlyaE has quit IRC23:07
*** elmiko has quit IRC23:35
*** IlyaE has joined #openstack-sahara23:42
*** elmiko has joined #openstack-sahara23:45
*** sballe has quit IRC23:46
*** tosky has quit IRC23:48

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