Earlier  
Posted Nick Remark
#openstack-nova - 2021-06-09
11:17:40 swp20 i'll abandon this patch and talk to my customer.
12:45:35 opendevreview Stephen Finucane proposed openstack/nova master: requirements: Add typing-paramiko https://review.opendev.org/c/openstack/nova/+/795533
12:45:47 stephenfin gate is down - we need that (and the related requirements fix) to unblock it ^
12:46:24 stephenfin s/down/broken/
12:49:01 opendevreview Stephen Finucane proposed openstack/nova master: requirements: Add types-paramiko https://review.opendev.org/c/openstack/nova/+/795533
13:03:19 lyarwood stephenfin: Why the Depends-On?
13:03:36 stephenfin because we need to get it in u-c before the requirements job will pass, no?
13:06:27 lyarwood stephenfin: ah does that actually fail if we don't have a uc for a given test-requirement?
13:06:36 lyarwood TIL
13:06:39 stephenfin I'm pretty sure it does, yeah
13:08:33 amodi lyarwood: hi, can u help out with the issue in https://review.opendev.org/c/openstack/whitebox-tempest-plugin/+/786979, when u can. i don't have a devstack env to debug
13:08:50 lyarwood stephenfin: requirements-check looks like it's failing in the nova change
13:09:18 lyarwood ERROR: Package 'types-paramiko' is used in test-requirements.txt but not in lower-constraints.txt
13:09:30 stephenfin drat, will fix
13:10:09 gibi stephenfin: what is the way to reproduce the issue? I run tox -e mypy -r locally but it passes on nova master
13:10:10 lyarwood amodi: looking
13:11:26 stephenfin gibi: that did the trick for me. Only odd thing for me is the use of Python 3.9
13:11:30 stephenfin since it's F34
13:11:50 opendevreview Stephen Finucane proposed openstack/nova master: requirements: Add types-paramiko https://review.opendev.org/c/openstack/nova/+/795533
13:11:55 stephenfin lyarwood: ^
13:11:57 gibi gibizer@riverbed:~/upstream/git/nova [master] [000] [15:09:30]
13:12:01 gibi $ source .tox/shared/bin/activate
13:12:03 gibi gibizer@riverbed:~/upstream/git/nova (shared)[master] [000] [15:11:46]
13:12:07 gibi $ python --version
13:12:09 gibi I use python 3.9 too
13:12:12 gibi Python 3.9.2
13:12:14 gibi gibizer@riverbed:~/upstream/git/nova (shared)[master] [000] [15:11:48]
13:12:22 stephenfin odd
13:12:30 stephenfin here's the first failing job I saw https://review.opendev.org/c/openstack/nova/+/778547
13:12:36 stephenfin look at the pep8 env
13:13:35 sean-k-mooney stephenfin: what is types-paramiko used for
13:13:42 stephenfin type hints for paramiko
13:13:51 sean-k-mooney which is what the ssh lib we use
13:13:56 stephenfin correct
13:14:13 sean-k-mooney hum its not really a test-requireemnt is it
13:14:27 stephenfin it is. mypy isn't a runtime dependency
13:14:27 sean-k-mooney oh for the mypy job?
13:14:33 sean-k-mooney ok
13:15:19 sean-k-mooney stephenfin: did you ever add mypy to pre-commit?
13:15:37 stephenfin not yet, no. Just haven't set aside the time to figure it out
13:15:46 sean-k-mooney no worries
13:16:19 gibi I cannot reproduce it with pep8 env either. but it seem my machine installs a bit older mypy than the gate job
13:19:10 tosky melwitt: I think there is a chicken-and-egg problem with the backports, you may either need to squash them (but maybe that would be too much) or set the failing legacy job in the first patch to non-vpting, to have it replaced with a native one with one of the newer patches
13:19:30 gibi stephenfin: OK it needs a new mypy version to
13:19:31 gibi o
13:19:40 lyarwood amodi: updated, can you build a devstack env and get this passing before you push another revision?
13:20:09 gibi stephenfin: it does not fail with mypy==0.812 but it fails with mypy==0.901
13:20:51 stephenfin hmm, good spot. I saw the release date on types-paramiko was pretty recent so I figured that was it
13:20:59 stephenfin I'll see if I can figure out what changed
13:21:19 lyarwood so we could cap mypy to unblock the gate instead right?
13:21:20 amodi lyarwood: um, i havent deployed one in a long time and how would i deploy with these parameters, ill hv to figure out
13:21:43 sean-k-mooney lyarwood: ya that would work if we use UC for it
13:22:31 stephenfin lyarwood: we'd have to cap it
13:22:33 stephenfin no uncap
13:22:37 stephenfin the higher version is the issue
13:22:49 sean-k-mooney its in test-requrimets not installed in the tox.ini
13:23:07 sean-k-mooney so if we cap it in upper-constratints in the requirements repo it shoudl work
13:23:18 gibi stephenfin: "The upcoming switch to modular typeshed in mypy 0.900"
13:23:24 gibi that was hit us
13:23:27 stephenfin ahhh
13:23:32 kashyap stephenfin: Saw your review on that display change. I'll respond in a bit
13:23:36 kashyap Thank you
13:23:38 stephenfin wonderful \o/
13:23:46 gibi https://mypy-lang.blogspot.com/2021/05/the-upcoming-switch-to-modular-typeshed.html
13:24:03 gibi we are lucky that only one thing was missing so far :)
13:24:32 sean-k-mooney :( non nova type definition we can steal
13:26:10 sean-k-mooney i wonder is there a way we can tell it to ignore third party libs if the hints are not present
13:26:49 sean-k-mooney i.e. can we supress the error and maybe make ti a warning
13:29:19 sean-k-mooney "You can also now run mypy --install-types to install all missing stub packages in the mypy run (or the previous run, if you don’t pass any files to check): "
13:29:59 sean-k-mooney we could look at that or perhaps using --ignore-missing-imports
13:30:17 stephenfin We already have that configured via '[mypy] ignore_missing_imports = true' in setup.cfg
13:30:26 stephenfin apparently it doesn't work for things in typeshed
13:30:36 sean-k-mooney ya it is ignored for thing that were previously bundeled
13:30:41 sean-k-mooney https://mypy-lang.blogspot.com/2021/06/
13:30:48 sean-k-mooney https://mypy-lang.blogspot.com/2021/06/mypy-0900-released.html
13:31:26 sean-k-mooney oh TypeGuard we can now do user defined narrowing
13:31:39 amodi lyarwood: https://review.opendev.org/c/openstack/whitebox-tempest-plugin/+/786979/20/whitebox_tempest_plugin/config.py#138
13:34:32 sean-k-mooney stephenfin: do we want to consider adding mypy --install-types to the command
13:34:46 sean-k-mooney before we run mypy
13:34:51 stephenfin hmm, that would be a good short-term fix
13:35:04 stephenfin long-term though, I suspect these things might want to be tracked?
13:35:15 sean-k-mooney im not sure
13:35:20 sean-k-mooney they might want to be yes
13:35:43 sean-k-mooney but since its just for type checking im not sure
13:35:56 stephenfin fair point
13:35:59 stephenfin lemme try that
13:40:48 sean-k-mooney stephenfin: by the way we could use https://github.com/pre-commit/mirrors-mypy
13:41:09 opendevreview Rodrigo Barbieri proposed openstack/nova stable/victoria: Error anti-affinity violation on migrations https://review.opendev.org/c/openstack/nova/+/795542
13:42:49 stephenfin 'mypy --install-types' is interactive
13:42:50 stephenfin :(
13:43:04 stephenfin so I have to pipe 'yes' into it
13:43:05 stephenfin lovely
13:43:35 stephenfin sean-k-mooney: https://github.com/python/mypy/issues/10600#issuecomment-857351152
13:43:38 stephenfin see next comment
13:43:45 stephenfin I wouldn't recommend running --install-types as it currently works in CI, since in the worst case it can almost double the mypy runtime. It also produces noisy output, as mentioned above.
13:43:51 stephenfin </quote>
13:44:15 stephenfin so we can do it to unblock the gate, but it definitely shouldn't stay
13:44:26 sean-k-mooney stephenfin: ok i guess we can just run it once do a freeze before and after and see what it adds
13:44:31 sean-k-mooney if this happens again
13:44:37 stephenfin Successfully installed types-cryptography-0.1.1 types-enum34-0.1.5 types-ipaddress-0.1.2 types-paramiko-0.1.3

Earlier   Later