)]}'
{"swift/common/utils.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"903b65bb4b23c804222f25f6b2a31b7e3fa844e7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"9f560f44_833e21d8","updated":"2020-08-11 22:38:14.000000000","message":"This was all a red herring from when I first started looking at test failures.","commit_id":"e94c4efa510c162ea424fa4cccf0b50efbc92518"}],"swift/common/wsgi.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"bfd5a70a0082cff8f65b8696d1a063329e791e52","unresolved":false,"context_lines":[{"line_number":951,"context_line":""},{"line_number":952,"context_line":"    def add_pid(self, port, index, pid, sock):"},{"line_number":953,"context_line":"        if self.not_tracking(port):"},{"line_number":954,"context_line":"            self.sock_data_by_port[port] \u003d [(None, None)] * self.servers_per_port"},{"line_number":955,"context_line":"        self.sock_data_by_port[port][index] \u003d (pid, sock)"},{"line_number":956,"context_line":""},{"line_number":957,"context_line":"    def forget_pid(self, pid):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_f5bd1d02","line":954,"updated":"2020-08-11 01:31:38.000000000","message":"pep8: E501 line too long (81 \u003e 79 characters)","commit_id":"4a5bbdbdafaf5493f708b185afed85f6ff08f49f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"903b65bb4b23c804222f25f6b2a31b7e3fa844e7","unresolved":false,"context_lines":[{"line_number":733,"context_line":"        Signal that the server is up and accepting connections."},{"line_number":734,"context_line":"        \"\"\""},{"line_number":735,"context_line":"        if self.signaled_ready:"},{"line_number":736,"context_line":"            return  # Already did it"},{"line_number":737,"context_line":""},{"line_number":738,"context_line":"        # Redirect errors to logger and close stdio. swift-init (for example)"},{"line_number":739,"context_line":"        # uses this to know that the service is ready to accept connections."}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_c31f796e","line":736,"updated":"2020-08-11 22:38:14.000000000","message":"I don\u0027t *think* this should ever trigger, but probably better to have the guard.","commit_id":"e94c4efa510c162ea424fa4cccf0b50efbc92518"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"903b65bb4b23c804222f25f6b2a31b7e3fa844e7","unresolved":false,"context_lines":[{"line_number":775,"context_line":""},{"line_number":776,"context_line":"    def post_fork_hook(self):"},{"line_number":777,"context_line":"        super(WorkersStrategy, self).post_fork_hook()"},{"line_number":778,"context_line":"        del self.children  # children don\u0027t need to keep track of siblings"},{"line_number":779,"context_line":""},{"line_number":780,"context_line":"    def loop_timeout(self):"},{"line_number":781,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_16340dde","line":778,"updated":"2020-08-11 22:38:14.000000000","message":"While testing, I\u0027d run something like\n\n watch -n .1 \u0027lsof -R -i :8080 | sort -k 2\u0027\n\nor\n\n watch -n .1 \u0027lsof -R -i :6016 -i :6017 | sort -k 2\u0027\n\nto keep tabs on who\u0027s got what sockets available. Without this, there was some O(n**2) growth as each newly-forked worker would still have a ref to the other sockets. Pretty sure that\u0027s present on master, too?","commit_id":"e94c4efa510c162ea424fa4cccf0b50efbc92518"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"903b65bb4b23c804222f25f6b2a31b7e3fa844e7","unresolved":false,"context_lines":[{"line_number":849,"context_line":"        if pid in self.children:"},{"line_number":850,"context_line":"            self.logger.error(\u0027Removing dead child %s from parent %s\u0027,"},{"line_number":851,"context_line":"                              pid, os.getpid())"},{"line_number":852,"context_line":"            # XXX: should we attempt to close the socket??"},{"line_number":853,"context_line":"            del self.children[pid]"},{"line_number":854,"context_line":"        else:"},{"line_number":855,"context_line":"            self.logger.info(\u0027Ignoring wait() result from unknown PID %s\u0027, pid)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_a3124561","line":852,"updated":"2020-08-11 22:38:14.000000000","message":"Gut says, probably?","commit_id":"e94c4efa510c162ea424fa4cccf0b50efbc92518"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d044a61055415d1440fe4dfac8c2b492c4ba0773","unresolved":false,"context_lines":[{"line_number":1133,"context_line":"                    strategy.register_worker_start(sock, sock_info, pid)"},{"line_number":1134,"context_line":"                else:"},{"line_number":1135,"context_line":"                    raise Exception("},{"line_number":1136,"context_line":"                        \u0027worker did not start normally: %r\u0027 % worker_status)"},{"line_number":1137,"context_line":""},{"line_number":1138,"context_line":"        # TODO: signal_ready() as soon as we have at least one new worker for"},{"line_number":1139,"context_line":"        # each port, instead of waiting for all of them"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f560f44_5f6a9119","line":1136,"updated":"2020-08-21 04:00:42.000000000","message":"Maybe this is overkill? Seems better to die quickly so some other process manager can intervene than to either spawn workers endlessly or carry on with fewer workers, though.","commit_id":"4f17e52b4fb66dec48bf0883a8cdb04712d4019c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":763,"context_line":"        except ConfigFilePortError:"},{"line_number":764,"context_line":"            msg \u003d \u0027bind_port wasn\\\u0027t properly set in the config file. \u0027 \\"},{"line_number":765,"context_line":"                \u0027It must be explicitly set to a valid port number.\u0027"},{"line_number":766,"context_line":"            return msg"},{"line_number":767,"context_line":""},{"line_number":768,"context_line":"    def no_fork_sock(self):"},{"line_number":769,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_c7905c46","side":"PARENT","line":766,"updated":"2020-08-25 22:37:36.000000000","message":"this method has been completely removed from the strategy interface","commit_id":"d50b50ba8d28eab544b7236cb1d786c16e20f080"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":810,"context_line":""},{"line_number":811,"context_line":"        self.logger.notice(\u0027Started child %s from parent %s\u0027,"},{"line_number":812,"context_line":"                           pid, os.getpid())"},{"line_number":813,"context_line":"        self.children.append(pid)"},{"line_number":814,"context_line":""},{"line_number":815,"context_line":"    def register_worker_exit(self, pid):"},{"line_number":816,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_a793a84e","side":"PARENT","line":813,"updated":"2020-08-25 22:37:36.000000000","message":"i guess really sock was _unused by the worker strategy as well","commit_id":"d50b50ba8d28eab544b7236cb1d786c16e20f080"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":903,"context_line":""},{"line_number":904,"context_line":"        self.sock_data_by_port[port] \u003d {"},{"line_number":905,"context_line":"            \u0027sock\u0027: sock,"},{"line_number":906,"context_line":"            \u0027pids\u0027: [None] * self.servers_per_port,"},{"line_number":907,"context_line":"        }"},{"line_number":908,"context_line":""},{"line_number":909,"context_line":"    def not_tracking(self, port):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_47fbac77","side":"PARENT","line":906,"updated":"2020-08-25 22:37:36.000000000","message":"so we used to have one sock to many pids, now it\u0027s a list of (sock, pid) pairs\n\nthis initialization was getting called by do_bind_ports","commit_id":"d50b50ba8d28eab544b7236cb1d786c16e20f080"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":955,"context_line":"        dead_port, server_idx \u003d port_server_idx"},{"line_number":956,"context_line":"        self.logger.error(\u0027Removing dead child %d (PID: %s) for port %s\u0027,"},{"line_number":957,"context_line":"                          server_idx, pid, dead_port)"},{"line_number":958,"context_line":"        self.sock_data_by_port[dead_port][\u0027pids\u0027][server_idx] \u003d None"},{"line_number":959,"context_line":""},{"line_number":960,"context_line":""},{"line_number":961,"context_line":"class ServersPerPortStrategy(StrategyBase):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_84ee62ea","side":"PARENT","line":958,"updated":"2020-08-25 22:37:36.000000000","message":"good riddance\n\nhttps://review.opendev.org/#/c/184189/19/swift/common/wsgi.py@562","commit_id":"d50b50ba8d28eab544b7236cb1d786c16e20f080"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":979,"context_line":"        self.servers_per_port \u003d servers_per_port"},{"line_number":980,"context_line":"        self.swift_dir \u003d conf.get(\u0027swift_dir\u0027, \u0027/etc/swift\u0027)"},{"line_number":981,"context_line":"        self.ring_check_interval \u003d int(conf.get(\u0027ring_check_interval\u0027, 15))"},{"line_number":982,"context_line":"        self.port_pid_state \u003d PortPidState(servers_per_port, logger)"},{"line_number":983,"context_line":""},{"line_number":984,"context_line":"        bind_ip \u003d conf.get(\u0027bind_ip\u0027, \u00270.0.0.0\u0027)"},{"line_number":985,"context_line":"        self.cache \u003d BindPortsCache(self.swift_dir, bind_ip)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_27cdd85c","side":"PARENT","line":982,"updated":"2020-08-25 22:37:36.000000000","message":"so everything this did has been replaced by the tracking_data dict?  I guess the tracking_data is in some ways a bit simpler...","commit_id":"d50b50ba8d28eab544b7236cb1d786c16e20f080"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":1011,"context_line":"        self._reload_bind_ports()"},{"line_number":1012,"context_line":"        for port in self.bind_ports:"},{"line_number":1013,"context_line":"            self._bind_port(port)"},{"line_number":1014,"context_line":""},{"line_number":1015,"context_line":"    def no_fork_sock(self):"},{"line_number":1016,"context_line":"        \"\"\""},{"line_number":1017,"context_line":"        This strategy does not support running in the foreground."}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_87ee64ea","side":"PARENT","line":1014,"updated":"2020-08-25 22:37:36.000000000","message":"ok, so this was analogous to the standard worker strategy of doing the bind pre-fork","commit_id":"d50b50ba8d28eab544b7236cb1d786c16e20f080"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":1051,"context_line":"            missing_port_index_pairs \u003d desired_port_index_pairs - \\"},{"line_number":1052,"context_line":"                current_port_index_pairs"},{"line_number":1053,"context_line":"            for port, server_idx in sorted(missing_port_index_pairs):"},{"line_number":1054,"context_line":"                if self.port_pid_state.not_tracking(port):"},{"line_number":1055,"context_line":"                    try:"},{"line_number":1056,"context_line":"                        self._bind_port(port)"},{"line_number":1057,"context_line":"                    except Exception as e:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_d5280234","side":"PARENT","line":1054,"updated":"2020-08-25 22:37:36.000000000","message":"so having the pre-bound ports actually complicated this a little here","commit_id":"d50b50ba8d28eab544b7236cb1d786c16e20f080"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"    if error_msg:"},{"line_number":1160,"context_line":"        logger.error(error_msg)"},{"line_number":1161,"context_line":"        print(error_msg)"},{"line_number":1162,"context_line":"        return 1"},{"line_number":1163,"context_line":""},{"line_number":1164,"context_line":"    # Do some daemonization process hygene before we fork any children or run a"},{"line_number":1165,"context_line":"    # server without forking."}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_a499e61f","side":"PARENT","line":1162,"updated":"2020-08-25 22:37:36.000000000","message":"do_bind_ports did more than sanity check the bind_port in the conf was an integer...\n\non startup this was the place we did all of our port binding (in the parent before any strategy forking)","commit_id":"d50b50ba8d28eab544b7236cb1d786c16e20f080"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":1178,"context_line":"        os.close(reexec_signal_fd)"},{"line_number":1179,"context_line":""},{"line_number":1180,"context_line":"    # Finally, signal systemd (if appropriate) that process started properly."},{"line_number":1181,"context_line":"    systemd_notify(logger\u003dlogger)"},{"line_number":1182,"context_line":""},{"line_number":1183,"context_line":"    no_fork_sock \u003d strategy.no_fork_sock()"},{"line_number":1184,"context_line":"    if no_fork_sock:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_812c94ac","side":"PARENT","line":1181,"updated":"2020-08-25 22:37:36.000000000","message":"so it looks like previously all the \"signal ready\" stuff was happening in the parent.","commit_id":"d50b50ba8d28eab544b7236cb1d786c16e20f080"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9a3ede5535b0824fff2216e075cdfe9b569bac2d","unresolved":false,"context_lines":[{"line_number":1178,"context_line":"        os.close(reexec_signal_fd)"},{"line_number":1179,"context_line":""},{"line_number":1180,"context_line":"    # Finally, signal systemd (if appropriate) that process started properly."},{"line_number":1181,"context_line":"    systemd_notify(logger\u003dlogger)"},{"line_number":1182,"context_line":""},{"line_number":1183,"context_line":"    no_fork_sock \u003d strategy.no_fork_sock()"},{"line_number":1184,"context_line":"    if no_fork_sock:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_d083f0c9","side":"PARENT","line":1181,"in_reply_to":"9f560f44_812c94ac","updated":"2020-08-25 23:32:01.000000000","message":"Still does.","commit_id":"d50b50ba8d28eab544b7236cb1d786c16e20f080"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":693,"context_line":"    \"\"\""},{"line_number":694,"context_line":"    def __init__(self, conf, logger):"},{"line_number":695,"context_line":"        self.conf \u003d conf"},{"line_number":696,"context_line":"        self.logger \u003d logger"},{"line_number":697,"context_line":"        self.signaled_ready \u003d False"},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"        # Each strategy is welcome to track data however it likes, but all"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_045532fa","line":696,"updated":"2020-08-25 22:37:36.000000000","message":"both concrete sub-classes were already tracking conf and logger - but the __init__ signature for ServersPerPortStrategy included the number of servers_per_port","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":699,"context_line":"        # Each strategy is welcome to track data however it likes, but all"},{"line_number":700,"context_line":"        # socket refs should be somewhere in this dict. This allows forked-off"},{"line_number":701,"context_line":"        # children to easily drop refs to sibling sockets in post_fork_hook()."},{"line_number":702,"context_line":"        self.tracking_data \u003d {}"},{"line_number":703,"context_line":""},{"line_number":704,"context_line":"    def post_fork_hook(self):"},{"line_number":705,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_a451e610","line":702,"updated":"2020-08-25 22:37:36.000000000","message":"so this was essentially a consolidation and generalization of the two strategies bookkeeping","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":708,"context_line":"        \"\"\""},{"line_number":709,"context_line":""},{"line_number":710,"context_line":"        if not self.signaled_ready:"},{"line_number":711,"context_line":"            capture_stdio(self.logger)"},{"line_number":712,"context_line":"        drop_privileges(self.conf.get(\u0027user\u0027, \u0027swift\u0027))"},{"line_number":713,"context_line":"        del self.tracking_data  # children don\u0027t need to track siblings"},{"line_number":714,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_614180a6","line":711,"updated":"2020-08-25 22:37:36.000000000","message":"what is the relationship of signaled_ready and \"captured io\"","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9a3ede5535b0824fff2216e075cdfe9b569bac2d","unresolved":false,"context_lines":[{"line_number":708,"context_line":"        \"\"\""},{"line_number":709,"context_line":""},{"line_number":710,"context_line":"        if not self.signaled_ready:"},{"line_number":711,"context_line":"            capture_stdio(self.logger)"},{"line_number":712,"context_line":"        drop_privileges(self.conf.get(\u0027user\u0027, \u0027swift\u0027))"},{"line_number":713,"context_line":"        del self.tracking_data  # children don\u0027t need to track siblings"},{"line_number":714,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_50fb60bc","line":711,"in_reply_to":"9f560f44_614180a6","updated":"2020-08-25 23:32:01.000000000","message":"On initial bring-up, the children still need to have their i/o captured; previously, we\u0027d signal ready (and capture i/o) in the parent pre-fork -- but now that we open up sockets as we fork, we\u0027ve gotta wait.","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":709,"context_line":""},{"line_number":710,"context_line":"        if not self.signaled_ready:"},{"line_number":711,"context_line":"            capture_stdio(self.logger)"},{"line_number":712,"context_line":"        drop_privileges(self.conf.get(\u0027user\u0027, \u0027swift\u0027))"},{"line_number":713,"context_line":"        del self.tracking_data  # children don\u0027t need to track siblings"},{"line_number":714,"context_line":""},{"line_number":715,"context_line":"    def shutdown_sockets(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_15f55acb","line":712,"updated":"2020-08-25 22:37:36.000000000","message":"no change to how we\u0027re handling de-escalation, parent can hold uid 0 and rebind to privileged ports if needed.","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":719,"context_line":""},{"line_number":720,"context_line":"        for sock in self.iter_sockets():"},{"line_number":721,"context_line":"            greenio.shutdown_safe(sock)"},{"line_number":722,"context_line":"            sock.close()"},{"line_number":723,"context_line":""},{"line_number":724,"context_line":"    def set_close_on_exec_on_listen_sockets(self):"},{"line_number":725,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_b59c6ec0","line":722,"updated":"2020-08-25 22:37:36.000000000","message":"it\u0027s strange, this method doesn\u0027t LOOK like it\u0027s robust to iter_sockets giving it a None","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9a3ede5535b0824fff2216e075cdfe9b569bac2d","unresolved":false,"context_lines":[{"line_number":719,"context_line":""},{"line_number":720,"context_line":"        for sock in self.iter_sockets():"},{"line_number":721,"context_line":"            greenio.shutdown_safe(sock)"},{"line_number":722,"context_line":"            sock.close()"},{"line_number":723,"context_line":""},{"line_number":724,"context_line":"    def set_close_on_exec_on_listen_sockets(self):"},{"line_number":725,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_d0b650f9","line":722,"in_reply_to":"9f560f44_b59c6ec0","updated":"2020-08-25 23:32:01.000000000","message":"Good catch!","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":735,"context_line":"                # on socket objects is provided to toggle it."},{"line_number":736,"context_line":"                sock.set_inheritable(False)"},{"line_number":737,"context_line":""},{"line_number":738,"context_line":"    def signal_ready(self):"},{"line_number":739,"context_line":"        \"\"\""},{"line_number":740,"context_line":"        Signal that the server is up and accepting connections."},{"line_number":741,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_842ca2ac","line":738,"updated":"2020-08-25 22:37:36.000000000","message":"if there was generic word for swift-init/systemd and (in the one weird case of a seamless-reload) an earlier version of ourself it be nice to use that word here\n\nmaybe \"signal watchdog external monitor ready from parent\"\n\n... to distinguish from the \"ready_callback\" that more of a post-fork notification to a parent that we\u0027re up and running (which, I guess somehow wasn\u0027t something children needed to signal before)","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9a3ede5535b0824fff2216e075cdfe9b569bac2d","unresolved":false,"context_lines":[{"line_number":735,"context_line":"                # on socket objects is provided to toggle it."},{"line_number":736,"context_line":"                sock.set_inheritable(False)"},{"line_number":737,"context_line":""},{"line_number":738,"context_line":"    def signal_ready(self):"},{"line_number":739,"context_line":"        \"\"\""},{"line_number":740,"context_line":"        Signal that the server is up and accepting connections."},{"line_number":741,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_b0a2bcac","line":738,"in_reply_to":"9f560f44_842ca2ac","updated":"2020-08-25 23:32:01.000000000","message":"notify_listening(), maybe?","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":740,"context_line":"        Signal that the server is up and accepting connections."},{"line_number":741,"context_line":"        \"\"\""},{"line_number":742,"context_line":"        if self.signaled_ready:"},{"line_number":743,"context_line":"            return  # Already did it"},{"line_number":744,"context_line":""},{"line_number":745,"context_line":"        # Redirect errors to logger and close stdio. swift-init (for example)"},{"line_number":746,"context_line":"        # uses this to know that the service is ready to accept connections."}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_8aaae96d","line":743,"updated":"2020-08-25 22:37:36.000000000","message":"I haven\u0027t found the context where this gets called twice yet","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9a3ede5535b0824fff2216e075cdfe9b569bac2d","unresolved":false,"context_lines":[{"line_number":740,"context_line":"        Signal that the server is up and accepting connections."},{"line_number":741,"context_line":"        \"\"\""},{"line_number":742,"context_line":"        if self.signaled_ready:"},{"line_number":743,"context_line":"            return  # Already did it"},{"line_number":744,"context_line":""},{"line_number":745,"context_line":"        # Redirect errors to logger and close stdio. swift-init (for example)"},{"line_number":746,"context_line":"        # uses this to know that the service is ready to accept connections."}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_b0bd9cd9","line":743,"in_reply_to":"9f560f44_8aaae96d","updated":"2020-08-25 23:32:01.000000000","message":"Belt \u0026 bracers. IIRC, if we\u0027ve already captured i/o, attempting to do it again hits an AttributeError.","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":767,"context_line":"    WSGI server management strategy object for a single bind port and listen"},{"line_number":768,"context_line":"    socket shared by a configured number of forked-off workers."},{"line_number":769,"context_line":""},{"line_number":770,"context_line":"    Tracking data is a map of ``pid -\u003e socket``."},{"line_number":771,"context_line":""},{"line_number":772,"context_line":"    Used in :py:func:`run_wsgi`."},{"line_number":773,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_c79cdcc1","line":770,"updated":"2020-08-25 22:37:36.000000000","message":"this is because all workers have their own socket now - they\u0027re all bound to the same addr/port - but each has their own","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":800,"context_line":""},{"line_number":801,"context_line":"        # Useful for profiling [no forks]."},{"line_number":802,"context_line":"        if self.worker_count \u003d\u003d 0:"},{"line_number":803,"context_line":"            return get_socket(self.conf)"},{"line_number":804,"context_line":""},{"line_number":805,"context_line":"    def new_worker_socks(self):"},{"line_number":806,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_ca906146","line":803,"updated":"2020-08-25 22:37:36.000000000","message":"oh, we just create it when needed","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":813,"context_line":"        \"\"\""},{"line_number":814,"context_line":""},{"line_number":815,"context_line":"        while len(self.tracking_data) \u003c self.worker_count:"},{"line_number":816,"context_line":"            yield get_socket(self.conf), None"},{"line_number":817,"context_line":""},{"line_number":818,"context_line":"    def log_sock_exit(self, sock, _unused):"},{"line_number":819,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_6aa5d59e","line":816,"updated":"2020-08-25 22:37:36.000000000","message":"ok, so now both new_worker_sockets methods call get_socket for each to be spawned child pid","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":837,"context_line":""},{"line_number":838,"context_line":"        self.logger.notice(\u0027Started child %s from parent %s\u0027,"},{"line_number":839,"context_line":"                           pid, os.getpid())"},{"line_number":840,"context_line":"        self.tracking_data[pid] \u003d sock"},{"line_number":841,"context_line":""},{"line_number":842,"context_line":"    def register_worker_exit(self, pid):"},{"line_number":843,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_67beb0ae","line":840,"updated":"2020-08-25 22:37:36.000000000","message":"and we need this additional tracking information specifically so we can close the sock when a pid dies?","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9a3ede5535b0824fff2216e075cdfe9b569bac2d","unresolved":false,"context_lines":[{"line_number":837,"context_line":""},{"line_number":838,"context_line":"        self.logger.notice(\u0027Started child %s from parent %s\u0027,"},{"line_number":839,"context_line":"                           pid, os.getpid())"},{"line_number":840,"context_line":"        self.tracking_data[pid] \u003d sock"},{"line_number":841,"context_line":""},{"line_number":842,"context_line":"    def register_worker_exit(self, pid):"},{"line_number":843,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_908e982b","line":840,"in_reply_to":"9f560f44_67beb0ae","updated":"2020-08-25 23:32:01.000000000","message":"We may also close it to signal that the child should gracefully exit. Check USR1 and HUP handling. Note that in this patch, only the parent handles them well.","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":857,"context_line":"            self.logger.error(\u0027Removing dead child %s from parent %s\u0027,"},{"line_number":858,"context_line":"                              pid, os.getpid())"},{"line_number":859,"context_line":"            greenio.shutdown_safe(sock)"},{"line_number":860,"context_line":"            sock.close()"},{"line_number":861,"context_line":""},{"line_number":862,"context_line":"    def iter_sockets(self):"},{"line_number":863,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_a7e1e8d2","line":860,"updated":"2020-08-25 22:37:36.000000000","message":"so the worker is already dead, but we\u0027re having to close it\u0027s socket?  Once we hand a socket off to a worker do we mostly keep the reference so can close it?","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9a3ede5535b0824fff2216e075cdfe9b569bac2d","unresolved":false,"context_lines":[{"line_number":857,"context_line":"            self.logger.error(\u0027Removing dead child %s from parent %s\u0027,"},{"line_number":858,"context_line":"                              pid, os.getpid())"},{"line_number":859,"context_line":"            greenio.shutdown_safe(sock)"},{"line_number":860,"context_line":"            sock.close()"},{"line_number":861,"context_line":""},{"line_number":862,"context_line":"    def iter_sockets(self):"},{"line_number":863,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_d0ddb041","line":860,"in_reply_to":"9f560f44_a7e1e8d2","updated":"2020-08-25 23:32:01.000000000","message":"Yeah, including closing the listen socket out from under the child, which signals it to shutdown gracefully.","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":875,"context_line":"    `servers_per_port` integer config setting determines how many workers are"},{"line_number":876,"context_line":"    run per port."},{"line_number":877,"context_line":""},{"line_number":878,"context_line":"    Tracking data is a map like ``port -\u003e [(pid, socket), ...]``."},{"line_number":879,"context_line":""},{"line_number":880,"context_line":"    Used in :py:func:`run_wsgi`."},{"line_number":881,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_47b0cc43","line":878,"updated":"2020-08-25 22:37:36.000000000","message":"because each port gets their own pool of workers who each have their own socket","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":886,"context_line":"    \"\"\""},{"line_number":887,"context_line":""},{"line_number":888,"context_line":"    def __init__(self, conf, logger, servers_per_port):"},{"line_number":889,"context_line":"        super(ServersPerPortStrategy, self).__init__(conf, logger)"},{"line_number":890,"context_line":"        self.servers_per_port \u003d servers_per_port"},{"line_number":891,"context_line":"        self.swift_dir \u003d conf.get(\u0027swift_dir\u0027, \u0027/etc/swift\u0027)"},{"line_number":892,"context_line":"        self.ring_check_interval \u003d int(conf.get(\u0027ring_check_interval\u0027, 15))"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_846142d6","line":889,"updated":"2020-08-25 22:37:36.000000000","message":"ok, so we moved a little bit of initialization to super","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9a3ede5535b0824fff2216e075cdfe9b569bac2d","unresolved":false,"context_lines":[{"line_number":886,"context_line":"    \"\"\""},{"line_number":887,"context_line":""},{"line_number":888,"context_line":"    def __init__(self, conf, logger, servers_per_port):"},{"line_number":889,"context_line":"        super(ServersPerPortStrategy, self).__init__(conf, logger)"},{"line_number":890,"context_line":"        self.servers_per_port \u003d servers_per_port"},{"line_number":891,"context_line":"        self.swift_dir \u003d conf.get(\u0027swift_dir\u0027, \u0027/etc/swift\u0027)"},{"line_number":892,"context_line":"        self.ring_check_interval \u003d int(conf.get(\u0027ring_check_interval\u0027, 15))"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_d0b2d0e4","line":889,"in_reply_to":"9f560f44_846142d6","updated":"2020-08-25 23:32:01.000000000","message":"Yeah, with the tracking_data getting dropped in the common post-fork hook, I realized I wanted the initialization to happen in the parent class, too. So may as well bring in conf and logger.","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":900,"context_line":"    def _bind_port(self, port):"},{"line_number":901,"context_line":"        new_conf \u003d self.conf.copy()"},{"line_number":902,"context_line":"        new_conf[\u0027bind_port\u0027] \u003d port"},{"line_number":903,"context_line":"        return get_socket(new_conf)"},{"line_number":904,"context_line":""},{"line_number":905,"context_line":"    def loop_timeout(self):"},{"line_number":906,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_6714f0e9","line":903,"updated":"2020-08-25 22:37:36.000000000","message":"so get_socket hasn\u0027t changed and this method dropped the bookkeeping so we must have changed who\u0027s calling it?","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9a3ede5535b0824fff2216e075cdfe9b569bac2d","unresolved":false,"context_lines":[{"line_number":900,"context_line":"    def _bind_port(self, port):"},{"line_number":901,"context_line":"        new_conf \u003d self.conf.copy()"},{"line_number":902,"context_line":"        new_conf[\u0027bind_port\u0027] \u003d port"},{"line_number":903,"context_line":"        return get_socket(new_conf)"},{"line_number":904,"context_line":""},{"line_number":905,"context_line":"    def loop_timeout(self):"},{"line_number":906,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_f0fd546e","line":903,"in_reply_to":"9f560f44_6714f0e9","updated":"2020-08-25 23:32:01.000000000","message":"So new_worker_socks() yields out the new sockets, we fork, wait for the child to start up on the socket, and do the bookkeeping in register_worker_start().","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":941,"context_line":"            (p, i)"},{"line_number":942,"context_line":"            for p, port_data in self.tracking_data.items()"},{"line_number":943,"context_line":"            for i, (pid, sock) in enumerate(port_data)"},{"line_number":944,"context_line":"            if pid is not None}"},{"line_number":945,"context_line":""},{"line_number":946,"context_line":"        if desired_port_index_pairs !\u003d current_port_index_pairs:"},{"line_number":947,"context_line":"            # Orphan ports are ports which had object-server processes running,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_e47e3e68","line":944,"updated":"2020-08-25 22:37:36.000000000","message":"is the nested for loop comprehension more obvious?\n\n        current_port_index_pairs \u003d set()\n        for port, pid_state in self.sock_data_by_port.items():\n            current_port_index_pairs |\u003d set(\n                (port, i)\n                for i, pid in enumerate(pid_state[\u0027pids\u0027])\n                if pid is not None)\n        return current_port_index_pairs\n\nhard for me to say\n\nI do think it\u0027s a little better inline","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":974,"context_line":"                    \u0027Closing unnecessary sock for port %d (child pid %d)\u0027,"},{"line_number":975,"context_line":"                    port, pid)"},{"line_number":976,"context_line":"                self.tracking_data[port][idx] \u003d (None, None)"},{"line_number":977,"context_line":"                if all(sock is None"},{"line_number":978,"context_line":"                       for _pid, sock in self.tracking_data[port]):"},{"line_number":979,"context_line":"                    del self.tracking_data[port]"},{"line_number":980,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_35cdfe65","line":977,"updated":"2020-08-25 22:37:36.000000000","message":"I think it\u0027s reasonable/correct to assume if sock is None so is pid","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":976,"context_line":"                self.tracking_data[port][idx] \u003d (None, None)"},{"line_number":977,"context_line":"                if all(sock is None"},{"line_number":978,"context_line":"                       for _pid, sock in self.tracking_data[port]):"},{"line_number":979,"context_line":"                    del self.tracking_data[port]"},{"line_number":980,"context_line":""},{"line_number":981,"context_line":"    def log_sock_exit(self, sock, data):"},{"line_number":982,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_159f1a50","line":979,"updated":"2020-08-25 22:37:36.000000000","message":"this is needed when a port is removed from the ring, but doing it every orphan might be optimal","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9a3ede5535b0824fff2216e075cdfe9b569bac2d","unresolved":false,"context_lines":[{"line_number":976,"context_line":"                self.tracking_data[port][idx] \u003d (None, None)"},{"line_number":977,"context_line":"                if all(sock is None"},{"line_number":978,"context_line":"                       for _pid, sock in self.tracking_data[port]):"},{"line_number":979,"context_line":"                    del self.tracking_data[port]"},{"line_number":980,"context_line":""},{"line_number":981,"context_line":"    def log_sock_exit(self, sock, data):"},{"line_number":982,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_30406ca5","line":979,"in_reply_to":"9f560f44_159f1a50","updated":"2020-08-25 23:32:01.000000000","message":"I mean, I guess I could collect the orphaned ports and loop over them separately. *shrug*","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":1001,"context_line":"        self.logger.notice(\u0027Started child %d (PID %d) for port %d\u0027,"},{"line_number":1002,"context_line":"                           server_idx, pid, port)"},{"line_number":1003,"context_line":"        if port not in self.tracking_data:"},{"line_number":1004,"context_line":"            self.tracking_data[port] \u003d [(None, None)] * self.servers_per_port"},{"line_number":1005,"context_line":"        self.tracking_data[port][server_idx] \u003d (pid, sock)"},{"line_number":1006,"context_line":""},{"line_number":1007,"context_line":"    def register_worker_exit(self, pid):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_153d5aba","line":1004,"updated":"2020-08-25 22:37:36.000000000","message":"we\u0027re now doing our tracking_data initialization JIT","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":1017,"context_line":"                    port_data[idx] \u003d (None, None)"},{"line_number":1018,"context_line":"                    greenio.shutdown_safe(sock)"},{"line_number":1019,"context_line":"                    sock.close()"},{"line_number":1020,"context_line":"                    return"},{"line_number":1021,"context_line":""},{"line_number":1022,"context_line":"    def iter_sockets(self):"},{"line_number":1023,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_f53ee688","line":1020,"updated":"2020-08-25 22:37:36.000000000","message":"so at worker exit we *always* close the socket and throw away the reference.  We\u0027re never reusing a child socket - they\u0027re always unique to the worker.","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9a3ede5535b0824fff2216e075cdfe9b569bac2d","unresolved":false,"context_lines":[{"line_number":1017,"context_line":"                    port_data[idx] \u003d (None, None)"},{"line_number":1018,"context_line":"                    greenio.shutdown_safe(sock)"},{"line_number":1019,"context_line":"                    sock.close()"},{"line_number":1020,"context_line":"                    return"},{"line_number":1021,"context_line":""},{"line_number":1022,"context_line":"    def iter_sockets(self):"},{"line_number":1023,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_b0159c9e","line":1020,"in_reply_to":"9f560f44_f53ee688","updated":"2020-08-25 23:32:01.000000000","message":"Yeah, might be better if I did re-use the socket... that should let any connected-but-not-accepted connections still get serviced...","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":1026,"context_line":""},{"line_number":1027,"context_line":"        for port_data in self.tracking_data.values():"},{"line_number":1028,"context_line":"            for _pid, sock in port_data:"},{"line_number":1029,"context_line":"                yield sock"},{"line_number":1030,"context_line":""},{"line_number":1031,"context_line":""},{"line_number":1032,"context_line":"def run_wsgi(conf_path, app_section, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_b5858e5c","line":1029,"updated":"2020-08-25 22:37:36.000000000","message":"it\u0027s more clear now from local context just looking at the method above that tracking_data will at some times have port_data that is (None, None)","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9a3ede5535b0824fff2216e075cdfe9b569bac2d","unresolved":false,"context_lines":[{"line_number":1026,"context_line":""},{"line_number":1027,"context_line":"        for port_data in self.tracking_data.values():"},{"line_number":1028,"context_line":"            for _pid, sock in port_data:"},{"line_number":1029,"context_line":"                yield sock"},{"line_number":1030,"context_line":""},{"line_number":1031,"context_line":""},{"line_number":1032,"context_line":"def run_wsgi(conf_path, app_section, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_b07abced","line":1029,"in_reply_to":"9f560f44_b5858e5c","updated":"2020-08-25 23:32:01.000000000","message":"Yeah, I should probably filter those out here...","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":1069,"context_line":"                \u0027It must be explicitly set to a valid port number.\u0027"},{"line_number":1070,"context_line":"            logger.error(error_msg)"},{"line_number":1071,"context_line":"            print(error_msg)"},{"line_number":1072,"context_line":"            return 1"},{"line_number":1073,"context_line":""},{"line_number":1074,"context_line":"    # patch event before loadapp"},{"line_number":1075,"context_line":"    utils.eventlet_monkey_patch()"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_44056a45","line":1072,"updated":"2020-08-25 22:37:36.000000000","message":"this seems to be riffing off do_bind_ports","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9a3ede5535b0824fff2216e075cdfe9b569bac2d","unresolved":false,"context_lines":[{"line_number":1069,"context_line":"                \u0027It must be explicitly set to a valid port number.\u0027"},{"line_number":1070,"context_line":"            logger.error(error_msg)"},{"line_number":1071,"context_line":"            print(error_msg)"},{"line_number":1072,"context_line":"            return 1"},{"line_number":1073,"context_line":""},{"line_number":1074,"context_line":"    # patch event before loadapp"},{"line_number":1075,"context_line":"    utils.eventlet_monkey_patch()"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_907df8e8","line":1072,"in_reply_to":"9f560f44_44056a45","updated":"2020-08-25 23:32:01.000000000","message":"Didn\u0027t want to lose the check.","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":1088,"context_line":"    # server without forking."},{"line_number":1089,"context_line":"    clean_up_daemon_hygiene()"},{"line_number":1090,"context_line":""},{"line_number":1091,"context_line":"    no_fork_sock \u003d strategy.no_fork_sock()"},{"line_number":1092,"context_line":"    if no_fork_sock:"},{"line_number":1093,"context_line":"        run_server(conf, logger, no_fork_sock, global_conf\u003dglobal_conf,"},{"line_number":1094,"context_line":"                   ready_callback\u003dstrategy.signal_ready)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_0a825900","line":1091,"updated":"2020-08-25 22:37:36.000000000","message":"if we\u0027re not calling do_bind_ports who\u0027s creating this socket?","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":1091,"context_line":"    no_fork_sock \u003d strategy.no_fork_sock()"},{"line_number":1092,"context_line":"    if no_fork_sock:"},{"line_number":1093,"context_line":"        run_server(conf, logger, no_fork_sock, global_conf\u003dglobal_conf,"},{"line_number":1094,"context_line":"                   ready_callback\u003dstrategy.signal_ready)"},{"line_number":1095,"context_line":"        return 0"},{"line_number":1096,"context_line":""},{"line_number":1097,"context_line":"    def stop_with_signal(signum, *args):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_c4bdfad8","line":1094,"updated":"2020-08-25 22:37:36.000000000","message":"no fork strategy preserves the \"signal ready\" bookkeeping by passing in the base strategy default impl\u0027s signal_ready function - which will get called inline - but essentially still in the \"parent\" (i.e. ONLY) process","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"64ee8c612eca9a6245775795130629678427d805","unresolved":false,"context_lines":[{"line_number":1106,"context_line":"    signal.signal(signal.SIGUSR1, stop_with_signal)"},{"line_number":1107,"context_line":""},{"line_number":1108,"context_line":"    while running_context[0]:"},{"line_number":1109,"context_line":"        for sock, sock_info in strategy.new_worker_socks():"},{"line_number":1110,"context_line":"            read_fd, write_fd \u003d os.pipe()"},{"line_number":1111,"context_line":"            pid \u003d os.fork()"},{"line_number":1112,"context_line":"            if pid \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_2aaaa66f","line":1109,"updated":"2020-08-26 19:33:19.000000000","message":"i\u0027m not sure why i was worried about \"loosing\" do_bind_ports - we\u0027re still going to try and get the socket here in the parent - and that\u0027s BEFORE we close our io!","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":1107,"context_line":""},{"line_number":1108,"context_line":"    while running_context[0]:"},{"line_number":1109,"context_line":"        for sock, sock_info in strategy.new_worker_socks():"},{"line_number":1110,"context_line":"            read_fd, write_fd \u003d os.pipe()"},{"line_number":1111,"context_line":"            pid \u003d os.fork()"},{"line_number":1112,"context_line":"            if pid \u003d\u003d 0:"},{"line_number":1113,"context_line":"                os.close(read_fd)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_6497ce46","line":1110,"updated":"2020-08-25 22:37:36.000000000","message":"this looks similar to the sigusr1 ready signal stuff - but it\u0027s totally new","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9a3ede5535b0824fff2216e075cdfe9b569bac2d","unresolved":false,"context_lines":[{"line_number":1107,"context_line":""},{"line_number":1108,"context_line":"    while running_context[0]:"},{"line_number":1109,"context_line":"        for sock, sock_info in strategy.new_worker_socks():"},{"line_number":1110,"context_line":"            read_fd, write_fd \u003d os.pipe()"},{"line_number":1111,"context_line":"            pid \u003d os.fork()"},{"line_number":1112,"context_line":"            if pid \u003d\u003d 0:"},{"line_number":1113,"context_line":"                os.close(read_fd)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_b0f11c6e","line":1110,"in_reply_to":"9f560f44_6497ce46","updated":"2020-08-25 23:32:01.000000000","message":"Maybe overkill? I feel like I managed to hit some troubles where a child didn\u0027t come up cleanly, though, and I don\u0027t want the parent to notify that *it\u0027s* ready unless the children are all happy.","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":1117,"context_line":"                strategy.post_fork_hook()"},{"line_number":1118,"context_line":""},{"line_number":1119,"context_line":"                def notify():"},{"line_number":1120,"context_line":"                    os.write(write_fd, b\u0027ready\u0027)"},{"line_number":1121,"context_line":"                    os.close(write_fd)"},{"line_number":1122,"context_line":""},{"line_number":1123,"context_line":"                run_server(conf, logger, sock, ready_callback\u003dnotify)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_04e532dc","line":1120,"updated":"2020-08-25 22:37:36.000000000","message":"this looks like all the workers are writing the same key to the same pipe at nearly the same time.","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9a3ede5535b0824fff2216e075cdfe9b569bac2d","unresolved":false,"context_lines":[{"line_number":1117,"context_line":"                strategy.post_fork_hook()"},{"line_number":1118,"context_line":""},{"line_number":1119,"context_line":"                def notify():"},{"line_number":1120,"context_line":"                    os.write(write_fd, b\u0027ready\u0027)"},{"line_number":1121,"context_line":"                    os.close(write_fd)"},{"line_number":1122,"context_line":""},{"line_number":1123,"context_line":"                run_server(conf, logger, sock, ready_callback\u003dnotify)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_b0c8fc21","line":1120,"in_reply_to":"9f560f44_04e532dc","updated":"2020-08-25 23:32:01.000000000","message":"Nope, each worker gets its own pipe. We can safely do the function definition in the loop because of the return below.","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"64ee8c612eca9a6245775795130629678427d805","unresolved":false,"context_lines":[{"line_number":1117,"context_line":"                strategy.post_fork_hook()"},{"line_number":1118,"context_line":""},{"line_number":1119,"context_line":"                def notify():"},{"line_number":1120,"context_line":"                    os.write(write_fd, b\u0027ready\u0027)"},{"line_number":1121,"context_line":"                    os.close(write_fd)"},{"line_number":1122,"context_line":""},{"line_number":1123,"context_line":"                run_server(conf, logger, sock, ready_callback\u003dnotify)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_6ab93eca","line":1120,"in_reply_to":"9f560f44_b0c8fc21","updated":"2020-08-26 19:33:19.000000000","message":"Thank you for clarifying for me, i had mis-conceptualized something","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":1126,"context_line":"            else:"},{"line_number":1127,"context_line":"                os.close(write_fd)"},{"line_number":1128,"context_line":"                worker_status \u003d os.read(read_fd, 30)"},{"line_number":1129,"context_line":"                os.close(read_fd)"},{"line_number":1130,"context_line":"                # TODO: delay this status checking until after we\u0027ve tried"},{"line_number":1131,"context_line":"                # to start all workers. But, we currently use the register"},{"line_number":1132,"context_line":"                # event to know when we\u0027ve got enough workers :-/"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_24cdd65c","line":1129,"updated":"2020-08-25 22:37:36.000000000","message":"if one of the workers post_fork_hook is slow can they get a BrokenPipeError","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9a3ede5535b0824fff2216e075cdfe9b569bac2d","unresolved":false,"context_lines":[{"line_number":1126,"context_line":"            else:"},{"line_number":1127,"context_line":"                os.close(write_fd)"},{"line_number":1128,"context_line":"                worker_status \u003d os.read(read_fd, 30)"},{"line_number":1129,"context_line":"                os.close(read_fd)"},{"line_number":1130,"context_line":"                # TODO: delay this status checking until after we\u0027ve tried"},{"line_number":1131,"context_line":"                # to start all workers. But, we currently use the register"},{"line_number":1132,"context_line":"                # event to know when we\u0027ve got enough workers :-/"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_d0ead071","line":1129,"in_reply_to":"9f560f44_24cdd65c","updated":"2020-08-25 23:32:01.000000000","message":"? How slow? What? FWIW, the 30 isn\u0027t a timeout, it\u0027s a read length.","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"64ee8c612eca9a6245775795130629678427d805","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"                os.close(read_fd)"},{"line_number":1130,"context_line":"                # TODO: delay this status checking until after we\u0027ve tried"},{"line_number":1131,"context_line":"                # to start all workers. But, we currently use the register"},{"line_number":1132,"context_line":"                # event to know when we\u0027ve got enough workers :-/"},{"line_number":1133,"context_line":"                if worker_status \u003d\u003d b\u0027ready\u0027:"},{"line_number":1134,"context_line":"                    strategy.register_worker_start(sock, sock_info, pid)"},{"line_number":1135,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_2ac3c639","line":1132,"updated":"2020-08-26 19:33:19.000000000","message":"we\u0027re making a pipe, forking a worker, _waiting_ for it start, then we do same for the next one - all serially\n\nthis comment is suggesting we could do all the forking, THEN wait for all the ready signals (but pre-existing new_worker_socks/register interface isn\u0027t favorable to that)\n\nthis one is probably worth pushing on harder tho - it could possibly have a significant impact on startup time with lots of workers","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"902d9dc0d3500378c374a3da45afe3424d3de2b1","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"                os.close(read_fd)"},{"line_number":1130,"context_line":"                # TODO: delay this status checking until after we\u0027ve tried"},{"line_number":1131,"context_line":"                # to start all workers. But, we currently use the register"},{"line_number":1132,"context_line":"                # event to know when we\u0027ve got enough workers :-/"},{"line_number":1133,"context_line":"                if worker_status \u003d\u003d b\u0027ready\u0027:"},{"line_number":1134,"context_line":"                    strategy.register_worker_start(sock, sock_info, pid)"},{"line_number":1135,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_d013c7ff","line":1132,"in_reply_to":"9f560f44_2ac3c639","updated":"2020-09-02 18:15:45.000000000","message":"This was the real win of having a do_bind_ports in the strategy API :-/ I\u0027ve got something fairly nice for workers, let me see what I can do for servers_per_port...\n\nI\u0027m not sure that the verify-workers-started-normally is strictly necessary or useful...","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"64ee8c612eca9a6245775795130629678427d805","unresolved":false,"context_lines":[{"line_number":1137,"context_line":"                        \u0027worker did not start normally: %r\u0027 % worker_status)"},{"line_number":1138,"context_line":""},{"line_number":1139,"context_line":"        # TODO: signal_ready() as soon as we have at least one new worker for"},{"line_number":1140,"context_line":"        # each port, instead of waiting for all of them"},{"line_number":1141,"context_line":"        strategy.signal_ready()"},{"line_number":1142,"context_line":""},{"line_number":1143,"context_line":"        # The strategy may need to pay attention to something in addition to"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_0abec2ac","line":1140,"updated":"2020-08-26 19:33:19.000000000","message":"I don\u0027t think so waiting until everybody is up and running is FINE","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":1138,"context_line":""},{"line_number":1139,"context_line":"        # TODO: signal_ready() as soon as we have at least one new worker for"},{"line_number":1140,"context_line":"        # each port, instead of waiting for all of them"},{"line_number":1141,"context_line":"        strategy.signal_ready()"},{"line_number":1142,"context_line":""},{"line_number":1143,"context_line":"        # The strategy may need to pay attention to something in addition to"},{"line_number":1144,"context_line":"        # child process exits (like new ports showing up in a ring)."}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_a4c286e7","line":1141,"updated":"2020-08-25 22:37:36.000000000","message":"just keeping it straight in my head, this \"signal ready\" stuff is still happening in the parent","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9a3ede5535b0824fff2216e075cdfe9b569bac2d","unresolved":false,"context_lines":[{"line_number":1138,"context_line":""},{"line_number":1139,"context_line":"        # TODO: signal_ready() as soon as we have at least one new worker for"},{"line_number":1140,"context_line":"        # each port, instead of waiting for all of them"},{"line_number":1141,"context_line":"        strategy.signal_ready()"},{"line_number":1142,"context_line":""},{"line_number":1143,"context_line":"        # The strategy may need to pay attention to something in addition to"},{"line_number":1144,"context_line":"        # child process exits (like new ports showing up in a ring)."}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_50f6c05e","line":1141,"in_reply_to":"9f560f44_a4c286e7","updated":"2020-08-25 23:32:01.000000000","message":"Yup -- workers call run_server then return.","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cf5fec2bc84f1b9220337c4448477cca2eb9b4d5","unresolved":false,"context_lines":[{"line_number":1198,"context_line":"        # the re-exec\u0027ed server\u0027s old listen sockets aren\u0027t closed-on-exec,"},{"line_number":1199,"context_line":"        # then the old server can\u0027t actually ever exit."},{"line_number":1200,"context_line":"        strategy.set_close_on_exec_on_listen_sockets()"},{"line_number":1201,"context_line":"        read_fd, write_fd \u003d os.pipe()"},{"line_number":1202,"context_line":"        orig_server_pid \u003d os.getpid()"},{"line_number":1203,"context_line":"        child_pid \u003d os.fork()"},{"line_number":1204,"context_line":"        if child_pid:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_04a9b28e","line":1201,"updated":"2020-08-25 22:37:36.000000000","message":"ok, so we didn\u0027t move any of the sigusr1 pipe handling","commit_id":"452db14a0929cde71edd0a240655dd763d3bcbf2"}],"test/unit/common/test_wsgi.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"bfd5a70a0082cff8f65b8696d1a063329e791e52","unresolved":false,"context_lines":[{"line_number":788,"context_line":"        def _global_conf_callback(preloaded_app_conf, global_conf):"},{"line_number":789,"context_line":"            calls[\u0027_global_conf_callback\u0027] +\u003d 1"},{"line_number":790,"context_line":"            self.assertEqual("},{"line_number":791,"context_line":"                preloaded_app_conf, {\u0027__file__\u0027: \u0027test\u0027, \u0027workers\u0027: 0, \u0027bind_port\u0027: 12345})"},{"line_number":792,"context_line":"            self.assertEqual(global_conf, {\u0027log_name\u0027: \u0027log_name\u0027})"},{"line_number":793,"context_line":"            global_conf[\u0027test1\u0027] \u003d to_inject"},{"line_number":794,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_d5b8d911","line":791,"updated":"2020-08-11 01:31:38.000000000","message":"pep8: E501 line too long (91 \u003e 79 characters)","commit_id":"4a5bbdbdafaf5493f708b185afed85f6ff08f49f"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"8aeeb19918b7423d04bb24d76cb754509c50b543","unresolved":false,"context_lines":[{"line_number":788,"context_line":"        def _global_conf_callback(preloaded_app_conf, global_conf):"},{"line_number":789,"context_line":"            calls[\u0027_global_conf_callback\u0027] +\u003d 1"},{"line_number":790,"context_line":"            self.assertEqual("},{"line_number":791,"context_line":"                preloaded_app_conf, {\u0027__file__\u0027: \u0027test\u0027, \u0027workers\u0027: 0, \u0027bind_port\u0027: 12345})"},{"line_number":792,"context_line":"            self.assertEqual(global_conf, {\u0027log_name\u0027: \u0027log_name\u0027})"},{"line_number":793,"context_line":"            global_conf[\u0027test1\u0027] \u003d to_inject"},{"line_number":794,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_5047b777","line":791,"updated":"2020-08-11 06:13:12.000000000","message":"pep8: E501 line too long (91 \u003e 79 characters)","commit_id":"e94c4efa510c162ea424fa4cccf0b50efbc92518"}]}
