| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-nova - 2021-02-18 | |||
| 14:47:58 | bauzas | again, not convinced from the experience I have of various linters | |
| 14:48:15 | bauzas | and again, python is all duck typing | |
| 14:48:39 | bauzas | having developers convinced of the opposite seems terrible to me frankly | |
| 14:49:10 | bauzas | the fact is, OpenStack is made with python, OK | |
| 14:49:26 | bauzas | but it's just a language | |
| 14:49:54 | bauzas | and we shouldn't be doing pythonesque things because of python, but rather because we want it | |
| 14:50:51 | sean-k-mooney | bauzas: i think the different is that we disagree on what improves the code | |
| 14:51:51 | bauzas | being explicit on the fact that return has to return None doesn't sound to me a major improvement :) | |
| 14:52:37 | bauzas | and a linter never proved me enough confidence in the fact we would write better code | |
| 14:52:51 | bauzas | better code is written by people who better understand code | |
| 14:52:56 | sean-k-mooney | it depens how far you take it. if you look at c++ for example being able to annotate funcitons with nodiscard is powerful | |
| 14:53:18 | bauzas | and code reviews certainly help more than any linter | |
| 14:53:21 | sean-k-mooney | e.g. it allows you to state if you dont at least store and preferebaly check the retrun value then its a logic error | |
| 14:53:39 | bauzas | like, the best comments from stephenfin would never be caught by a linter | |
| 14:53:57 | bauzas | and I feel we are distracting ourselves | |
| 14:54:17 | sean-k-mooney | true but i think type hint aid understanding. we dont have to use them but i think we would have better code if we did | |
| 14:54:32 | bauzas | giving us false confidence that we will improve our internal APIs | |
| 14:55:11 | bauzas | fwiw, I did a lot of programming with strong typed languages | |
| 14:55:12 | sean-k-mooney | well i have seen too many bugs cause by using incorrect data in our tests to think that if we enforced type better it would not happen | |
| 14:55:25 | bauzas | and I never saw this being a benefit for distributed programming | |
| 14:55:41 | sean-k-mooney | python is a stongly typed language | |
| 14:55:46 | bauzas | Java pursues the idea that annotations help microservices | |
| 14:55:48 | sean-k-mooney | its just not staticly typed | |
| 14:56:12 | bauzas | but trust me, you can write terrible microservices in Java despite using annotations | |
| 14:56:23 | sean-k-mooney | of coruce you can | |
| 14:56:32 | sean-k-mooney | its a tool like any other | |
| 14:56:37 | bauzas | right | |
| 14:56:42 | sean-k-mooney | you can always missuse a tool if you dont understand it | |
| 14:57:05 | bauzas | but if a tool (or a process), instead of easing my work, requires me to further work, this doesn't sound to me then right | |
| 14:57:46 | sean-k-mooney | well personly i always found the parms in docs sting unhelpfull and a hinderance to future work | |
| 14:57:57 | bauzas | and here, explicitly stating "return None" in order to get my code merged doesn't sound to me great at most | |
| 14:58:02 | sean-k-mooney | they get out of data and you have to check it | |
| 14:58:38 | sean-k-mooney | well you are relying on an implict convertion to None otherwise | |
| 14:58:47 | sean-k-mooney | if you just do return | |
| 14:58:52 | bauzas | sean-k-mooney: they get out of data by lack of solid reviews | |
| 14:58:53 | sean-k-mooney | return None is more explcit | |
| 14:59:09 | sean-k-mooney | not eveyone know if you do return it accutly become the same a return None | |
| 14:59:49 | bauzas | again, that's why we have Gerrit | |
| 15:00:04 | bauzas | humans are the best linters by far | |
| 15:00:30 | sean-k-mooney | im not sure this is getting us anywhere productive | |
| 15:01:06 | sean-k-mooney | and since im currently in a low to moderate amount of pain im goignto try an get some work done sorry | |
| 15:01:21 | gibi | bauzas: return None is price to gain every benefit of mypy, it is not return None that directly helps you | |
| 15:03:59 | gibi | return None enables mypy to helps us :) | |
| 15:04:16 | bauzas | gibi: my other concern is that we currently make mypy fencing our gate | |
| 15:04:29 | sean-k-mooney | bauzas: we dont | |
| 15:04:39 | bauzas | sean-k-mooney: really ? | |
| 15:04:45 | sean-k-mooney | its not enforced by ci | |
| 15:04:58 | sean-k-mooney | unless we put it in the pep8 job | |
| 15:05:04 | sean-k-mooney | but i did not think we did | |
| 15:05:08 | bauzas | then, can I leave "return" without explicitely following it by "None" ? | |
| 15:05:20 | sean-k-mooney | let me check | |
| 15:05:45 | bauzas | in the past, we decided which PEPs we were following | |
| 15:06:08 | sean-k-mooney | oh sorry ya we do https://github.com/openstack/nova/blob/master/tox.ini#L57 | |
| 15:06:14 | sean-k-mooney | but only on the files we have enabled | |
| 15:06:20 | sean-k-mooney | thats why im miss remembering | |
| 15:06:35 | bauzas | right, my point | |
| 15:06:44 | bauzas | anyway, 1:1 now | |
| 15:06:58 | gibi | bauzas: what we are fencing against is a half done mypy support. If you don't want to use mypy you dont add any annotation to a function the mypy will assume Any | |
| 15:07:01 | sean-k-mooney | if its not listed in https://github.com/openstack/nova/blob/master/mypy-files.txt we currently dont enforce it | |
| 15:07:22 | gibi | bauzas: as soon as you added some annotation to a function then you have to make it complete and consistent for mypy | |
| 15:07:29 | gibi | we are fencing against that | |
| 15:07:38 | gibi | to avoid wrong type annotation | |
| 15:07:50 | gibi | as wrong annotation is worst than no annotation | |
| 15:07:58 | sean-k-mooney | yep | |
| 15:08:17 | sean-k-mooney | its worse then no annotation | |
| 15:09:00 | stephenfin | bauzas: Don't you feel we're going in roundabouts here? :) | |
| 15:10:02 | artom | Yeah, but you're Irish, so you're going round the other way | |
| 15:10:50 | sean-k-mooney | lol | |
| 15:11:20 | sean-k-mooney | did people see the securit sig email a few minuts ago | |
| 15:13:02 | sean-k-mooney | https://bugs.launchpad.net/nova/+bug/1798904 might be mitgated by the patches for https://bugs.launchpad.net/neutron/+bug/1734320 the last of which is https://review.opendev.org/c/openstack/nova/+/602432 | |
| 15:13:05 | openstack | Launchpad bug 1798904 in os-vif "tenant isolation is bypassed if port admin-state-up=false" [Critical,Confirmed] - Assigned to sean mooney (sean-k-mooney) | |
| 15:13:06 | openstack | Launchpad bug 1734320 in os-vif "Eavesdropping private traffic" [High,Fix released] - Assigned to sean mooney (sean-k-mooney) | |
| 15:13:25 | openstackgerrit | Stephen Finucane proposed openstack/nova master: Use neutronclient's port binding APIs https://review.opendev.org/c/openstack/nova/+/706295 | |
| 15:13:27 | sean-k-mooney | https://bugs.launchpad.net/nova/+bug/1552042 im not familar with | |
| 15:13:28 | openstack | Launchpad bug 1552042 in OpenStack Compute (nova) "Host data corruption through nova inject_key feature" [Medium,In progress] - Assigned to Matt Riedemann (mriedem) | |
| 15:14:34 | openstackgerrit | Sylvain Bauza proposed openstack/nova master: Add net & utils methods for routed nets & segments https://review.opendev.org/c/openstack/nova/+/773976 | |
| 15:14:43 | sean-k-mooney | looks like mriedem was trying to remove the file injefction feature with https://review.opendev.org/c/openstack/nova/+/324720/ | |
| 15:14:45 | openstackgerrit | Sylvain Bauza proposed openstack/nova master: Add a routed networks scheduler pre-filter https://review.opendev.org/c/openstack/nova/+/749068 | |
| 15:20:02 | gibi | artom: lol | |
| 15:34:07 | sean-k-mooney | gibi: fyi just updated https://bugs.launchpad.net/nova/+bug/1798904 with my current understanding perhapes we shoudl review https://bugs.launchpad.net/nova/+bug/1552042 in the team call | |
| 15:34:09 | openstack | Launchpad bug 1798904 in os-vif "tenant isolation is bypassed if port admin-state-up=false" [Critical,Confirmed] - Assigned to sean mooney (sean-k-mooney) | |
| 15:34:10 | openstack | Launchpad bug 1552042 in OpenStack Compute (nova) "Host data corruption through nova inject_key feature" [Medium,In progress] - Assigned to Matt Riedemann (mriedem) | |
| 15:34:31 | sean-k-mooney | by which i mean nova meeting | |
| 15:36:49 | sean-k-mooney | stephenfin: have we removed file injection yet? | |
| 15:37:57 | stephenfin | I don't think so | |
| 15:38:04 | stephenfin | From nova, you mean? | |
| 15:38:09 | sean-k-mooney | ya | |
| 15:38:15 | sean-k-mooney | we deprecated it queens for removal | |
| 15:38:15 | stephenfin | I don't think we can without bumping out minimum API microversion | |
| 15:38:17 | stephenfin | *our | |
| 15:38:20 | stephenfin | Right? | |
| 15:38:34 | sean-k-mooney | well you just deleted half of the hyperviors api | |
| 15:38:43 | sean-k-mooney | and remove xen specifc ones last cycle | |
| 15:38:55 | sean-k-mooney | so we could | |
| 15:39:07 | stephenfin | That's different though | |
| 15:39:22 | sean-k-mooney | how | |
| 15:39:52 | sean-k-mooney | you flat out removed api with no fallback | |
| 15:40:24 | stephenfin | Right, but this would involve suggested removing certain microversions and keeping the rest of the API | |
| 15:40:33 | sean-k-mooney | we partly have doe this by the way in https://github.com/openstack/nova/blob/e6f5e814050a19d6f027037424556b2889514ec3/nova/api/openstack/compute/rest_api_version_history.rst#257 | |
| 15:40:45 | stephenfin | Or at least having those microversions behave differently on one server than another | |