| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-nova - 2019-03-20 | |||
| 10:13:22 | stephenfin | Those modules being 'oslo_config.sphinxext', 'oslo_policy.sphinxext' and 'sphinx.ext.apidoc' | |
| 10:13:25 | sean-k-mooney | mdbooth: i think in docs/sources/conf.py | |
| 10:13:28 | stephenfin | mdbooth: doc/source/conf.py | |
| 10:13:39 | sean-k-mooney | i was so close :) | |
| 10:14:36 | openstackgerrit | Balazs Gibizer proposed openstack/nova-specs master: Update Network Bandwidth resource provider spec https://review.openstack.org/644810 | |
| 10:19:12 | mdbooth | stephenfin: autodoc_mock_imports = ["nova.monkey_patch"] does not appear to mock nova.monkey_patch | |
| 10:20:25 | sean-k-mooney | mdbooth: whatabout autodoc_mock_imports = ["eventlet"] ? | |
| 10:20:57 | mdbooth | Just trying, but I am disappoint | |
| 10:21:52 | stephenfin | mdbooth: Hmm, out of curiosity, doesn't this mean that simply importing 'nova' will trigger the monkey patching so, regardless of whether it's Sphinx importing it or something else? | |
| 10:22:02 | mdbooth | That also appears not to be mocked. | |
| 10:22:25 | mdbooth | stephenfin: Well *anything* importing one of these classes will apply monkey patching | |
| 10:22:31 | mdbooth | But this has always been true | |
| 10:22:51 | mdbooth | In this specific instance, I've moved the wsgi entry point, though | |
| 10:23:02 | stephenfin | and what's changed? | |
| 10:23:11 | sean-k-mooney | stephenfin: the classes that triggered the auto monkey patching in the past did not contain any reuable busines loginc | |
| 10:23:14 | mdbooth | It used to be in nova/api/openstack/wsgi_app.py, it's now in nova/api/openstack/__init__.py | |
| 10:23:25 | mdbooth | However, it has *always* been in nova/cmd/__init__.py | |
| 10:23:34 | sean-k-mooney | ya | |
| 10:24:05 | sean-k-mooney | nova/cmd/__init__.py was done so that when we use setup tools to generate the console scipts | |
| 10:24:16 | mdbooth | sean-k-mooney: The reusable aspect of my patch is a side effect | |
| 10:24:23 | sean-k-mooney | the import of the commands monkey patched it automatically | |
| 10:24:43 | mdbooth | Primarily it *fixes* the non-wsgi and wsgi imports to do monkey patching before importing anything else | |
| 10:24:54 | mdbooth | It's a bugfix, not a cleanup | |
| 10:24:58 | sean-k-mooney | mdbooth: yes | |
| 10:25:09 | sean-k-mooney | but the point i was try to make was | |
| 10:25:24 | sean-k-mooney | if you wrote a tool that just imported our config definiton | |
| 10:25:34 | sean-k-mooney | say to do a config migration or to generate the files | |
| 10:25:48 | sean-k-mooney | then before it would not monkey patch your tool | |
| 10:26:09 | sean-k-mooney | depending on where you put the call that may or may not change | |
| 10:26:48 | mdbooth | stephenfin: How would you feel if I set an environment variable in sphinx tox.ini which nova.monkey_patch used to skip monkey patching? | |
| 10:26:57 | mdbooth | Or conf.py | |
| 10:27:40 | stephenfin | mdbooth: I'm all for it | |
| 10:29:07 | stephenfin | With a giant NOTE explaining why we do this craziness | |
| 10:29:32 | mdbooth | stephenfin: Heh, of course | |
| 10:29:47 | mdbooth | stephenfin: nova.monkey_patch is itself now a giant NOTE | |
| 10:30:20 | sean-k-mooney | stephenfin: im hoping in train we can remove the need to monkey patch the wsgi api code. | |
| 10:30:28 | stephenfin | U, you mean? | |
| 10:30:36 | sean-k-mooney | no in trian | |
| 10:30:48 | stephenfin | Oh, sorry, just the WSGI piece | |
| 10:30:52 | sean-k-mooney | it was a regression in the multi cell list feither | |
| 10:30:58 | mdbooth | Indeed | |
| 10:30:58 | sean-k-mooney | *feature | |
| 10:31:05 | sean-k-mooney | ya just the wsgi piece | |
| 10:31:34 | mdbooth | Although, tbh it's flaky as hell and we need to remove the whole thing. | |
| 10:31:41 | sean-k-mooney | doing it in general is proably not worth it but eventlets and wsgi are not partcally happy bedfellows | |
| 10:32:16 | mdbooth | Our entry points are not sufficiently well defined to do this. Specifically, monkey patching on import is a bad idea, but our entry points leave us with no other choice. | |
| 10:32:19 | sean-k-mooney | mdbooth: ya that proably a U thing but futuriest actully has eveything i waned by asyncio form python3 | |
| 10:32:56 | sean-k-mooney | mdbooth: ya | |
| 10:33:53 | sean-k-mooney | fortunetly or not depending on your perspective we dont alter those entry points frequently so the sting and ductape we have been using in the past has been enough | |
| 10:59:32 | aspiers | is it just me or is tempest-full-py broken? "The error was: 'gabbi_tempest_path' is undefined\n\nThe error appears to have been in '/var/lib/zuul/builds/42292da2453549e68ae6c1e63bfca00b/untrusted/project_5/git.openstack.org/openstack/tempest/roles/setup-tempest-run-dir/tasks/main.yaml'" | |
| 11:00:10 | cdent | blargh, that sounds like it is at least partially my fault | |
| 11:00:27 | cdent | (because of gabbi in the name) but I haven't changed anything recently | |
| 11:00:32 | aspiers | cdent: failure is in https://review.openstack.org/#/c/644554/ | |
| 11:00:35 | cdent | thanks | |
| 11:03:06 | cdent | aspiers: looks like it has already been fixed | |
| 11:03:11 | aspiers | oh nice | |
| 11:03:34 | cdent | https://review.openstack.org/#/c/644699/ | |
| 11:04:27 | cdent | hmm, actually I think that may have broken it | |
| 11:04:33 | aspiers | haha | |
| 11:06:40 | cdent | aspiers: it is a fix, the reason it wasn't happening before is because it didn't tickle a problem until ansible 2.7 was the default | |
| 11:06:52 | aspiers | ah ok | |
| 11:06:54 | aspiers | thanks! | |
| 11:06:58 | aspiers | is it just me or does the browser not cache these horrendously long job-output.txt.gz files? | |
| 11:07:20 | cdent | I think it does not | |
| 11:07:35 | aspiers | I see my Chrome sending Cache-Control: no-cache with the request - wtf? | |
| 11:07:43 | aspiers | Why would it do that? | |
| 11:08:19 | cdent | I think it is because the server is not sending good headers | |
| 11:08:34 | cdent | there's no last-modified or other cache-related header in the headers of the response | |
| 11:08:44 | aspiers | I see Cache-Control in the response | |
| 11:09:04 | aspiers | but surely it's the Apache index page which should control how the client sends a request for the actual file | |
| 11:09:13 | aspiers | http://logs.openstack.org/54/644554/2/check/tempest-full-py3/42292da/ <- this one | |
| 11:09:23 | sean-k-mooney | aspiers: do you have the developer console open | |
| 11:09:32 | aspiers | sean-k-mooney: ohhhh, good point | |
| 11:09:33 | cdent | if I do a raw curl of the log file you linked to above and the headers are very limited | |
| 11:09:39 | sean-k-mooney | aspiers: there is a tick box to disable cache | |
| 11:09:47 | aspiers | sean-k-mooney: thanks for the reminder! | |
| 11:12:07 | aspiers | ok so unticking "Disable cache" gets rid of no-cache headers, but it's still re-downloading the full file each time | |
| 11:12:29 | cdent | because of what I said: the server isn't providing enough info to allow useful caching | |
| 11:13:07 | aspiers | so it's missing an Expires: header? | |
| 11:13:15 | aspiers | or Last-Modified | |
| 11:13:19 | aspiers | or Date | |
| 11:13:20 | cdent | or a last-modified, or a cache-control, or an etag or lots of thing | |
| 11:13:32 | cdent | Date is the server date, not the date of the content | |
| 11:13:43 | mdbooth | cdent stephenfin: Docs loads oslo policies from nova.api.openstack.placement.policies because it's defined in setup.cfg and I guess it's not unreasonable to document those things. Problem is I moved the monkey patching point to nova/api/openstack/__init__.py, so now that pulls in monkey patching. | |
| 11:14:12 | cdent | yeah, fine, I tried to delete that code ! :) | |
| 11:14:12 | sean-k-mooney | aspiers: that just an issue with the apache config for the instance thats is fronting logs.openstack.org | |
| 11:14:21 | mdbooth | cdent: Yeah, if you could move that out of the way... | |
| 11:14:28 | aspiers | sean-k-mooney: yeah, I'm gonna ask infra about that | |
| 11:14:32 | aspiers | https://httpd.apache.org/docs/2.4/caching.html | |
| 11:14:57 | sean-k-mooney | well in generaly what is the point of allowing cdns to cache logs.openstack.org | |
| 11:15:18 | sean-k-mooney | the browser sure but i dont hink we can do one without the other | |
| 11:15:23 | sean-k-mooney | maybe we can | |
| 11:15:34 | cdent | mdbooth: i'll do it on saturday, with a tps repoert | |
| 11:16:21 | sean-k-mooney | aspiers: actully its proably fine to cache it so if they want to update it it proably wont have any negitive impact | |
| 11:16:35 | aspiers | right, because the paths are unique | |
| 11:16:36 | sean-k-mooney | most logs on logs.openstack.org never get read anyway | |
| 11:16:50 | cdent | they could relatively easily have a last-modified header | |
| 11:16:57 | cdent | which would at least allow a conditional get | |
| 11:17:16 | sean-k-mooney | yep each run is a new file even for the same patch so you will never get cached old data where the content on the server has changed | |
| 11:20:41 | kashyap | mdbooth: Want to give your final ACK/NACK on this: https://review.openstack.org/#/c/641981/ | |