)]}'
{"nova/api/openstack/wsgi_app.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b51aeb18794271fe2f448afbb3d0e349a8e92e5e","unresolved":true,"context_lines":[{"line_number":79,"context_line":"    conf_files \u003d _get_config_files()"},{"line_number":80,"context_line":"    # NOTE(gibi): sys.argv is set by the wsgi runner e.g. uwsgi sets it based"},{"line_number":81,"context_line":"    # on the --pyargv parameter of the uwsgi binary"},{"line_number":82,"context_line":"    config.parse_args(sys.argv, default_config_files\u003dconf_files)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    logging.setup(CONF, \"nova\")"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ece9ed32_f73add1c","line":82,"updated":"2020-11-23 14:16:04.000000000","message":"sys.argv would normally be set by the python inteperter based on the arges that the script is ran with.\n\nsince this is changed in wsgi_app this wont affect the nova-api console sript correct.\n\ne.g. \u0027nova-api compute__cpu_dedicated_set\u003d\"1-4\"\u0027  wont automatically start parsing the values\n\nin theory if we passed them as direct arges like that it should if this was common betwen them and we used the oslo format for envionment vairables.\n\nin anycase this change does make sense to me.\n\nby useing [] instead of sys.argv we were ignoring --config before.","commit_id":"abecb04aaaf2b47fcdfa1ad1fee35eb8c6751e49"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"81f9c417a698c221fda00322158af2dab0002fd8","unresolved":true,"context_lines":[{"line_number":79,"context_line":"    conf_files \u003d _get_config_files()"},{"line_number":80,"context_line":"    # NOTE(gibi): sys.argv is set by the wsgi runner e.g. uwsgi sets it based"},{"line_number":81,"context_line":"    # on the --pyargv parameter of the uwsgi binary"},{"line_number":82,"context_line":"    config.parse_args(sys.argv, default_config_files\u003dconf_files)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    logging.setup(CONF, \"nova\")"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"6e6f8621_78fd981f","line":82,"in_reply_to":"ece9ed32_f73add1c","updated":"2020-11-25 11:01:10.000000000","message":"The existing pattern looks valid to me, parse_args() will manage sys.argv directly.","commit_id":"abecb04aaaf2b47fcdfa1ad1fee35eb8c6751e49"}],"nova/tests/unit/api/test_wsgi.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f38e77b75c67ef18ef02120cf1976cac2c59edc8","unresolved":true,"context_lines":[{"line_number":58,"context_line":"    @mock.patch(\u0027paste.deploy.loadapp\u0027, new\u003dmock.Mock())"},{"line_number":59,"context_line":"    def test_init_application_passes_sys_argv_to_config(self):"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        sys.argv \u003d mock.sentinel.argv"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        with mock.patch(\u0027nova.config.parse_args\u0027) as mock_parse_args:"},{"line_number":64,"context_line":"            wsgi_app.init_application(\u0027test-app\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"4a6974eb_941a8788","line":61,"updated":"2020-11-23 12:57:53.000000000","message":"As the test shows this is a bad idea without any cleanup","commit_id":"74421ab620f049b363a657c48f5039a0e2a6d04e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"47fb32389510d2234ae836b3c9f0de5f15eaff6a","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    @mock.patch(\u0027paste.deploy.loadapp\u0027, new\u003dmock.Mock())"},{"line_number":59,"context_line":"    def test_init_application_passes_sys_argv_to_config(self):"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        sys.argv \u003d mock.sentinel.argv"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        with mock.patch(\u0027nova.config.parse_args\u0027) as mock_parse_args:"},{"line_number":64,"context_line":"            wsgi_app.init_application(\u0027test-app\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"13580109_623e88da","line":61,"in_reply_to":"4a6974eb_941a8788","updated":"2020-11-23 13:17:46.000000000","message":"Done","commit_id":"74421ab620f049b363a657c48f5039a0e2a6d04e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b51aeb18794271fe2f448afbb3d0e349a8e92e5e","unresolved":true,"context_lines":[{"line_number":59,"context_line":"    @mock.patch(\u0027paste.deploy.loadapp\u0027, new\u003dmock.Mock())"},{"line_number":60,"context_line":"    def test_init_application_passes_sys_argv_to_config(self):"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        with utils.temporary_mutation(sys, argv\u003dmock.sentinel.argv):"},{"line_number":63,"context_line":"            with mock.patch(\u0027nova.config.parse_args\u0027) as mock_parse_args:"},{"line_number":64,"context_line":"                wsgi_app.init_application(\u0027test-app\u0027)"},{"line_number":65,"context_line":"                mock_parse_args.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":2,"id":"405f7e35_96ba7417","line":62,"range":{"start_line":62,"start_character":47,"end_line":62,"end_character":66},"updated":"2020-11-23 14:16:04.000000000","message":"that is a good use of that feature.\ni always forget about it","commit_id":"abecb04aaaf2b47fcdfa1ad1fee35eb8c6751e49"}],"releasenotes/notes/support-sys.argv-in-wsgi-app-2dc5006f9e9e5f9e.yaml":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f2962f151d92a1e8c50327cff8020cb70ad08444","unresolved":true,"context_lines":[{"line_number":4,"context_line":"    Now nova-api and nova-api-metadata WSGI services support command line"},{"line_number":5,"context_line":"    arguments similarly to other nova services. For example these services"},{"line_number":6,"context_line":"    now support specifying mutliple config files via --config-file parameter."},{"line_number":7,"context_line":"    Please note that passing command line arguments to WSGI apps depends on"},{"line_number":8,"context_line":"    the given WSGI runner. For example uwsgi supports this via the --pyargv"},{"line_number":9,"context_line":"    parameter of the uwsgi binary."}],"source_content_type":"text/x-yaml","patch_set":3,"id":"d5762309_c358c6fa","line":9,"range":{"start_line":7,"start_character":4,"end_line":9,"end_character":34},"updated":"2020-11-25 14:53:52.000000000","message":"good call.","commit_id":"d38b7e13a6c3c2f8a932f9a55305502b47f2e0b2"}]}
