openstackgerrit | Merged openstack/senlin: Add unit tests to engine.parser https://review.openstack.org/257240 | 00:28 |
---|---|---|
*** Qiming has joined #senlin | 00:42 | |
*** Qiming has quit IRC | 01:04 | |
*** openstack has joined #senlin | 01:09 | |
*** zhenguo has joined #senlin | 01:19 | |
*** Yanyanhu has joined #senlin | 01:50 | |
*** cschulz has joined #senlin | 01:53 | |
*** elynn has joined #senlin | 01:57 | |
*** Tiancheng has joined #senlin | 01:57 | |
*** elynn has quit IRC | 02:02 | |
*** elynn has joined #senlin | 02:03 | |
*** Qiming has joined #senlin | 02:18 | |
*** gongysh has joined #senlin | 02:43 | |
*** Liuqing has joined #senlin | 02:53 | |
elynn | Hi Qiming | 03:11 |
Qiming | yes | 03:11 |
elynn | https://review.openstack.org/#/c/247429/6/heat/engine/resources/openstack/senlin/cluster.py L183 | 03:12 |
elynn | Do I need to put self.CLUSTER_WARNING here? or just cluster_error is ok? | 03:12 |
Qiming | for deletion, the expectation is that the operation (DELETE) is successful | 03:13 |
openstackgerrit | xu-haiwei proposed openstack/senlin: Change String to Boolean type when listing cluster policies https://review.openstack.org/257664 | 03:14 |
elynn | yes, I remember that you said cluster might not go into cluster_warnning | 03:14 |
Qiming | cluster may enter a warning status | 03:14 |
xuhaiwei | hi, I got a very strange pep8 error: senlin/profiles/os/nova/server.py:276:1: C901 'ServerProfile.do_create' is too complex (20) def do_create(self, obj): | 03:15 |
Qiming | this has to be treated case by case when operating it | 03:15 |
elynn | So I should mark as delete failed, right? | 03:15 |
Qiming | yes, your DELETE operation has failed | 03:15 |
Qiming | but the cluster may be still operational | 03:15 |
elynn | Ok, I will keep my codes as it is, and reply to KM | 03:16 |
Qiming | this is a big difference between Heat and Senlin | 03:16 |
Qiming | We return the cluster/node status, not the status of the last operation | 03:16 |
Qiming | there won't be a status called 'CREATE_COMPLETE', that is only about the CREATE operation, it is not about the cluster/node itself | 03:17 |
elynn | Qiming: yes, but we can add check_live_status later to monitor status when convergence is on. | 03:17 |
Qiming | xuhaiwei, the complexity is a PEP8 measurement | 03:17 |
Qiming | it measures how many if..else ... kind of control statements in a function | 03:18 |
Qiming | if it is becoming too complex | 03:18 |
Qiming | you are expected to split it into several smaller functions | 03:18 |
Qiming | it is a nice check by the way | 03:19 |
Qiming | elynn, yes | 03:19 |
*** yuanying has quit IRC | 03:20 | |
*** pratikmallya has quit IRC | 03:36 | |
*** elynn has quit IRC | 04:00 | |
*** yuanying has joined #senlin | 04:07 | |
xuhaiwei | Qiming, I have never met it before, it seems Jenkins doesn't value this measurement | 04:07 |
*** openstackstatus has quit IRC | 04:24 | |
*** openstack has joined #senlin | 04:28 | |
*** pratikmallya has joined #senlin | 04:36 | |
*** pratikmallya has quit IRC | 04:41 | |
*** elynn has joined #senlin | 04:42 | |
*** elynn has quit IRC | 04:47 | |
*** elynn has joined #senlin | 04:47 | |
Qiming | xuhaiwei, it is part of pep8 test | 04:54 |
Qiming | see section [flake8] max-complexity=20 in tox.ini | 04:55 |
xuhaiwei | why is doesnt fail in the gate? | 04:55 |
Qiming | you mean the same code failed locally, but passed the gate? | 04:56 |
xuhaiwei | yes | 04:56 |
Qiming | that is weird | 04:56 |
xuhaiwei | it doesn't happen in your env? | 04:56 |
Qiming | no, senlin code was not that complex so far | 04:57 |
xuhaiwei | it happened only today | 04:57 |
xuhaiwei | never met it before | 04:57 |
xuhaiwei | but senlin/profiles/os/nova/server.py:276:1: C901 'ServerProfile.do_create' is indeed a little long | 04:57 |
Qiming | I used to do simple 'flake8' test locally before commit | 04:58 |
Qiming | maybe 'tox -e pep8' will give different results | 04:58 |
Qiming | do you have code not yet committed? | 04:58 |
xuhaiwei | I did tox -epep8 | 04:58 |
xuhaiwei | no | 04:58 |
Qiming | okay, I'm building pep8 tox env now | 04:58 |
xuhaiwei | it seem this happened after "Add block_device_mapping_v2 support for 'os.nova.server' profile." is merged | 05:01 |
Qiming | ok | 05:02 |
Qiming | well... my tox -epep8 passed | 05:03 |
Qiming | xuhaiwei, it is just an alarm | 05:20 |
Qiming | [tengqm@node1 senlin]$ flake8 --max-complexity=19 | 05:20 |
Qiming | ./senlin/profiles/os/nova/server.py:276:1: C901 'ServerProfile.do_create' is too complex (20) | 05:20 |
Qiming | def do_create(self, obj): | 05:20 |
Qiming | ^ | 05:20 |
Qiming | [tengqm@node1 senlin]$ flake8 --max-complexity=20 | 05:20 |
xuhaiwei | you got the alarm? | 05:21 |
Qiming | see my paste above | 05:21 |
Qiming | if I'm setting max complexity to 19 manually, I'm getting an error | 05:21 |
xuhaiwei | by --max-complexity=19 it happens? | 05:21 |
Qiming | if I'm setting it to 20, the test passed | 05:22 |
Qiming | in tox.ini, we have max_complexity=20 | 05:22 |
xuhaiwei | ERROR: InvocationError: | 05:22 |
Qiming | that is why I'm not seeing it in my local setup | 05:22 |
xuhaiwei | I checked tox.ini just now, max_complexity is 20 in my env | 05:22 |
xuhaiwei | when I changed it to 22, it passed | 05:23 |
Qiming | maybe it is caused by tox or flake8 versions? | 05:24 |
Qiming | I have tox==2.1.1, flake8==2.4.1 | 05:24 |
xuhaiwei | yes, maybe | 05:24 |
Qiming | maybe the gate was not complaining about this because it is running different versions | 05:24 |
xuhaiwei | my flake8 is 2.2.4 | 05:24 |
xuhaiwei | lower than you | 05:25 |
xuhaiwei | I updated flake8 to 2.5.1, but it still happens | 05:26 |
Qiming | your python version? | 05:27 |
xuhaiwei | 2.7.6 | 05:27 |
Qiming | em | 05:28 |
*** Liuqing has quit IRC | 05:28 | |
xuhaiwei | it will pass only if max_complaxity>= 21 | 05:28 |
Qiming | one mitigation I can think of is for you to propose a refactor of the do_create() method | 05:29 |
Qiming | maybe just move some logics out into a private function | 05:29 |
Qiming | then the code passes pep8 for you and everyone else, hopefully | 05:29 |
xuhaiwei | ok | 05:30 |
Qiming | you can tag the commit as 'for haiwei', ;) | 05:30 |
Qiming | gongysh, bro, are you there? | 05:32 |
xuhaiwei | Qiming, I deleted .tox/pep8 and ran tox -epep8 again, it passed this time | 05:33 |
Qiming | okay, something is too old in your tox env | 05:33 |
xuhaiwei | yes | 05:33 |
xuhaiwei | I will split that do_create() method when I am a little free | 05:34 |
Qiming | ok | 05:34 |
Qiming | let's focus on things that are of higher priorities | 05:35 |
xuhaiwei | yes | 05:35 |
*** elynn has quit IRC | 05:52 | |
*** elynn has joined #senlin | 05:56 | |
*** elynn_ has joined #senlin | 06:01 | |
*** elynn has quit IRC | 06:01 | |
Qiming | Yanyanhu, about bug #1525811 | 06:01 |
openstack | bug 1525811 in senlin "Bug happened when attaching policy" [Undecided,New] https://launchpad.net/bugs/1525811 | 06:01 |
openstackgerrit | Merged openstack/senlin: Fix list data type implementation https://review.openstack.org/257223 | 06:01 |
Qiming | please help check if patch #257223 is fixing it | 06:01 |
gongysh | Qiming, hi | 06:10 |
Qiming | gongysh, you guys are doing things related to auditing? | 06:11 |
gongysh | Qiming, I don't think so, but you can ask liuqing | 06:12 |
Qiming | I see | 06:12 |
Qiming | just saw a paper on auditing | 06:12 |
Qiming | anyway, it is not a good paper | 06:12 |
gongysh | o, can u paste the URL? | 06:13 |
Qiming | oh, shit | 06:13 |
Qiming | the title is 'Comments on a Public Auditing Mechanism for Shared Cloud Data Service' | 06:14 |
Qiming | On IEEE Transactions on Services Computing | 06:14 |
Qiming | I just downloaded it, ... | 06:14 |
Qiming | it is only two pages, full of equations | 06:15 |
Qiming | forget it | 06:15 |
gongysh | yes, definitely | 06:16 |
Qiming | I'm shift-deleting it! | 06:16 |
Yanyanhu | hi, Qiming will check it. Thanks | 06:16 |
openstackgerrit | lvdongbing proposed openstack/senlin: Update node status when fail to create nova instance https://review.openstack.org/238753 | 06:23 |
Yanyanhu | hi, Qiming, it works | 06:26 |
Qiming | thanks, Yanyanhu | 06:26 |
Yanyanhu | no problem | 06:26 |
Qiming | xuhaiwei, I like the patch #238753 | 06:26 |
xuhaiwei | so let's merge it :) | 06:27 |
Qiming | wait a minute | 06:27 |
Qiming | the test case is .... | 06:27 |
xuhaiwei | yes, need to improve it | 06:29 |
Qiming | sigh, it is removing a whole test case | 06:29 |
Qiming | ... it looks fine | 06:29 |
xuhaiwei | wait_for_server is not tested | 06:29 |
Qiming | actually, the previous test case is bad | 06:30 |
xuhaiwei | lvdongbing is not in irc? | 06:30 |
Qiming | he is not | 06:30 |
Qiming | so let's get it in | 06:31 |
xuhaiwei | you can comment in the patch | 06:31 |
Qiming | and file a bug about the test case? | 06:31 |
Qiming | we need the patch itself urgently | 06:31 |
Qiming | it has been there for about 20 days now | 06:31 |
xuhaiwei | yes | 06:32 |
Qiming | oh, no, 40 days | 06:32 |
xuhaiwei | you comment in the patch, he will update soon I think | 06:32 |
Qiming | okay, will try this | 06:33 |
*** elynn_ has quit IRC | 07:12 | |
*** elynn_ has joined #senlin | 07:23 | |
*** pratikmallya has joined #senlin | 07:27 | |
openstackgerrit | Qiming Teng proposed openstack/senlin: Fix server get_details when server is not found https://review.openstack.org/257711 | 07:44 |
*** yuanying has quit IRC | 08:05 | |
openstackgerrit | xu-haiwei proposed openstack/python-senlinclient: Don't show show_deleted column in node-list when not needed https://review.openstack.org/257742 | 08:52 |
Qiming | xuhaiwei, about making _short_cluster_id a non-inner function | 09:03 |
Qiming | I'm wondering if we can make it a lamda function? | 09:03 |
xuhaiwei | i will think about it | 09:07 |
Qiming | e.g. line 1055 | 09:07 |
Qiming | 'cluster_id': lambda x: x.cluster_id[:8] if x.cluster_id else '' | 09:08 |
Qiming | never tried it, but it may help remove the need for a function which is not used anywhere else | 09:08 |
xuhaiwei | seems fine | 09:08 |
openstackgerrit | lvdongbing proposed openstack/senlin: Update node status when fail to create nova instance https://review.openstack.org/238753 | 09:12 |
Qiming | em ... https://review.openstack.org/#/c/255983/ | 09:19 |
xuhaiwei | added test not you wanted? | 09:21 |
Qiming | which one? | 09:21 |
xuhaiwei | I am wrong | 09:22 |
xuhaiwei | what do you mean by 255983? | 09:22 |
Qiming | check it | 09:22 |
*** gongysh has quit IRC | 09:23 | |
*** xuhaiwei has quit IRC | 09:33 | |
*** openstackgerrit has quit IRC | 09:47 | |
*** openstackgerrit has joined #senlin | 09:48 | |
openstackgerrit | Qiming Teng proposed openstack/senlin: Implement purge_deleted command https://review.openstack.org/257776 | 09:49 |
Qiming | hello, openstackgerrit, :) | 09:49 |
openstackgerrit | Qiming Teng proposed openstack/senlin: Implement purge_deleted command https://review.openstack.org/257776 | 09:52 |
*** Tiancheng has quit IRC | 09:57 | |
*** zhenguo has quit IRC | 10:08 | |
*** Qiming has quit IRC | 10:10 | |
*** elynn_ has quit IRC | 10:14 | |
openstackgerrit | Merged openstack/senlin: Fix server get_details when server is not found https://review.openstack.org/257711 | 10:30 |
*** openstackgerrit has quit IRC | 10:32 | |
*** openstackgerrit has joined #senlin | 10:33 | |
*** Yanyanhu has quit IRC | 10:43 | |
*** pratikmallya has quit IRC | 10:48 | |
openstackgerrit | Merged openstack/senlin: Update node status when fail to create nova instance https://review.openstack.org/238753 | 10:52 |
*** Qiming has joined #senlin | 11:05 | |
*** zhenguo has joined #senlin | 11:17 | |
*** cschulz has quit IRC | 11:18 | |
*** branw has quit IRC | 11:19 | |
*** gongysh has joined #senlin | 11:53 | |
*** gongysh has quit IRC | 11:54 | |
*** Liuqing has joined #senlin | 12:09 | |
*** lixinhui has joined #senlin | 12:16 | |
*** Tiancheng has joined #senlin | 12:43 | |
*** yanyanhu has joined #senlin | 12:48 | |
*** elynn_ has joined #senlin | 12:58 | |
*** elynn has joined #senlin | 12:58 | |
*** Tiancheng has quit IRC | 13:19 | |
*** Tiancheng has joined #senlin | 13:57 | |
*** elynn has quit IRC | 14:03 | |
*** yanyanhu has quit IRC | 14:03 | |
*** lixinhui has quit IRC | 14:10 | |
*** Qiming has quit IRC | 14:40 | |
*** zhenguo has quit IRC | 14:41 | |
*** Liuqing has quit IRC | 14:52 | |
*** Liuqing has joined #senlin | 14:55 | |
openstackgerrit | Merged openstack/senlin: delete __context__ that unused https://review.openstack.org/257283 | 15:06 |
openstackgerrit | Merged openstack/senlin: Change String to Boolean type when listing cluster policies https://review.openstack.org/257664 | 15:18 |
*** pratikmallya has joined #senlin | 15:30 | |
*** pratikma_ has joined #senlin | 15:34 | |
*** pratikmallya has quit IRC | 15:36 | |
*** Liuqing has quit IRC | 15:37 | |
*** Liuqing has joined #senlin | 15:39 | |
*** Tiancheng has quit IRC | 16:10 | |
*** Liuqing has quit IRC | 16:49 | |
openstackgerrit | OpenStack Proposal Bot proposed openstack/senlin: Updated from global requirements https://review.openstack.org/258074 | 19:00 |
*** pratikma_ has quit IRC | 19:18 | |
*** pratikmallya has joined #senlin | 19:26 | |
*** openstackgerrit has quit IRC | 19:32 | |
*** openstackgerrit has joined #senlin | 19:33 | |
*** pratikma_ has joined #senlin | 20:07 | |
*** pratikmallya has quit IRC | 20:09 | |
*** yuanying has joined #senlin | 23:02 | |
*** yuanying has quit IRC | 23:03 | |
*** yuanying has joined #senlin | 23:04 | |
*** xuhaiwei_ has joined #senlin | 23:35 | |
*** Qiming has joined #senlin | 23:39 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!