)]}'
{"releasenotes/notes/get-vars-from-kwargs-57cb5fab5fe8f2e2.yaml":[{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"5059bd27ebc1b8e498ddd63097140dafd4773567","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - add the ability to pass in the arguments \u0027run_at\u0027, \u0027artifacts\u0027, \u0027run_id\u0027,"},{"line_number":4,"context_line":"    \u0027run_meta\u0027, and \u0027run_meta\u0027 from a programatic call, rather than from conf"},{"line_number":5,"context_line":"    or via command line."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"9f6a8fd7_7d45d4b2","line":5,"updated":"2018-04-17 19:56:20.000000000","message":"This doesn\u0027t actually say where these arguments are passed into. When you looked at the rendered release notes: http://logs.openstack.org/36/543836/5/check/build-openstack-releasenotes/d035d02/html/unreleased.html#new-features as an end user you would have no idea what this was talking about. We should update this to include the API call this is referring to and we also should mention that there is now a return on the function too. Since that is also a change in the behavior of the API.","commit_id":"fe52f342cced40c5d4771bab355563144e954053"}],"subunit2sql/shell.py":[{"author":{"_account_id":7822,"name":"Chris Hoge (not involved in upstream development)","email":"chris@hogepodge.com","username":"hogepodge"},"change_message_id":"5d2e5cb3ac63601e0ab6f1bf7f309cd3a31d4124","unresolved":false,"context_lines":[{"line_number":144,"context_line":"def process_results(results, run_at\u003dNone, artifacts\u003dNone, run_id\u003dNone,"},{"line_number":145,"context_line":"                    run_meta\u003dNone, test_attr_prefix\u003dNone):"},{"line_number":146,"context_line":"    passed_args \u003d locals()"},{"line_number":147,"context_line":"    for arg in passed_args:"},{"line_number":148,"context_line":"        if not arg and hasattr(CONF, arg):"},{"line_number":149,"context_line":"            arg \u003d \u0027.\u0027.join(CONF, arg)"},{"line_number":150,"context_line":"    if run_at and not isinstance(run_at, datetime.datetime):"},{"line_number":151,"context_line":"        run_at \u003d date_parser.parse(run_at)"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_08cf5356","line":148,"range":{"start_line":147,"start_character":1,"end_line":148,"end_character":42},"updated":"2018-03-13 21:06:09.000000000","message":"Ok, so let me see if I\u0027m breaking this down right.\n\n* locals sends back a dictionary of locally scoped variables.\n* arg is the iteration of keys contained in the dictionary.\n* by this logic arg will never be false, as the key is a string\n\nAre you meaning to see if the value of the arg is false to check the passed variables?","commit_id":"14c2bf1064a79547bb4e015b2a7d293c46f7d03d"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"230ce8529034ff7e0a723369ae2072de39e0e490","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        return None"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"def _override_conf(value, value_name):"},{"line_number":145,"context_line":"    if (not value) and hasattr(CONF, value_name):"},{"line_number":146,"context_line":"        return CONF[value_name]"},{"line_number":147,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"df7087c5_f53a4acb","line":144,"updated":"2018-03-21 01:21:06.000000000","message":"You probably don\u0027t need this function you probable can just use CONF.set_override:\n\nhttps://docs.openstack.org/oslo.config/latest/reference/configopts.html?highlight\u003dset_override#oslo_config.cfg.ConfigOpts.set_override\n\nYou might want to use it with an if kwarg is none to ensure we use conf if nothing is passed in. So replace L154-L158 with a conditional set override and then you can  just keep all the CONF references in place.","commit_id":"9804e12d9ca06dc48ab7348e08474db2c2fa0a43"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"82b0469807d14889e17a685ed988ed88ab504207","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        return None"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"def _override_conf(value, value_name):"},{"line_number":145,"context_line":"    if (not value) and hasattr(CONF, value_name):"},{"line_number":146,"context_line":"        return CONF[value_name]"},{"line_number":147,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_9f03340e","line":144,"in_reply_to":"df7087c5_f53a4acb","updated":"2018-03-24 02:13:01.000000000","message":"Largely, the intent behind separating out this function was to allow for the ability to go without actual CONF changes (what led to this is wanting the ability to set these values for a use in the API, for an API where CONF is not mutable without an API restart, and many runs would need to be processed between API restarts.), without cluttering the main process_result function via a huge chunk of repetitive if-then statements. I think that a function rename may help a little here, given that we are not so much \"overriding conf\" as we are \"trying to avoid breaking backwards compatibility by making sure that if no kwargs are passed in, if still tries to grab from CONF\". Something tells me that\u0027s not a workable function name, but i\u0027ll try and find something a bit more compressed and clear.","commit_id":"9804e12d9ca06dc48ab7348e08474db2c2fa0a43"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"230ce8529034ff7e0a723369ae2072de39e0e490","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"def process_results(results, run_at\u003dNone, artifacts\u003dNone, run_id\u003dNone,"},{"line_number":152,"context_line":"                    run_meta\u003dNone, test_attr_prefix\u003dNone):"},{"line_number":153,"context_line":"    # check for and handle any overrides"},{"line_number":154,"context_line":"    run_at \u003d _override_conf(run_at, \u0027run_at\u0027)"},{"line_number":155,"context_line":"    artifacts \u003d _override_conf(artifacts, \u0027artifacts\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"df7087c5_f511ea54","line":152,"updated":"2018-03-21 01:21:06.000000000","message":"I think we should probably add a docstring here, this isn\u0027t super straightforward between having kwargs and also using conf. Especially because the intent here is to start using this functional externally.","commit_id":"9804e12d9ca06dc48ab7348e08474db2c2fa0a43"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"82b0469807d14889e17a685ed988ed88ab504207","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"def process_results(results, run_at\u003dNone, artifacts\u003dNone, run_id\u003dNone,"},{"line_number":152,"context_line":"                    run_meta\u003dNone, test_attr_prefix\u003dNone):"},{"line_number":153,"context_line":"    # check for and handle any overrides"},{"line_number":154,"context_line":"    run_at \u003d _override_conf(run_at, \u0027run_at\u0027)"},{"line_number":155,"context_line":"    artifacts \u003d _override_conf(artifacts, \u0027artifacts\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_02f82bc2","line":152,"in_reply_to":"df7087c5_f511ea54","updated":"2018-03-24 02:13:01.000000000","message":"Done","commit_id":"9804e12d9ca06dc48ab7348e08474db2c2fa0a43"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"230ce8529034ff7e0a723369ae2072de39e0e490","unresolved":false,"context_lines":[{"line_number":157,"context_line":"    run_meta \u003d _override_conf(run_meta, \u0027run_meta\u0027)"},{"line_number":158,"context_line":"    test_attr_prefix \u003d _override_conf(test_attr_prefix, \u0027test_attr_prefix\u0027)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    if run_at and not isinstance(run_at, datetime.datetime):"},{"line_number":161,"context_line":"        run_at \u003d date_parser.parse(run_at)"},{"line_number":162,"context_line":"    session \u003d api.get_session()"},{"line_number":163,"context_line":"    run_time \u003d results.pop(\u0027run_time\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"df7087c5_55a7760c","line":160,"updated":"2018-03-21 01:21:06.000000000","message":"Small nit (no action really required, it was just a thought while reading): we probably should just check run_at is None here to be a bit more explicit. I checked the api code there shouldn\u0027t be any risk of passing in 0, [], or \u0027\u0027 to sqlalchemy.","commit_id":"9804e12d9ca06dc48ab7348e08474db2c2fa0a43"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"82b0469807d14889e17a685ed988ed88ab504207","unresolved":false,"context_lines":[{"line_number":157,"context_line":"    run_meta \u003d _override_conf(run_meta, \u0027run_meta\u0027)"},{"line_number":158,"context_line":"    test_attr_prefix \u003d _override_conf(test_attr_prefix, \u0027test_attr_prefix\u0027)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    if run_at and not isinstance(run_at, datetime.datetime):"},{"line_number":161,"context_line":"        run_at \u003d date_parser.parse(run_at)"},{"line_number":162,"context_line":"    session \u003d api.get_session()"},{"line_number":163,"context_line":"    run_time \u003d results.pop(\u0027run_time\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_42d063ca","line":160,"in_reply_to":"df7087c5_55a7760c","updated":"2018-03-24 02:13:01.000000000","message":"Done","commit_id":"9804e12d9ca06dc48ab7348e08474db2c2fa0a43"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"230ce8529034ff7e0a723369ae2072de39e0e490","unresolved":false,"context_lines":[{"line_number":218,"context_line":"            api.add_test_run_attachments(results[test][\u0027attachments\u0027],"},{"line_number":219,"context_line":"                                         test_run.id, session)"},{"line_number":220,"context_line":"    session.close()"},{"line_number":221,"context_line":"    run_data \u003d db_run.__dict__"},{"line_number":222,"context_line":"    return run_data"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"df7087c5_b55372e2","line":221,"updated":"2018-03-21 01:21:06.000000000","message":"IIRC there is a to_dict method on the model objects. So you should be able to just do:\n\nreturn run_data.to_dict()\n\nThat being said is converting this to a dictionary here really worth it? I feel like maybe returning the model object makes more sense. If you application requires a dict you can just call to_dict on it().","commit_id":"9804e12d9ca06dc48ab7348e08474db2c2fa0a43"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"a0928383762838514c47754f22b1fc590a30268d","unresolved":false,"context_lines":[{"line_number":167,"context_line":"    run_meta \u003d _override_conf(run_meta, \u0027run_meta\u0027)"},{"line_number":168,"context_line":"    test_attr_prefix \u003d _override_conf(test_attr_prefix, \u0027test_attr_prefix\u0027)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    if run_at:"},{"line_number":171,"context_line":"        run_at \u003d date_parser.parse(run_at)"},{"line_number":172,"context_line":"    session \u003d api.get_session()"},{"line_number":173,"context_line":"    run_time \u003d results.pop(\u0027run_time\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_36f61865","line":170,"updated":"2018-04-02 04:43:00.000000000","message":"What I actually meant here before was \u0027if run_at\u0027 should be \u0027if run_at is not None\u0027 because there is a risk that 0, [], or an empty string was being passed in here. You should still have the datetime check otherwise if a python caller passes in a datetime object this will raise an exception. Prior to this patch that was never a risk, because it was always a string opt before.\n\nThere is still a hole/change in behavior here. This block should probably just be::\n\nif run_at:\n   if not isinstance(run_at, datetime.datetime):\n      run_at \u003d date_parser.parse(run_at)\nelse:\n   run_at \u003d None","commit_id":"edff4c5608652cd2f440e0542a7553de431a58f8"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"676638189b1795e99558f04457cf011dd1614794","unresolved":false,"context_lines":[{"line_number":167,"context_line":"    run_meta \u003d _override_conf(run_meta, \u0027run_meta\u0027)"},{"line_number":168,"context_line":"    test_attr_prefix \u003d _override_conf(test_attr_prefix, \u0027test_attr_prefix\u0027)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    if run_at:"},{"line_number":171,"context_line":"        run_at \u003d date_parser.parse(run_at)"},{"line_number":172,"context_line":"    session \u003d api.get_session()"},{"line_number":173,"context_line":"    run_time \u003d results.pop(\u0027run_time\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_62dda0de","line":170,"in_reply_to":"bf659307_36f61865","updated":"2018-04-02 22:40:10.000000000","message":"Done","commit_id":"edff4c5608652cd2f440e0542a7553de431a58f8"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"a0928383762838514c47754f22b1fc590a30268d","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            api.add_test_run_attachments(results[test][\u0027attachments\u0027],"},{"line_number":229,"context_line":"                                         test_run.id, session)"},{"line_number":230,"context_line":"    session.close()"},{"line_number":231,"context_line":"    run_data \u003d db_run.__dict__"},{"line_number":232,"context_line":"    return run_data"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_7649f0b4","line":231,"updated":"2018-04-02 04:43:00.000000000","message":"I still don\u0027t understand why we\u0027re returning the internal dict representation here? If we want a dict we should use db_run.to_dict(). But I don\u0027t see what\u0027s wrong with just returning db_run, the model object should be fine to return.","commit_id":"edff4c5608652cd2f440e0542a7553de431a58f8"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"676638189b1795e99558f04457cf011dd1614794","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            api.add_test_run_attachments(results[test][\u0027attachments\u0027],"},{"line_number":229,"context_line":"                                         test_run.id, session)"},{"line_number":230,"context_line":"    session.close()"},{"line_number":231,"context_line":"    run_data \u003d db_run.__dict__"},{"line_number":232,"context_line":"    return run_data"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_22580854","line":231,"in_reply_to":"bf659307_7649f0b4","updated":"2018-04-02 22:40:10.000000000","message":"Done","commit_id":"edff4c5608652cd2f440e0542a7553de431a58f8"}]}
