)]}'
{"ovsdbapp/venv.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"7051dbc1a6d79d6cdc62aeaecf02fce07b207809","unresolved":false,"context_lines":[{"line_number":161,"context_line":"                    exists \u0026\u003d os.path.isfile(path)"},{"line_number":162,"context_line":"                    lookup_paths.add(os.path.dirname(path))"},{"line_number":163,"context_line":"                if exists:"},{"line_number":164,"context_line":"                    return os.path.dirname(path)"},{"line_number":165,"context_line":"        msg \u003d \u0027Either ovn-nb.ovsschema and/or ovn-sb.ovsschema are missing. \u0027"},{"line_number":166,"context_line":"        msg +\u003d \u0027Looked for schemas in paths:\u0027 + \u0027, \u0027.join(sorted(lookup_paths))"},{"line_number":167,"context_line":"        raise FileNotFoundError("}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_465f994c","line":164,"updated":"2020-01-22 12:58:27.000000000","message":"Why don\u0027t you just generate the possible list of paths and the check them?\n\nE.g.:\nimport itertools\ndistributions \u003d (\n    OvsOvnVenvFixture.OVN_DISTRIBUTION,\n    OvsOvnVenvFixture.OVS_DISTRIBUTION)  # this can be a constant too\npaths \u003d itertools.product((\u0027usr\u0027, ), (\u0027local\u0027, \u0027\u0027), distributions, OvsOvnVenvFixture.OVN_SCHEMA_FILES)\n\nfor path in paths:\n    if os.path.isfile(path):\n        return os.path.dirname(path)","commit_id":"1916876bd20f70ac3c3216f96c0356546cdec2d4"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"73013208a85a884bb5fe57fbc6931f72f4355b69","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        self.add_chassis \u003d kwargs.pop(\u0027add_chassis\u0027, False)"},{"line_number":139,"context_line":"        self.ovndir \u003d kwargs.pop(\u0027ovndir\u0027,"},{"line_number":140,"context_line":"                                 install_share_path) or install_share_path"},{"line_number":141,"context_line":"        self.PATH_VAR_TEMPLATE +\u003d ("},{"line_number":142,"context_line":"            \":{0}/controller:{0}/northd:{0}/utilities\".format("},{"line_number":143,"context_line":"                self.ovndir))"},{"line_number":144,"context_line":"        super(OvsOvnVenvFixture, self).__init__(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_c7bcdcb7","line":141,"updated":"2020-01-22 22:43:19.000000000","message":"There are other issues with the path handling like this where we set path even if we aren\u0027t passing in an ovndir to override the system-installed, etc. I spent some time doing an alternate version https://review.opendev.org/#/c/703883/ that makes things a little more consistent between the OvsVenvFixture and OvsOvnVenvFixture.","commit_id":"4641022c46736b600f56b5d2ba281b0b31573d55"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"fc8dd1e1c554e193d3e994acc3b9178b81e5c3aa","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        self.add_chassis \u003d kwargs.pop(\u0027add_chassis\u0027, False)"},{"line_number":139,"context_line":"        self.ovndir \u003d kwargs.pop(\u0027ovndir\u0027,"},{"line_number":140,"context_line":"                                 install_share_path) or install_share_path"},{"line_number":141,"context_line":"        self.PATH_VAR_TEMPLATE +\u003d ("},{"line_number":142,"context_line":"            \":{0}/controller:{0}/northd:{0}/utilities\".format("},{"line_number":143,"context_line":"                self.ovndir))"},{"line_number":144,"context_line":"        super(OvsOvnVenvFixture, self).__init__(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_27aa9019","line":141,"in_reply_to":"3fa7e38b_c7bcdcb7","updated":"2020-01-22 22:47:18.000000000","message":"I should mention, I don\u0027t care if we use my version--but we should fold in some of the other things it fixes. Always possible I\u0027m missing something that this patch fixes. (Especially since when I run the tests locally for https://review.opendev.org/#/c/701733/ w/o this patch or my patch, it completes fine...","commit_id":"4641022c46736b600f56b5d2ba281b0b31573d55"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"73013208a85a884bb5fe57fbc6931f72f4355b69","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    @staticmethod"},{"line_number":148,"context_line":"    def _get_install_share_path():"},{"line_number":149,"context_line":"        ovn_file_paths \u003d itertools.product("},{"line_number":150,"context_line":"            (os.path.sep, ), (\u0027usr\u0027, ), (\u0027local\u0027, \u0027\u0027), (\u0027share\u0027, \u0027\u0027),"},{"line_number":151,"context_line":"            (\u0027openvswitch\u0027, \u0027\u0027), (\u0027ovn\u0027, ), (\u0027ovn-nb.ovsschema\u0027, ))"},{"line_number":152,"context_line":"        for ovn_file_path in ovn_file_paths:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_27fcd03d","line":149,"updated":"2020-01-22 22:43:19.000000000","message":"While I like the ingenuity here, I\u0027m not sure we should make someone spend the mental energy to actually understand it. :)\n\nAlso, this produces things like /usr/local/share/openvswitch/ovn/ovn-nb.ovsschema, which I don\u0027t think has ever been a thing (only /usr/local/share/openvswitch/ovn-nb.ovsschema) unless I\u0027m mistaken (which happens). :D","commit_id":"4641022c46736b600f56b5d2ba281b0b31573d55"}]}
