Saturday, 2015-03-14

*** achanda has quit IRC00:02
*** kgriffs is now known as kgriffs|afk00:03
openstackgerritVictoria Martínez de la Cruz proposed openstack/zaqar: Update json schema for API v1_1  https://review.openstack.org/14841400:37
openstackgerritFlavio Percoco proposed openstack/zaqar: Adds message processing to WebSockets driver  https://review.openstack.org/14480300:52
*** achanda has joined #openstack-zaqar00:56
*** akanksha has quit IRC01:07
*** amitgandhinz has joined #openstack-zaqar01:23
*** amitgandhinz has quit IRC01:28
*** amitgandhinz has joined #openstack-zaqar01:29
*** amitgandhinz has quit IRC02:29
*** boris-42 has quit IRC02:52
*** achanda has quit IRC03:19
*** achanda has joined #openstack-zaqar03:19
*** achanda has quit IRC03:24
*** achanda has joined #openstack-zaqar03:36
*** achanda has quit IRC03:40
*** reed has quit IRC05:06
*** exploreshaifali has joined #openstack-zaqar07:11
*** echevemaster has quit IRC07:13
*** achanda has joined #openstack-zaqar07:33
*** exploreshaifali has quit IRC07:47
*** akanksha has joined #openstack-zaqar07:59
*** achanda has quit IRC08:02
*** achanda has joined #openstack-zaqar08:17
*** achanda has quit IRC08:38
*** chandankumar has joined #openstack-zaqar08:39
*** achanda has joined #openstack-zaqar08:43
*** achanda has quit IRC08:56
*** chandankumar has quit IRC09:25
*** exploreshaifali has joined #openstack-zaqar09:25
*** akanksha has quit IRC10:27
*** boris-42 has joined #openstack-zaqar12:50
*** exploreshaifali has quit IRC13:30
*** pcaruana has joined #openstack-zaqar13:55
*** akanksha has joined #openstack-zaqar14:06
*** exploreshaifali has joined #openstack-zaqar15:38
akankshaHello.15:40
exploreshaifaliakanksha, hello15:43
exploreshaifaliwhat's up?15:43
akankshaHey15:46
*** ekarlso has quit IRC15:50
*** ekarlso has joined #openstack-zaqar15:50
akankshaI have been trying to work on the redis uuid validation bug15:52
akankshaI have a doubt regarding the function calls15:52
akankshaSo whenever the functions which use messageids and client_ids and claims are called are they called as keyword arguments or as positional arguments15:53
exploreshaifaliakanksha, please can you give me link of code/function/method you are talking about16:02
akankshahttps://github.com/openstack/zaqar/blob/master/zaqar/storage/redis/messages.py#L37216:03
akankshaSome function like this?16:03
exploreshaifaliakanksha, in that method -  queue and mehtod_id will be passed as positional args16:04
exploreshaifalilike --> .get('queue', 'msg_id')16:04
exploreshaifalithen *project* is optional argument16:05
exploreshaifaliif we want we can pass its value in any of the 2 ways:16:05
exploreshaifali.get('q', 'm', 'p') or .get('q', 'm', project='p')16:06
akankshaHmm. Okay. That complicates things a bit for me. Lemme see what I can do with this16:06
exploreshaifaliakanksha, is that waht you are asking?16:06
akankshaYeah thats what I was asking16:06
exploreshaifaliakanksha, it depends on method/function declaration(signature) wether they should be called as keyword args or as positional args16:07
akankshaOh I just found something new that I can use as a workaround. I needed the names of the parameters that I use in a function so I am going to use the inspect module now16:08
*** reed has joined #openstack-zaqar16:16
*** chandankumar has joined #openstack-zaqar16:28
*** boris-42 has quit IRC16:32
*** chandankumar has quit IRC16:38
*** pcaruana has quit IRC16:38
*** chandankumar has joined #openstack-zaqar16:53
*** chandankumar has quit IRC17:01
*** reed has quit IRC17:09
*** exploreshaifali has quit IRC17:26
*** achanda has joined #openstack-zaqar18:21
*** exploreshaifali has joined #openstack-zaqar18:41
*** achanda has quit IRC19:22
*** achanda has joined #openstack-zaqar20:11
*** achanda has quit IRC20:32
akankshavkmc, there?20:46
akankshaexploreshaifali, ping?20:55
exploreshaifaliakanksha, pong!20:57
akankshaI wrote a decorator which could possibly solve this bug and I want to improve it. https://bugs.launchpad.net/zaqar/+bug/136702420:59
openstackLaunchpad bug 1367024 in zaqar "Redis driver doesn't explicitly validate UUIDs" [Low,Confirmed] - Assigned to Doraly Navarro (doralynavarro)20:59
akankshaCan you help me out?21:00
akankshaI am not sure I followed the design principles as required by zaqar21:00
* exploreshaifali looking at bug21:00
akankshahttps://www.irccloud.com/pastebin/39jWURbd/test.py21:01
exploreshaifaliakanksha, that bug is assigned to Doraly Navarro, have you talked to her?21:03
akankshaYeah. She said she is not working on it21:03
exploreshaifaliok21:03
exploreshaifaliplease can you tell me in which file you are making this modification?21:04
akankshaI havent made the modification yet because I am not sure of where to put this. This is my test. I will have to make changes in several files. Since its a decorator I am guessing it will have go here https://github.com/openstack/zaqar/blob/master/zaqar/common/decorators.py21:06
akankshaThen since I need an error it will go here https://github.com/openstack/zaqar/blob/master/zaqar/common/errors.py21:06
*** achanda has joined #openstack-zaqar21:07
akankshaIt was supposed to be used as a function decorator around functions that use client21:07
akanksha_id message_id and claim as arguments so basically it will be wrapped around functions like these in the redis driver21:07
akankshahttps://github.com/openstack/zaqar/blob/master/zaqar/storage/redis/messages.py#L37221:08
akankshaThats all that I assumed.21:08
akankshaPlease correct me wherever I have gone wrong21:09
exploreshaifaliakanksha, as per the files that need modification llike decorator.py and errors.py that seems correct to me21:11
akankshaokay :)21:11
exploreshaifalithen about the logic you put in the new decorator you wrote, I am also not sure about it21:12
akankshaHmm21:12
exploreshaifalibut lets discuss about it line by line21:12
akankshaOkay so I started by getting all the argument names and values and putting them into a dictionary.21:13
exploreshaifaliso if we are using that decorator for function wit signature - *def get(self, queue, message_id, project=None)*21:13
exploreshaifaliyes so inside frame we will have - {'self':'self_value, 'queue':'queue_value' and so on}?21:14
akankshayeah so when the function is called it will make a dictionary like {'self':something , 'queue':something , 'message_id' : something etc} and store it in variable argval21:14
akankshathen the next part will go through the pre-made list of uuid type arguments that exist in the code and then it will verify only those21:15
exploreshaifaliakanksha, it looks correct to me21:16
akankshayay :) So should I implement it in all the files that i talked about. Also I was planning that the error message that I will give will be something like "(argument that went wrong) is an invalid uuid type" and thats what i ll add in the errors file.21:18
exploreshaifaliakanksha, yes21:20
exploreshaifalibut are you sure how to access frame that you have defined in decorator? as per https://docs.python.org/2/library/inspect.html#inspect.getargspec it says the getargsspec will return tuple21:21
exploreshaifaliand you are accessing it as - frame.args[i]21:21
akankshaI will try it out first. I did try it out with normal numbers21:22
akankshaframe.arg is a list21:22
exploreshaifaliif it is working with dumy values that its fine :)21:23
exploreshaifaliframe is a tuple?21:23
akankshayeah frame is a tuple with (args, varargs, keywords, defaults)21:24
akankshaEach of these are lists which can be accessed by names frame.args frame.defaults etc21:24
exploreshaifaliyeh so how can you access a tuple with "."21:24
akankshaI dont know but its working that way.21:25
exploreshaifalirather it should be frame[0][i]21:25
akankshaLemme check that out once more21:25
exploreshaifalihahaha21:25
exploreshaifaliyup and also check it with frame[0][i]21:25
akankshahttps://www.irccloud.com/pastebin/XuIEAQWB21:25
akankshaThis is what it returns21:26
akankshaIts some sort of an object21:26
akanksha:\21:26
akankshaI gave the function as func(a,b,c=2,d=3,e=5)21:26
exploreshaifaliso let it be, if it is working21:28
exploreshaifalithough I think others can have some better idea to achieve same21:29
exploreshaifalibut for now its better to move forward21:29
akankshaOkay so I'll make the changes and get back to you with updates21:29
akanksha?21:29
exploreshaifaliakanksha, yup :)21:30
akankshathanks a lot :)21:30
akankshaBTW I also had a question about Outreachy.21:30
akankshaI want to work on the zaqar api conversion from v1 to v1.1 project21:31
akankshaSo I need to discuss the project before I can write a proposal21:31
exploreshaifaliokay21:31
exploreshaifaliyes of course21:33
exploreshaifaliand you are lucky - vkmc is the mentor21:33
exploreshaifali:D21:33
*** achanda has quit IRC21:33
exploreshaifaliakanksha, discuss with her all doubts you have21:33
akankshaOkay, :)21:33
*** achanda has joined #openstack-zaqar21:34
akankshaAnd any general advice you can give me having been an applicant before?21:34
exploreshaifaliand since saturday and sunday its weekend.... so till than you can cover other parts of application21:34
akankshavkmc wont be available for the weekend?21:34
*** achanda has quit IRC21:34
exploreshaifaliakanksha, just keep digging, don't stop in between21:35
exploreshaifalino, no one will21:35
akankshaOh. Okay. So till then I will concentrate on the bug21:35
exploreshaifaliwe should respect their personal lives as well!21:35
akanksha:)21:35
exploreshaifaliyes!21:35
akankshaYeah right :)21:35
exploreshaifaliakanksha, thank you!21:35
akankshaActually thank you :)21:36
exploreshaifali:)21:36
exploreshaifalinp21:36
*** exploreshaifali has quit IRC21:48
*** achanda has joined #openstack-zaqar22:03
*** achanda has quit IRC22:08
*** achanda has joined #openstack-zaqar22:39
*** achanda has quit IRC22:47
*** achanda has joined #openstack-zaqar23:01
*** achanda has quit IRC23:47

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