IRC logs of #tryton for Thursday, 2014-11-27

chat.freenode.net #tryton log beginning Thu Nov 27 00:00:01 CET 2014
-!- hiaselhans(~Thunderbi@chello212186043057.408.14.vie.surfer.at) has joined #tryton00:01
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton00:36
-!- digitalsatori(~Thunderbi@116.234.112.203) has joined #tryton00:45
-!- digitalsatori(~Thunderbi@116.234.112.203) has joined #tryton00:49
-!- leio(~leio@gentoo/developer/leio) has joined #tryton00:56
-!- digitalsatori1(~Thunderbi@116.234.112.203) has joined #tryton00:59
-!- digitalsatori(~Thunderbi@116.234.112.203) has joined #tryton01:23
-!- udono(~udono@p50938317.dip0.t-ipconnect.de) has joined #tryton01:40
-!- TheCowboy(~TheCowboy@c-50-189-10-141.hsd1.ct.comcast.net) has joined #tryton03:44
-!- Alex_E1(~Alex_E@p578F3EC9.dip0.t-ipconnect.de) has joined #tryton05:05
-!- sunny_dealmeida(~quassel@210.89.41.115) has joined #tryton05:35
-!- yangoon1(~mathiasb@p549F3256.dip0.t-ipconnect.de) has joined #tryton06:01
-!- digitalsatori(~Thunderbi@116.234.112.203) has joined #tryton06:25
-!- digitalsatori1(~Thunderbi@116.234.112.203) has joined #tryton06:36
-!- frispete_(~frispete@p54A92E72.dip0.t-ipconnect.de) has joined #tryton06:40
-!- horli(~gregor@chello084113024052.5.12.vie.surfer.at) has joined #tryton07:17
-!- horli(~gregor@chello084113024052.5.12.vie.surfer.at) has left #tryton07:17
-!- pjstevns(~Thunderbi@2001:981:7170:1:fd99:353:2a48:60b2) has joined #tryton07:53
-!- prksh(~prksh@103.245.118.154) has joined #tryton07:59
-!- horli(~gregor@chello084113024052.5.12.vie.surfer.at) has joined #tryton08:03
-!- horli(~gregor@chello084113024052.5.12.vie.surfer.at) has left #tryton08:03
-!- vak0160(~kvirc@36.72.229.107) has joined #tryton08:07
-!- vak0160(~kvirc@36.72.229.107) has joined #tryton08:08
-!- vak0160(~kvirc@36.72.229.107) has left #tryton08:12
-!- pobsteta(~Thunderbi@4cb54-3-88-160-87-54.fbx.proxad.net) has joined #tryton08:12
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton08:16
-!- horli(~gregor@chello084113024052.5.12.vie.surfer.at) has joined #tryton08:55
-!- jeancavallo(~giovanni@bob75-9-88-181-2-176.fbx.proxad.net) has joined #tryton09:09
-!- corro(~corro@46.22.23.85) has joined #tryton09:29
-!- LordVan(~LordVan@gentoo/developer/LordVan) has joined #tryton09:29
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:30
-!- digitalsatori(~Thunderbi@116.234.112.203) has joined #tryton09:33
-!- bechamel(~Adium@62-197-96-189.teledisnet.be) has joined #tryton09:35
-!- digitalsatori(~Thunderbi@116.234.112.203) has joined #tryton09:42
-!- digitalsatori(~Thunderbi@116.234.112.203) has joined #tryton09:49
-!- digitalsatori(~Thunderbi@116.234.112.203) has joined #tryton10:17
-!- horli(~gregor@78.142.163.132) has joined #tryton10:41
-!- horli(~gregor@78.142.163.132) has left #tryton10:45
pobstetaHi all. I want to update a many2many attribute with an on_change_with function but this code http://pastebin.com/RBfMx8V7 don't update the attribute protection ?10:53
cedkpobsteta: you mean the value11:00
cedkpobsteta: you must return a list of ids11:01
cedkpobsteta: by the way, why usgin SQL query when you can just use the ORM11:01
cedkpobsteta: oh I see there is a special operator11:06
pobstetacedk: a list like this : {1, 2} or [1 , 2] ?11:07
cedkpobsteta: list = []11:09
-!- frispete(~frispete@p54A92E72.dip0.t-ipconnect.de) has joined #tryton11:14
pobstetahow can i use the ORM ?11:15
cedkpobsteta: not with custom operator for now11:17
pobstetaok it work, thanks for all !11:20
-!- mar(~marius@v100.nfq.lt) has joined #tryton11:24
mari coudn't find guidelines for creating a patch so https://bugs.tryton.org/issue437211:25
cedkmar: https://code.google.com/p/tryton/wiki/HowtoContribute11:28
cedkPilou: the quick start is still way too long11:29
marthanks11:30
-!- nicoe(~nicoe@117.103-247-81.adsl-dyn.isp.belgacom.be) has joined #tryton11:33
marhow do i get a password in codereview?11:34
cedkmar: it uses google account11:34
-!- udono(~udono@p50938317.dip0.t-ipconnect.de) has joined #tryton11:37
Piloucedk: which steps are unnecessary ?11:37
cedkPilou: i'm working on a patch11:37
cedkPilou: I think I will remove a lot11:37
-!- VaticanCameos(~pritishc@103.245.118.154) has joined #tryton11:38
marcedk, http://codereview.tryton.org/669100211:38
cedkPilou: I give up, there are way too much of blabla11:39
cedkPilou: I understand now why people tells it is too complicate to contribute11:39
cedkto contribute it is 4 lines11:39
marprobably missed ":" :/11:40
cedkthis howto tunrs the contribution process into a bureaucratic stuff11:43
PilouMy idea was to list all the steps which could permit a contributor to have his contribution approved.11:44
marcedk, is it good enough?11:44
maror do I still miss something?11:44
cedkPilou: that's a dream11:45
Piloucould you elaborate ?11:45
-!- kstenger(~karla@200.124.209.158) has joined #tryton11:45
cedkPilou: a contribution should be just submiting a patch11:45
Piloubut it's not11:45
cedkPilou: when i conrtibute to cPython, I don't care at all about all the internal stuffs/rules11:46
PilouI follow the python quick start (https://docs.python.org/devguide/) and added the codereview parts11:46
cedkPilou: I just submit a patch11:46
cedkmar: what?11:46
marhttps://bugs.tryton.org/issue437211:47
Timitoscedk: there are so many points where you can fail. if somebody wants to do his first contribution it is not really only 4 line11:47
mardo I miss something in this contribution11:47
cedkTimitos: it should not11:48
cedkTimitos: improving workflow is not about adding documentation, it is about reducing the possible failure11:48
cedkmar: I don't think11:48
PilouTimitos: indeed11:49
Piloucedk: i only wrote documentation for the current workflow11:50
Timitoscedk: at least you need to create a google account if you dont have one before you can start with 4 lines and you have to create a account on the bug tracker11:50
Piloucedk: improvements of the workflow should be discussed in the ML11:50
cedkIf I have to read 200 lines of doc, to submit a patch than I will fail at reading11:50
yangoonPilou: +111:50
cedkTimitos: account to bug tracker is not required11:50
margithub is the way :)11:51
cedkPilou: except people reading it, just give up because it is too complicate to read11:51
cedkmar: the workflow is easier than github, 4 lines11:51
Pilou(soon google account will not be required)11:52
cedkmar: and I count running vi and cd11:52
marit took me 30 minutes to do those 4 commands11:53
mari would have done it on github in 5 minutes :)11:53
cedkmar: I count 13min on irc11:54
cedkmar: any way, github is not the discussion, it is a privative platform and we are a freesoftware11:55
Timitosmar: donĀ“t forget, that you are already used to the contribution process on github. you need to think of your first time as you had to create a pull request on github11:55
cedkPilou: FYI, now the process doesn't require anymore to attach the patch to the bug tracker11:57
cedkI will work on a bot, that will add the review id to issue for each new review that has issuexxx in its comment11:58
-!- horli(~gregor@78.142.163.132) has joined #tryton11:59
-!- horli(~gregor@78.142.163.132) has left #tryton11:59
cedkmar: also you should now count how much time for the next one?12:00
rmuI contributed I think about 2-3 patches, and I didn't find it too hard to do it, after finding out about hgreview.12:01
rmuthings that were non-obvious to me: how to enter the bug tracker issue id into the hreview description, and that it was necessary to attach a patch to the bug after review was completed12:02
cedkrmu: I'm also working on it: https://bitbucket.org/nicoe/hgreview/issue/18/allow-to-edit-the-description12:03
cedkrmu: and for the patch attachment, it is gone as now we (committers) can download the patch with all information ready to be imported in hg12:04
Piloucedk: how is handled the commit message ?12:04
-!- mariomop(~quassel@181.110.68.69) has joined #tryton12:04
cedkPilou: the commit message is the review dsubject (with module name) and the review description12:05
cedkI also plan to add to hgreview a hook on commit to prefill the commit message with the review one12:05
cedkPilou: alos the review id is automaticaly appended to the patch12:06
cedkPilou: look at http://codereview.tryton.org/download/issue5811002_20001.diff12:09
-!- smarro(~sebastian@190.105.93.196) has joined #tryton12:37
-!- ytz(~ytz@secure2.options-it.com) has joined #tryton13:05
cedknicoe: I could not test: http://codereview.tryton.org/14721002/13:30
cedknicoe: I have not access to the user13:30
cedknicoe: I also think it should a user on moretus with a @tryton.org email13:31
-!- frispete(~frispete@p54A92E72.dip0.t-ipconnect.de) has joined #tryton13:54
-!- vcardon(~vcardon@bureau-sdsl.tranquil.it) has joined #tryton13:59
-!- hiaselhans(~Thunderbi@chello212186043057.408.14.vie.surfer.at) has joined #tryton14:03
nicoecedk: indeed we should promote this test to something more official14:12
-!- pablovannini(~pablo@host126.186-109-85.telecom.net.ar) has joined #tryton14:27
marcan this be a rounding error: http://hg.tryton.org/trytond/trytond/modules/stock/file/b9947becd5e5/move.py#l79714:56
mari picked_quantities = 0.999999999 < move.quantity = 114:57
marand is it possible to have a race condition in assign_try method? I mean when two assignments happens concurrently?14:59
pokolimar:  stock_moves table is locked on assign_try15:09
pokolimar: http://hg.tryton.org/trytond/trytond/modules/stock/file/b9947becd5e5/move.py#l74615:09
marbut it's locked in exclusive mode15:12
marwhich means reads are still possible15:13
marso it doesn't block loading quantities which may be wrong15:15
marif another assign is happening at the same time?15:15
maram I right? :)15:23
pokolimar: i imagine that yes, you're right, but haven't tested it15:38
-!- hiaselhans(~Thunderbi@chello212186043057.408.14.vie.surfer.at) has joined #tryton15:44
marI have a situation where there are more products assigned than available15:47
pokolimar: what i can tell is that i can not see any reason to block all the stock table in ACCESS EXCLUSIVE mode15:51
marprobably quantity loading should be done with "FOR UPDATE"15:52
pokolimar: could you explain how you get to the situation where tehere are more products assigned than available?15:55
maropen two tryton windows, create two productions which uses same products15:55
marboth productions should have "many" moves15:56
marso that assignment doesn't happen imediately15:56
marand click assign button in both windows15:56
marresult = both production are fully assigned15:56
marexpected result: one production is not assigned (missing qty)15:57
marif running one by one I get expected result, running them concurrently I get both of them assigned ;)15:57
marfor best results "offending" move should probably be last16:00
pokolimar: understood16:01
pokolimar: main problem about "FOR UPDATE" is that python-sql doesn't support it16:02
marI believe it does16:02
marhttps://code.google.com/p/python-sql/source/browse/sql/__init__.py#28216:03
marhttps://code.google.com/p/python-sql/source/browse/sql/__init__.py#36416:03
marat least the current version16:04
pokolimar: ouch, i missed this line :)16:04
pokolimar: yes, you're right it supports it16:05
pokolimar: so go ahead and write a patch16:06
marI'm not sure about the correct way16:07
pokolimar: can help you on this (at least try)16:07
marhttp://hg.tryton.org/trytond/trytond/modules/stock/file/b9947becd5e5/move.py#l107916:09
maradding .for_ here?16:09
pokolimar: first of all, i think you need some kind of flag to especify if it's for update or not16:09
pokolimar: forget it, not sure about it :)16:10
pokolimar: i think that you don't need to look on the union all, but only on the first two queries that are from move table16:10
rmumar: I would start writing a test-case/test-scenario that reproduces the error16:14
pokolirmu: not sure if possible because it's all about concurrency16:18
pokolimar: at least you can open an issue on the bug tracker :)16:18
rmumar: what database are you using?16:23
marpostgres16:30
-!- pobsteta(~Thunderbi@4cb54-3-88-160-87-54.fbx.proxad.net) has joined #tryton16:33
-!- prksh(~prksh@101.0.57.37) has joined #tryton16:39
-!- horli(~gregor@78.142.163.132) has joined #tryton16:40
-!- horli(~gregor@78.142.163.132) has left #tryton16:40
marhttps://bugs.tryton.org/issue437316:42
pokolimar: will you try to provide a patch?16:44
marhttps://bugs.tryton.org/issue228016:45
marthis is related16:46
marpokoli, not until monday ;)16:46
cedkmar: I can not see how this can happen, assignation needs to update the table16:47
cedkmar: so lock IN EXCLUSIVE MODE should prevent that16:47
pokolicedk: I imagine that the first read is done without the assigned data, so the other transaction sees the starting values, and then it locks when trying to write the moves16:50
marreading quantities isn't blocking operation. 1. process1 locks in exclusive mode, 2. process2 locks in exclusive mode, 3. process1 reads quantities, 4. process2 reads quantities, 5. process1 assigns, releases lock, 6. process2 assigns, releases lock16:50
cedkmar: how 5 if 2 was done16:52
cedkand lock table in exclusive mode are mutualy exclusif16:54
cedkI think the culpitre is the change to repeatable read instead of serializable16:56
-!- TheCowboy(~TheCowboy@c-50-189-10-141.hsd1.ct.comcast.net) has joined #tryton16:59
rmuthis http://hg.tryton.org/trytond/trytond/modules/purchase/file/330c799c162d/purchase.py#l1264 causes div by zero, interestingly, sale does it differently: http://hg.tryton.org/trytond/trytond/modules/sale/file/cc72bf5c0455/sale.py#l134117:02
rmuhttps://bugs.tryton.org/issue437417:02
mari'll try to log all queries happening in order for the concurrency issue17:07
cedkmar: for me, it is clear what happens17:19
cedkmar: taking your numbers:17:19
cedk1, 3, 5, 2, 4, 617:20
cedkbut 4 and 6 are reading the values before the commit of 517:20
cedkbecause it uses the repeatable read17:20
-!- vcardon(~vcardon@bureau-sdsl.tranquil.it) has left #tryton17:42
rmuhttp://martin.kleppmann.com/2014/11/25/hermitage-testing-the-i-in-acid.html, https://github.com/ept/hermitage17:45
-!- prksh(~prksh@101.0.57.38) has joined #tryton17:45
-!- prksh(~prksh@180.188.247.36) has joined #tryton18:00
-!- Telesight(~anthony@77-175-158-148.FTTH.ispfabriek.nl) has joined #tryton18:12
cedknicoe: I migrated reviewbot to his own user and created an account reviewbot@tryton.org18:38
cedknicoe: but I see it uses hgreview and so it request the password in stdin18:43
cedknicoe: of course the session is stored but for 30 days18:44
cedknicoe: how did you manage it?18:44
-!- sunny_dealmeida(~quassel@203.76.183.203) has joined #tryton18:45
cedknicoe: OK I found, it is fixed with dev version of hgreview19:09
-!- prksh_(~prksh@101.0.57.38) has joined #tryton20:02
-!- prksh(~prksh@180.188.247.243) has joined #tryton20:12
-!- hiaselhans(~Thunderbi@chello212186043057.408.14.vie.surfer.at) has joined #tryton22:53
-!- horli(~gregor@chello084113024052.5.12.vie.surfer.at) has joined #tryton23:01
-!- ytz(~ytz@opfw01.options-it.com) has joined #tryton23:36
-!- hiaselhans1(~Thunderbi@chello212186043057.408.14.vie.surfer.at) has joined #tryton23:53

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