)]}'
{"charts/shipyard/values.yaml":[{"author":{"_account_id":26365,"name":"Bryan Strassner","email":"strassner.bryan@gmail.com","username":"bryan-strassner"},"change_message_id":"f43a45c6ebee02bac3c1d7ed87976f71c50bbf73","unresolved":false,"context_lines":[{"line_number":415,"context_line":"      # If non-existent rule is used, the request should be denied. The"},{"line_number":416,"context_line":"      # deny_all rule is hard coded in the policy.py code to allow no access."},{"line_number":417,"context_line":"      policy_default_rule: deny_all"},{"line_number":418,"context_line":"    validations:"},{"line_number":419,"context_line":"      deployment_version_create: Skip"},{"line_number":420,"context_line":"      deployment_version_commit: Skip"},{"line_number":421,"context_line":"  airflow_config_file:"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"ffb9cba7_f7b7c085","line":418,"updated":"2019-04-23 14:11:26.000000000","message":"nit:\nIt would be nice to have comments here explaining what each of these options are about. I don\u0027t think the names of the fields tell a great story on their own.  Something like you already have in the shipyard.conf would work.","commit_id":"6f1029c21f121d9b76f98ac39f01f871396fa981"}],"doc/source/_static/shipyard.conf.sample":[{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"d396a999cddd9ea23a2a6269bebd09fb0ffcc821","unresolved":false,"context_lines":[{"line_number":412,"context_line":"# From shipyard_api"},{"line_number":413,"context_line":"#"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"# Control the severity of the deployment-version validation during create"},{"line_number":416,"context_line":"# configdocs. Possible values are Skip, Info, Warning, and Error (string value)"},{"line_number":417,"context_line":"#deployment_version_create \u003d Skip"},{"line_number":418,"context_line":""},{"line_number":419,"context_line":"# Control the severity of the deployment-version validation validation during"},{"line_number":420,"context_line":"# commit configdocs. Possible values are Skip, Info, Warning, and Error (string"},{"line_number":421,"context_line":"# value)"},{"line_number":422,"context_line":"#deployment_version_commit \u003d Skip"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"3fce034c_789cbc0e","line":422,"range":{"start_line":415,"start_character":0,"end_line":422,"end_character":33},"updated":"2019-04-18 20:38:37.000000000","message":"It seems like Shipyard has most configuration options list in the chart values. Is this still disabled by default if the Shipyard chart is deployed?\n\nIt looks like it would not be accounted for in the shipyard-etc configmap unless default values are always registered by Oslo when missing from the config file.","commit_id":"1873d558f600a9f14804affb61089a38d15dbdfd"},{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"380308b568de8b8b11bd05cbd81cadd5e75e847b","unresolved":false,"context_lines":[{"line_number":412,"context_line":"# From shipyard_api"},{"line_number":413,"context_line":"#"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"# Control the severity of the deployment-version validation during create"},{"line_number":416,"context_line":"# configdocs. Possible values are Skip, Info, Warning, and Error (string value)"},{"line_number":417,"context_line":"#deployment_version_create \u003d Skip"},{"line_number":418,"context_line":""},{"line_number":419,"context_line":"# Control the severity of the deployment-version validation validation during"},{"line_number":420,"context_line":"# commit configdocs. Possible values are Skip, Info, Warning, and Error (string"},{"line_number":421,"context_line":"# value)"},{"line_number":422,"context_line":"#deployment_version_commit \u003d Skip"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"3fce034c_0bf1a401","line":422,"range":{"start_line":415,"start_character":0,"end_line":422,"end_character":33},"in_reply_to":"3fce034c_6ba2a8ff","updated":"2019-04-18 20:57:19.000000000","message":"\u003e Yes it should still be defaulted. Oslo defaults any configuration\n \u003e option not found in the config file.\n \u003e That being said it\u0027d probably be a good idea to add it to the\n \u003e charts anyway, might be a bit more clear that way. I\u0027ll include\n \u003e that with my other fixes on the next patch set.\n\nSounds good. Thanks for the explanation!","commit_id":"1873d558f600a9f14804affb61089a38d15dbdfd"},{"author":{"_account_id":30106,"name":"Matt Carter","email":"matt.coach.carter@gmail.com","username":"MattCarter"},"change_message_id":"871044fb6e08bdd988fbf9f57acdea1f1f6a88ac","unresolved":false,"context_lines":[{"line_number":412,"context_line":"# From shipyard_api"},{"line_number":413,"context_line":"#"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"# Control the severity of the deployment-version validation during create"},{"line_number":416,"context_line":"# configdocs. Possible values are Skip, Info, Warning, and Error (string value)"},{"line_number":417,"context_line":"#deployment_version_create \u003d Skip"},{"line_number":418,"context_line":""},{"line_number":419,"context_line":"# Control the severity of the deployment-version validation validation during"},{"line_number":420,"context_line":"# commit configdocs. Possible values are Skip, Info, Warning, and Error (string"},{"line_number":421,"context_line":"# value)"},{"line_number":422,"context_line":"#deployment_version_commit \u003d Skip"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"3fce034c_6ba2a8ff","line":422,"range":{"start_line":415,"start_character":0,"end_line":422,"end_character":33},"in_reply_to":"3fce034c_789cbc0e","updated":"2019-04-18 20:54:33.000000000","message":"Yes it should still be defaulted. Oslo defaults any configuration option not found in the config file.\nThat being said it\u0027d probably be a good idea to add it to the charts anyway, might be a bit more clear that way. I\u0027ll include that with my other fixes on the next patch set.","commit_id":"1873d558f600a9f14804affb61089a38d15dbdfd"}],"doc/source/site-definition-documents.rst":[{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"d396a999cddd9ea23a2a6269bebd09fb0ffcc821","unresolved":false,"context_lines":[{"line_number":629,"context_line":"A deployment version document is a Pegleg_ generated document that captures"},{"line_number":630,"context_line":"information about the repositories used to generate the site defintion. The"},{"line_number":631,"context_line":"presence of this document is optional by default, but Shipyard can be"},{"line_number":632,"context_line":":ref:`configured \u003csample-configuration\u003e` to ensure this document exists, and issue a warning or error if it"},{"line_number":633,"context_line":"is absent from a configdocs collection."},{"line_number":634,"context_line":"Document example::"},{"line_number":635,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fce034c_989088ef","line":632,"range":{"start_line":632,"start_character":0,"end_line":632,"end_character":107},"updated":"2019-04-18 20:38:37.000000000","message":"Please wrap at 80 chars.","commit_id":"1873d558f600a9f14804affb61089a38d15dbdfd"},{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"d396a999cddd9ea23a2a6269bebd09fb0ffcc821","unresolved":false,"context_lines":[{"line_number":641,"context_line":"  layeringDefinition:"},{"line_number":642,"context_line":"    abstract: false"},{"line_number":643,"context_line":"    layer: global"},{"line_number":644,"context_line":"  toragePolicy: cleartext"},{"line_number":645,"context_line":"  data:"},{"line_number":646,"context_line":"    documents:"},{"line_number":647,"context_line":"      site-repository:"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3fce034c_f8874cb4","line":644,"updated":"2019-04-18 20:38:37.000000000","message":"storagePolicy","commit_id":"1873d558f600a9f14804affb61089a38d15dbdfd"}],"src/bin/shipyard_airflow/etc/shipyard/shipyard.conf.sample":[{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"d396a999cddd9ea23a2a6269bebd09fb0ffcc821","unresolved":false,"context_lines":[{"line_number":412,"context_line":"# From shipyard_api"},{"line_number":413,"context_line":"#"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"# Control the severity of the deployment-version validation during create"},{"line_number":416,"context_line":"# configdocs. Possible values are Skip, Info, Warning, and Error (string value)"},{"line_number":417,"context_line":"#deployment_version_create \u003d Skip"},{"line_number":418,"context_line":""},{"line_number":419,"context_line":"# Control the severity of the deployment-version validation validation during"},{"line_number":420,"context_line":"# commit configdocs. Possible values are Skip, Info, Warning, and Error (string"},{"line_number":421,"context_line":"# value)"},{"line_number":422,"context_line":"#deployment_version_commit \u003d Skip"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"3fce034c_189d7809","line":422,"range":{"start_line":415,"start_character":0,"end_line":422,"end_character":33},"updated":"2019-04-18 20:38:37.000000000","message":"It seems like Shipyard has most configuration options list in the chart values. Is this still disabled by default if the Shipyard chart is deployed?\n\nIt looks like it would not be accounted for in the airflow-etc configmap unless default values are always registered by Oslo when missing from the config file.","commit_id":"1873d558f600a9f14804affb61089a38d15dbdfd"}],"src/bin/shipyard_airflow/shipyard_airflow/conf/config.py":[{"author":{"_account_id":26449,"name":"Scott Hussey","email":"sthussey@att.com","username":"sh8121"},"change_message_id":"a4c2c2def02899694e1491f9d4dcebaf648312f6","unresolved":false,"context_lines":[{"line_number":372,"context_line":"    return all_opts"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"def parse_args(args\u003dNone, usage\u003dNone, default_config_files\u003dNone):"},{"line_number":376,"context_line":"    \"\"\" Triggers the parsing of the arguments/configs"},{"line_number":377,"context_line":"    \"\"\""},{"line_number":378,"context_line":"    CONF(args\u003dargs,"},{"line_number":379,"context_line":"         project\u003d\u0027shipyard\u0027,"},{"line_number":380,"context_line":"         usage\u003dusage,"},{"line_number":381,"context_line":"         default_config_files\u003ddefault_config_files)"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"register_opts(CONF)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ffb9cba7_1e2564ab","line":381,"range":{"start_line":375,"start_character":0,"end_line":381,"end_character":51},"updated":"2019-04-29 17:25:36.000000000","message":"I believe oslo_config is very picky about this being called twice within a process. You might want to add a sentinel value that allows you to short-circuit after this is called once.","commit_id":"7967f918a79a6c8dcf9ac7aa36b3c64742161ec8"}],"src/bin/shipyard_airflow/shipyard_airflow/control/configdocs/configdocs_api.py":[{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"d396a999cddd9ea23a2a6269bebd09fb0ffcc821","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        Return True if the deployment version doc is present, False otherwise."},{"line_number":166,"context_line":"        \"\"\""},{"line_number":167,"context_line":"        LOG.info(\"Validating deployment data\")"},{"line_number":168,"context_line":"        LOG.debug(\"Searching for schmea: %s and name: %s\","},{"line_number":169,"context_line":"                  DEPLOYMENT_DATA_DOC[\u0027schema\u0027], DEPLOYMENT_DATA_DOC[\u0027name\u0027])"},{"line_number":170,"context_line":"        return helper.check_for_document(document_data,"},{"line_number":171,"context_line":"                                         DEPLOYMENT_DATA_DOC[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_78c59cf0","line":168,"range":{"start_line":168,"start_character":33,"end_line":168,"end_character":39},"updated":"2019-04-18 20:38:37.000000000","message":"schema","commit_id":"1873d558f600a9f14804affb61089a38d15dbdfd"},{"author":{"_account_id":26365,"name":"Bryan Strassner","email":"strassner.bryan@gmail.com","username":"bryan-strassner"},"change_message_id":"b9f577b592f79ec7427071095e0d5277a3357983","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        # Validate that a deployment version document was provided, unless we"},{"line_number":186,"context_line":"        # were told to skip this check"},{"line_number":187,"context_line":"        if empty_collection or \\"},{"line_number":188,"context_line":"           CONF.validations.deployment_version_create \u003d\u003d \u0027Skip\u0027:"},{"line_number":189,"context_line":"            LOG.debug(\u0027Skipping deployment version document validation\u0027)"},{"line_number":190,"context_line":"        else:"},{"line_number":191,"context_line":"            if not self._validate_deployment_version(helper, document_data):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ffb9cba7_2e73d682","line":188,"range":{"start_line":188,"start_character":28,"end_line":188,"end_character":64},"updated":"2019-04-22 19:37:02.000000000","message":"case sensitive. probably should do lower() here too.\n\nSame on the items below. \n\nI see that if you don\u0027t specify a value, or if you were to misspell/mis-capitalize, it will default to Error - this seems appropriate, but I think being a little more loose on capitalization is worth it.","commit_id":"a16774fc762b521e7aa5830308b1d38c3b5abe0f"},{"author":{"_account_id":26365,"name":"Bryan Strassner","email":"strassner.bryan@gmail.com","username":"bryan-strassner"},"change_message_id":"b9f577b592f79ec7427071095e0d5277a3357983","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                    DEPLOYMENT_DATA_DOC[\u0027schema\u0027],"},{"line_number":196,"context_line":"                    DEPLOYMENT_DATA_DOC[\u0027name\u0027])"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"                if CONF.validations.deployment_version_create \u003d\u003d \u0027Info\u0027:"},{"line_number":199,"context_line":"                    extra_messages[\u0027info\u0027].append(title + \u0027. \u0027 + error_msg)"},{"line_number":200,"context_line":"                elif CONF.validations.deployment_version_create \u003d\u003d \u0027Warning\u0027:"},{"line_number":201,"context_line":"                    extra_messages[\u0027warning\u0027].append(title + \u0027. \u0027 + error_msg)"},{"line_number":202,"context_line":"                else:  # Error"},{"line_number":203,"context_line":"                    raise ApiError("},{"line_number":204,"context_line":"                        title\u003dtitle,"}],"source_content_type":"text/x-python","patch_set":3,"id":"ffb9cba7_aedca618","line":201,"range":{"start_line":198,"start_character":0,"end_line":201,"end_character":78},"updated":"2019-04-22 19:37:02.000000000","message":"nit:\nif CONF.validations.deployment_version_create were resolved above to a variable:\n\n dep_ver_sev \u003d CONF.validations.deployment_version.create.lower()\n\nThen this could be:\n\n if dev_ver_sev in [\u0027info\u0027, \u0027warning\u0027]:\n     extra_messages[dev_ver_sev].append(title + \u0027. \u0027 + error_msg)\n\nI\u0027m also not sure the conventional wisdom of:\n\n (title + \u0027. \u0027 + error_msg)\n\nvs:\n\n \"{}. {}\".format(title, error_msg)\n\nbut I think I like the latter better.","commit_id":"a16774fc762b521e7aa5830308b1d38c3b5abe0f"},{"author":{"_account_id":26449,"name":"Scott Hussey","email":"sthussey@att.com","username":"sh8121"},"change_message_id":"9fa263d8c860f13422ae22ee12737aacee22152e","unresolved":false,"context_lines":[{"line_number":33,"context_line":"                  \u0027committed\u0027,"},{"line_number":34,"context_line":"                  \u0027last_site_action\u0027,"},{"line_number":35,"context_line":"                  \u0027successful_site_action\u0027]"},{"line_number":36,"context_line":"DEPLOYMENT_DATA_DOC \u003d {\u0027name\u0027: \u0027deployment-version\u0027,"},{"line_number":37,"context_line":"                       \u0027schema\u0027: \u0027pegleg/DeploymentData/v1\u0027}"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"class ConfigDocsStatusResource(BaseResource):"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffb9cba7_4fd85a7e","line":37,"range":{"start_line":36,"start_character":0,"end_line":37,"end_character":60},"updated":"2019-04-24 13:16:51.000000000","message":"Can we make this config driven?","commit_id":"a2005fdc23f7507c890a2cb37e6ee40c625ced52"}],"src/bin/shipyard_airflow/shipyard_airflow/control/helpers/configdocs_helper.py":[{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"d396a999cddd9ea23a2a6269bebd09fb0ffcc821","unresolved":false,"context_lines":[{"line_number":784,"context_line":""},{"line_number":785,"context_line":"    def add_messages_to_validation_status(self, status, msgs, level):"},{"line_number":786,"context_line":"        \"\"\"Given a status retrieved from _format_validations_to_status and a"},{"line_number":787,"context_line":"        list of messages at a given level (Error, Warning, Info, add messages"},{"line_number":788,"context_line":"        to the status"},{"line_number":789,"context_line":"        \"\"\""},{"line_number":790,"context_line":"        code \u003d falcon.HTTP_200"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_5865401d","line":787,"range":{"start_line":787,"start_character":59,"end_line":787,"end_character":63},"updated":"2019-04-18 20:38:37.000000000","message":"Missing )","commit_id":"1873d558f600a9f14804affb61089a38d15dbdfd"},{"author":{"_account_id":26365,"name":"Bryan Strassner","email":"strassner.bryan@gmail.com","username":"bryan-strassner"},"change_message_id":"b9f577b592f79ec7427071095e0d5277a3357983","unresolved":false,"context_lines":[{"line_number":782,"context_line":"        return ("},{"line_number":783,"context_line":"            old_version_name, new_version_name, old_version_id, new_version_id)"},{"line_number":784,"context_line":""},{"line_number":785,"context_line":"    def add_messages_to_validation_status(self, status, msgs, level):"},{"line_number":786,"context_line":"        \"\"\"Given a status retrieved from _format_validations_to_status and a"},{"line_number":787,"context_line":"        list of messages at a given level (Error, Warning, Info), add messages"},{"line_number":788,"context_line":"        to the status"},{"line_number":789,"context_line":"        \"\"\""},{"line_number":790,"context_line":"        code \u003d falcon.HTTP_200"},{"line_number":791,"context_line":"        if str(level).lower() \u003d\u003d \u0027error\u0027:"},{"line_number":792,"context_line":"            code \u003d falcon.HTTP_400"},{"line_number":793,"context_line":"            status[\u0027status\u0027] \u003d \u0027Failure\u0027"},{"line_number":794,"context_line":"            status[\u0027message\u0027] \u003d \u0027Validations failed\u0027"},{"line_number":795,"context_line":"            status[\u0027code\u0027] \u003d code"},{"line_number":796,"context_line":"            status[\u0027details\u0027][\u0027errorCount\u0027] +\u003d len(msgs)"},{"line_number":797,"context_line":""},{"line_number":798,"context_line":"        formatted_messages \u003d []"},{"line_number":799,"context_line":"        for msg in msgs:"},{"line_number":800,"context_line":"            formatted_messages.append({\u0027code\u0027: code,"},{"line_number":801,"context_line":"                                       \u0027message\u0027: msg,"},{"line_number":802,"context_line":"                                       \u0027status\u0027: str(level).capitalize(),"},{"line_number":803,"context_line":"                                       \u0027level\u0027: str(level).lower()})"},{"line_number":804,"context_line":"        status[\u0027details\u0027][\u0027messageList\u0027] +\u003d formatted_messages"},{"line_number":805,"context_line":"#"},{"line_number":806,"context_line":"# End of ConfigdocsHelper class"},{"line_number":807,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":3,"id":"ffb9cba7_8e39a242","line":804,"range":{"start_line":785,"start_character":0,"end_line":804,"end_character":62},"updated":"2019-04-22 19:37:02.000000000","message":"I don\u0027t see where this is using self, should this be a module level function instead of a class level function?","commit_id":"a16774fc762b521e7aa5830308b1d38c3b5abe0f"},{"author":{"_account_id":26365,"name":"Bryan Strassner","email":"strassner.bryan@gmail.com","username":"bryan-strassner"},"change_message_id":"b9f577b592f79ec7427071095e0d5277a3357983","unresolved":false,"context_lines":[{"line_number":969,"context_line":""},{"line_number":970,"context_line":""},{"line_number":971,"context_line":"def _format_validations_to_status(val_msgs, error_count):"},{"line_number":972,"context_line":"    \"\"\"Using a list of validation messages and an error count,"},{"line_number":973,"context_line":"    formulates and returns a status response dict"},{"line_number":974,"context_line":"    \"\"\""},{"line_number":975,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ffb9cba7_4e696a23","line":972,"range":{"start_line":972,"start_character":4,"end_line":972,"end_character":7},"updated":"2019-04-22 19:37:02.000000000","message":"if you\u0027re going to fix this docstring, why not lines 941, 910, 868, 834, and 815 above.","commit_id":"a16774fc762b521e7aa5830308b1d38c3b5abe0f"},{"author":{"_account_id":26365,"name":"Bryan Strassner","email":"strassner.bryan@gmail.com","username":"bryan-strassner"},"change_message_id":"f43a45c6ebee02bac3c1d7ed87976f71c50bbf73","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                self.deckhand.rollback(committed_rev_id)"},{"line_number":182,"context_line":"            return True"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def parse_received_doc_data(self, document_data):"},{"line_number":185,"context_line":"        \"\"\"Parse and return the document data shipyard receives"},{"line_number":186,"context_line":"        document_data should be a \"bytes\" type of one or more yaml documents"},{"line_number":187,"context_line":"        Return the parsed documents as a list. If bad YAML was provided log a"},{"line_number":188,"context_line":"        warning and return an empty list"},{"line_number":189,"context_line":"        \"\"\""},{"line_number":190,"context_line":"        try:"},{"line_number":191,"context_line":"            yaml_doc_list \u003d list(yaml.safe_load_all(document_data))"},{"line_number":192,"context_line":"            LOG.debug(\u0027Loaded %s YAML documents from provided data\u0027,"},{"line_number":193,"context_line":"                      len(yaml_doc_list))"},{"line_number":194,"context_line":"        except yaml.YAMLError as exc:"},{"line_number":195,"context_line":"            yaml_doc_list \u003d []"},{"line_number":196,"context_line":"            LOG.warning((\u0027Invalid YAML provided to Shipyard. Syntax error(s): \u0027"},{"line_number":197,"context_line":"                         \u0027{}\u0027).format(exc))"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        return yaml_doc_list"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def get_doc_names_and_schemas(self, document_data):"},{"line_number":202,"context_line":"        \"\"\"Given the document_data shipyard receives, return a list of tuples"},{"line_number":203,"context_line":"        denoting each documents\u0027 name and schema (name, schema)"},{"line_number":204,"context_line":"        \"\"\""},{"line_number":205,"context_line":"        parsed_docs \u003d self.parse_received_doc_data(document_data)"},{"line_number":206,"context_line":"        names_and_schemas \u003d []"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        for doc in parsed_docs:"},{"line_number":209,"context_line":"            try:"},{"line_number":210,"context_line":"                schema \u003d doc[\u0027schema\u0027]"},{"line_number":211,"context_line":"            except (TypeError, KeyError):"},{"line_number":212,"context_line":"                schema \u003d \u0027\u0027"},{"line_number":213,"context_line":"                LOG.warning(\u0027Document recevied with no schema\u0027)"},{"line_number":214,"context_line":"            try:"},{"line_number":215,"context_line":"                name \u003d doc[\u0027metadata\u0027][\u0027name\u0027]"},{"line_number":216,"context_line":"            except (TypeError, KeyError):"},{"line_number":217,"context_line":"                name \u003d \u0027\u0027"},{"line_number":218,"context_line":"                LOG.warning(\u0027Document recevied with no name\u0027)"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"            names_and_schemas.append((name, schema))"},{"line_number":221,"context_line":"        return names_and_schemas"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def check_for_document(self, document_data, name, schema):"},{"line_number":224,"context_line":"        \"\"\"Given the document data shipyard recevies, see if the given"},{"line_number":225,"context_line":"        name/schmea combination exists in the list of documents"},{"line_number":226,"context_line":"        Return True if the document exists, False otherwise"},{"line_number":227,"context_line":"        \"\"\""},{"line_number":228,"context_line":"        return (name, schema) in self.get_doc_names_and_schemas(document_data)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    def get_configdocs_status(self, versions\u003dNone):"},{"line_number":231,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"ffb9cba7_3ad3ff3a","line":228,"range":{"start_line":184,"start_character":0,"end_line":228,"end_character":78},"updated":"2019-04-23 14:11:26.000000000","message":"nit:\nNone of this needs self to do what\u0027s being asked. I think it could be broken out to its own module... Not sure if the log messages still make exact sense if that were to happen, but seems like this could be a yaml helper\u0027s module level methods. I think only the \"check_for_document\" is the external interface here.\nIt\u0027s fine here too, just an opportunity to further encapsulate.","commit_id":"6f1029c21f121d9b76f98ac39f01f871396fa981"},{"author":{"_account_id":30106,"name":"Matt Carter","email":"matt.coach.carter@gmail.com","username":"MattCarter"},"change_message_id":"b195b4beae2182e75e6536e642f0279b26d7cf3e","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                self.deckhand.rollback(committed_rev_id)"},{"line_number":182,"context_line":"            return True"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def parse_received_doc_data(self, document_data):"},{"line_number":185,"context_line":"        \"\"\"Parse and return the document data shipyard receives"},{"line_number":186,"context_line":"        document_data should be a \"bytes\" type of one or more yaml documents"},{"line_number":187,"context_line":"        Return the parsed documents as a list. If bad YAML was provided log a"},{"line_number":188,"context_line":"        warning and return an empty list"},{"line_number":189,"context_line":"        \"\"\""},{"line_number":190,"context_line":"        try:"},{"line_number":191,"context_line":"            yaml_doc_list \u003d list(yaml.safe_load_all(document_data))"},{"line_number":192,"context_line":"            LOG.debug(\u0027Loaded %s YAML documents from provided data\u0027,"},{"line_number":193,"context_line":"                      len(yaml_doc_list))"},{"line_number":194,"context_line":"        except yaml.YAMLError as exc:"},{"line_number":195,"context_line":"            yaml_doc_list \u003d []"},{"line_number":196,"context_line":"            LOG.warning((\u0027Invalid YAML provided to Shipyard. Syntax error(s): \u0027"},{"line_number":197,"context_line":"                         \u0027{}\u0027).format(exc))"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        return yaml_doc_list"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def get_doc_names_and_schemas(self, document_data):"},{"line_number":202,"context_line":"        \"\"\"Given the document_data shipyard receives, return a list of tuples"},{"line_number":203,"context_line":"        denoting each documents\u0027 name and schema (name, schema)"},{"line_number":204,"context_line":"        \"\"\""},{"line_number":205,"context_line":"        parsed_docs \u003d self.parse_received_doc_data(document_data)"},{"line_number":206,"context_line":"        names_and_schemas \u003d []"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        for doc in parsed_docs:"},{"line_number":209,"context_line":"            try:"},{"line_number":210,"context_line":"                schema \u003d doc[\u0027schema\u0027]"},{"line_number":211,"context_line":"            except (TypeError, KeyError):"},{"line_number":212,"context_line":"                schema \u003d \u0027\u0027"},{"line_number":213,"context_line":"                LOG.warning(\u0027Document recevied with no schema\u0027)"},{"line_number":214,"context_line":"            try:"},{"line_number":215,"context_line":"                name \u003d doc[\u0027metadata\u0027][\u0027name\u0027]"},{"line_number":216,"context_line":"            except (TypeError, KeyError):"},{"line_number":217,"context_line":"                name \u003d \u0027\u0027"},{"line_number":218,"context_line":"                LOG.warning(\u0027Document recevied with no name\u0027)"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"            names_and_schemas.append((name, schema))"},{"line_number":221,"context_line":"        return names_and_schemas"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def check_for_document(self, document_data, name, schema):"},{"line_number":224,"context_line":"        \"\"\"Given the document data shipyard recevies, see if the given"},{"line_number":225,"context_line":"        name/schmea combination exists in the list of documents"},{"line_number":226,"context_line":"        Return True if the document exists, False otherwise"},{"line_number":227,"context_line":"        \"\"\""},{"line_number":228,"context_line":"        return (name, schema) in self.get_doc_names_and_schemas(document_data)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    def get_configdocs_status(self, versions\u003dNone):"},{"line_number":231,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"ffb9cba7_da73c3e6","line":228,"range":{"start_line":184,"start_character":0,"end_line":228,"end_character":78},"in_reply_to":"ffb9cba7_3ad3ff3a","updated":"2019-04-23 14:32:09.000000000","message":"I think it would make sense to break this out into it\u0027s own module or class like you\u0027re describing. I don\u0027t think I\u0027ll handle that refactor in this PS. I\u0027ll need to review some of the other parts of Shipyard and see what makes the most sense for a refactor, and how common/high level I can make such a module.","commit_id":"6f1029c21f121d9b76f98ac39f01f871396fa981"}],"src/bin/shipyard_airflow/shipyard_airflow/control/validators/validate_deployment_configuration.py":[{"author":{"_account_id":26365,"name":"Bryan Strassner","email":"strassner.bryan@gmail.com","username":"bryan-strassner"},"change_message_id":"f43a45c6ebee02bac3c1d7ed87976f71c50bbf73","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                     \"\u0027all-at-once\u0027 is assumed, and deployment strategy will \""},{"line_number":75,"context_line":"                     \"not be further validated\")"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        if cfg.CONF.validations.deployment_version_commit.lower() !\u003d \u0027skip\u0027:"},{"line_number":78,"context_line":"            self.add_triggered_validation(ValidateDeploymentVersion,"},{"line_number":79,"context_line":"                                          \u0027deployment-version\u0027)"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ffb9cba7_1ae2bb04","line":77,"range":{"start_line":77,"start_character":11,"end_line":77,"end_character":19},"updated":"2019-04-23 14:11:26.000000000","message":"nit:\nI\u0027m sure it\u0027s not consistent, but the common pattern in many modules of Shipyard is to resolve the CONF variable as a module constant making this CONF.validations... vs. cfg.CONF.validations...","commit_id":"6f1029c21f121d9b76f98ac39f01f871396fa981"},{"author":{"_account_id":26449,"name":"Scott Hussey","email":"sthussey@att.com","username":"sh8121"},"change_message_id":"9fa263d8c860f13422ae22ee12737aacee22152e","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        if CONF.validations.deployment_version_commit.lower() !\u003d \u0027skip\u0027:"},{"line_number":79,"context_line":"            self.add_triggered_validation(ValidateDeploymentVersion,"},{"line_number":80,"context_line":"                                          \u0027deployment-version\u0027)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        super().do_validate()"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffb9cba7_afd31638","line":80,"range":{"start_line":80,"start_character":43,"end_line":80,"end_character":61},"updated":"2019-04-24 13:16:51.000000000","message":"Assuming this is the document name, can this be config driven?","commit_id":"a2005fdc23f7507c890a2cb37e6ee40c625ced52"},{"author":{"_account_id":30106,"name":"Matt Carter","email":"matt.coach.carter@gmail.com","username":"MattCarter"},"change_message_id":"398e82403aa1861e12095bb283b584ca9dbd9e09","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        if CONF.validations.deployment_version_commit.lower() !\u003d \u0027skip\u0027:"},{"line_number":79,"context_line":"            self.add_triggered_validation(ValidateDeploymentVersion,"},{"line_number":80,"context_line":"                                          \u0027deployment-version\u0027)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        super().do_validate()"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffb9cba7_d21711a3","line":80,"range":{"start_line":80,"start_character":43,"end_line":80,"end_character":61},"in_reply_to":"ffb9cba7_afd31638","updated":"2019-04-24 14:06:58.000000000","message":"Yes this is the document name.\nMaking the document name (and schema) configurable should be easy.\nGiving it some thought, I can put those options under a new configuration section used for document information. I think having a configurable set of document info will be useful in the future for more than just these validations.","commit_id":"a2005fdc23f7507c890a2cb37e6ee40c625ced52"}],"src/bin/shipyard_airflow/shipyard_airflow/control/validators/validate_deployment_version.py":[{"author":{"_account_id":26365,"name":"Bryan Strassner","email":"strassner.bryan@gmail.com","username":"bryan-strassner"},"change_message_id":"f43a45c6ebee02bac3c1d7ed87976f71c50bbf73","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    schema \u003d \"pegleg/DeploymentData/v1\""},{"line_number":35,"context_line":"    # Just capitalize the \"missing_severity\", and then the base class will take"},{"line_number":36,"context_line":"    # care of whether or not the value is actually valid"},{"line_number":37,"context_line":"    missing_severity \u003d cfg.CONF.validations.deployment_version_commit\\"},{"line_number":38,"context_line":"        .capitalize()"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def do_validate(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ffb9cba7_7af097ca","line":37,"range":{"start_line":37,"start_character":23,"end_line":37,"end_character":31},"updated":"2019-04-23 14:11:26.000000000","message":"nit:\nsee prior comment","commit_id":"6f1029c21f121d9b76f98ac39f01f871396fa981"},{"author":{"_account_id":26449,"name":"Scott Hussey","email":"sthussey@att.com","username":"sh8121"},"change_message_id":"9fa263d8c860f13422ae22ee12737aacee22152e","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    def __init__(self, **kwargs):"},{"line_number":33,"context_line":"        super().__init__(**kwargs)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    schema \u003d \"pegleg/DeploymentData/v1\""},{"line_number":36,"context_line":"    # Just capitalize the \"missing_severity\", and then the base class will take"},{"line_number":37,"context_line":"    # care of whether or not the value is actually valid"},{"line_number":38,"context_line":"    missing_severity \u003d CONF.validations.deployment_version_commit.capitalize()"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffb9cba7_8fe092fc","line":35,"range":{"start_line":35,"start_character":5,"end_line":35,"end_character":39},"updated":"2019-04-24 13:16:51.000000000","message":"Config driven","commit_id":"a2005fdc23f7507c890a2cb37e6ee40c625ced52"}],"src/bin/shipyard_client/shipyard_client/cli/format_utils.py":[{"author":{"_account_id":26365,"name":"Bryan Strassner","email":"strassner.bryan@gmail.com","username":"bryan-strassner"},"change_message_id":"f43a45c6ebee02bac3c1d7ed87976f71c50bbf73","unresolved":false,"context_lines":[{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    Returns a single string with embedded newlines"},{"line_number":180,"context_line":"    \"\"\""},{"line_number":181,"context_line":"    level \u003d str(message.get(\u0027level\u0027, \u0027Info\u0027)).capitalize()"},{"line_number":182,"context_line":"    if message.get(\u0027error\u0027, False):"},{"line_number":183,"context_line":"        level \u003d \u0027Error\u0027  # Force showing \"Error\""},{"line_number":184,"context_line":"    return \u0027\\n- {}: {}\u0027.format(level, message.get(\u0027message\u0027))"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"def raw_format_response_handler(response):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ffb9cba7_da918354","line":184,"range":{"start_line":181,"start_character":0,"end_line":184,"end_character":61},"updated":"2019-04-23 14:11:26.000000000","message":"Nice refactor to support Warning... or whatever else comes along.","commit_id":"6f1029c21f121d9b76f98ac39f01f871396fa981"}]}
