)]}'
{"cbmgr.py":[{"author":{"_account_id":1005389,"name":"Lubo Marinski","email":"lubo.marinski@couchbase.com","username":"lubomarinski","avatars":[{"url":"https://www.gravatar.com/avatar/60f9d0c92536ec050b83034161160480.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/60f9d0c92536ec050b83034161160480.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/60f9d0c92536ec050b83034161160480.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/60f9d0c92536ec050b83034161160480.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"1da3596d8d269369634edb5eaf84780b8693795b","unresolved":true,"context_lines":[{"line_number":5392,"context_line":"            _exit_if_errors([\u0027--xdcr-cluster-name is required to stage credentials on a cluster connection\u0027])"},{"line_number":5393,"context_line":""},{"line_number":5394,"context_line":"        if opts.r_username is None and opts.r_password is None and opts.r_key is None and opts.r_certificate is None:"},{"line_number":5395,"context_line":"            _exit_if_errors([\u0027either --xdcr-username/--xdcr-password or \u0027 +"},{"line_number":5396,"context_line":"                             \u0027--xdcr-user-certificate/--xdcr-user-key must be specified\u0027])"},{"line_number":5397,"context_line":""},{"line_number":5398,"context_line":"        if (opts.r_username and opts.r_password is None) or (opts.r_username is None and opts.r_password):"}],"source_content_type":"text/x-python","patch_set":3,"id":"44540ee8_b32ceb79","line":5395,"range":{"start_line":5395,"start_character":69,"end_line":5395,"end_character":71},"updated":"2025-11-17 15:23:47.000000000","message":"What happens if we provide both username/password and a certificate?\n\nIn the _set case above it looks like we always require username and password.","commit_id":"9fc20ec2538fbb568dc40b9a4d2fdf20ac3a21f4"},{"author":{"_account_id":1005440,"name":"Matt Hall","email":"matt.hall@couchbase.com","username":"matthallcb","avatars":[{"url":"https://www.gravatar.com/avatar/165b38e9a590c70ff8b83b70e6494485.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/165b38e9a590c70ff8b83b70e6494485.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/165b38e9a590c70ff8b83b70e6494485.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/165b38e9a590c70ff8b83b70e6494485.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"a3812d30e472795f90b19354383c0fb35f17e78a","unresolved":false,"context_lines":[{"line_number":5392,"context_line":"            _exit_if_errors([\u0027--xdcr-cluster-name is required to stage credentials on a cluster connection\u0027])"},{"line_number":5393,"context_line":""},{"line_number":5394,"context_line":"        if opts.r_username is None and opts.r_password is None and opts.r_key is None and opts.r_certificate is None:"},{"line_number":5395,"context_line":"            _exit_if_errors([\u0027either --xdcr-username/--xdcr-password or \u0027 +"},{"line_number":5396,"context_line":"                             \u0027--xdcr-user-certificate/--xdcr-user-key must be specified\u0027])"},{"line_number":5397,"context_line":""},{"line_number":5398,"context_line":"        if (opts.r_username and opts.r_password is None) or (opts.r_username is None and opts.r_password):"}],"source_content_type":"text/x-python","patch_set":3,"id":"69638651_62ce002b","line":5395,"range":{"start_line":5395,"start_character":69,"end_line":5395,"end_character":71},"in_reply_to":"44540ee8_b32ceb79","updated":"2025-11-17 16:19:44.000000000","message":"I\u0027ve added a check such that we only pass two of the args, in addition to this one. The two groups - username/password and user-certificate/user-key - are mutually exclusive.","commit_id":"9fc20ec2538fbb568dc40b9a4d2fdf20ac3a21f4"},{"author":{"_account_id":1005039,"name":"Safian Ali","email":"safian.ali@couchbase.com","username":"safianalicb","avatars":[{"url":"https://www.gravatar.com/avatar/fd5ddc39eab136fd76ae4419d1a94039.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/fd5ddc39eab136fd76ae4419d1a94039.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/fd5ddc39eab136fd76ae4419d1a94039.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/fd5ddc39eab136fd76ae4419d1a94039.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"8b18c17d37ebafc23e08e19956fe45aac63dee2c","unresolved":true,"context_lines":[{"line_number":5391,"context_line":"        if opts.name is None:"},{"line_number":5392,"context_line":"            _exit_if_errors([\u0027--xdcr-cluster-name is required to stage credentials on a cluster connection\u0027])"},{"line_number":5393,"context_line":""},{"line_number":5394,"context_line":"        total \u003d sum(1 if x else 0 for x in [opts.r_username, opts.r_password, opts.r_key, opts.r_certificate])"},{"line_number":5395,"context_line":"        if total !\u003d 2 or (opts.r_username is None and opts.r_password is None and opts.r_key is None and \\"},{"line_number":5396,"context_line":"            opts.r_certificate is None):"},{"line_number":5397,"context_line":"            _exit_if_errors([\u0027exactly one of --xdcr-username/--xdcr-password and \u0027 +"},{"line_number":5398,"context_line":"                             \u0027--xdcr-user-certificate/--xdcr-user-key must be specified\u0027])"},{"line_number":5399,"context_line":""},{"line_number":5400,"context_line":"        if (opts.r_username and opts.r_password is None) or (opts.r_username is None and opts.r_password):"},{"line_number":5401,"context_line":"            _exit_if_errors([\u0027-xdcr-username and --xdcr-password must be specified together\u0027])"},{"line_number":5402,"context_line":""},{"line_number":5403,"context_line":"        if (opts.r_key and opts.r_certificate is None) or (opts.r_key is None and opts.r_certificate):"},{"line_number":5404,"context_line":"            _exit_if_errors([\u0027-xdcr-user-certificate and --xdcr-user-key must be specified together\u0027])"},{"line_number":5405,"context_line":""},{"line_number":5406,"context_line":"        raw_user_key \u003d None"},{"line_number":5407,"context_line":"        if opts.r_key:"}],"source_content_type":"text/x-python","patch_set":4,"id":"13ecc81c_490d3ecc","line":5404,"range":{"start_line":5394,"start_character":0,"end_line":5404,"end_character":102},"updated":"2025-11-20 09:56:39.000000000","message":"nit: i feel this would be easier:\n\n```\n        if bool(opts.r_username) ^ bool(opts.r_password):\n            _exit_if_errors([\u0027-xdcr-username and --xdcr-password must be specified together\u0027])\n\n        if bool(opts.r_key) ^ bool(opts.r_certificate):\n            _exit_if_errors([\u0027-xdcr-user-certificate and --xdcr-user-key must be specified together\u0027])\n\n        if bool(opts.r_username) \u003d\u003d bool(opts.r_key):\n            _exit_if_errors([\u0027exactly one of --xdcr-username/--xdcr-password and \u0027 +\n                             \u0027--xdcr-user-certificate/--xdcr-user-key must be specified\u0027])\n```","commit_id":"9255294ce819e082309f1b0f5dcb46b986271662"},{"author":{"_account_id":1005440,"name":"Matt Hall","email":"matt.hall@couchbase.com","username":"matthallcb","avatars":[{"url":"https://www.gravatar.com/avatar/165b38e9a590c70ff8b83b70e6494485.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/165b38e9a590c70ff8b83b70e6494485.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/165b38e9a590c70ff8b83b70e6494485.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/165b38e9a590c70ff8b83b70e6494485.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"eaa2f5276bb7e423b80d1a7955a455e15c738de1","unresolved":false,"context_lines":[{"line_number":5391,"context_line":"        if opts.name is None:"},{"line_number":5392,"context_line":"            _exit_if_errors([\u0027--xdcr-cluster-name is required to stage credentials on a cluster connection\u0027])"},{"line_number":5393,"context_line":""},{"line_number":5394,"context_line":"        total \u003d sum(1 if x else 0 for x in [opts.r_username, opts.r_password, opts.r_key, opts.r_certificate])"},{"line_number":5395,"context_line":"        if total !\u003d 2 or (opts.r_username is None and opts.r_password is None and opts.r_key is None and \\"},{"line_number":5396,"context_line":"            opts.r_certificate is None):"},{"line_number":5397,"context_line":"            _exit_if_errors([\u0027exactly one of --xdcr-username/--xdcr-password and \u0027 +"},{"line_number":5398,"context_line":"                             \u0027--xdcr-user-certificate/--xdcr-user-key must be specified\u0027])"},{"line_number":5399,"context_line":""},{"line_number":5400,"context_line":"        if (opts.r_username and opts.r_password is None) or (opts.r_username is None and opts.r_password):"},{"line_number":5401,"context_line":"            _exit_if_errors([\u0027-xdcr-username and --xdcr-password must be specified together\u0027])"},{"line_number":5402,"context_line":""},{"line_number":5403,"context_line":"        if (opts.r_key and opts.r_certificate is None) or (opts.r_key is None and opts.r_certificate):"},{"line_number":5404,"context_line":"            _exit_if_errors([\u0027-xdcr-user-certificate and --xdcr-user-key must be specified together\u0027])"},{"line_number":5405,"context_line":""},{"line_number":5406,"context_line":"        raw_user_key \u003d None"},{"line_number":5407,"context_line":"        if opts.r_key:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ce537522_95129854","line":5404,"range":{"start_line":5394,"start_character":0,"end_line":5404,"end_character":102},"in_reply_to":"13ecc81c_490d3ecc","updated":"2025-11-21 13:36:20.000000000","message":"I think the XOR of booleans is confusing - I\u0027ve removed the redundancy from the first if statement however.","commit_id":"9255294ce819e082309f1b0f5dcb46b986271662"},{"author":{"_account_id":1005039,"name":"Safian Ali","email":"safian.ali@couchbase.com","username":"safianalicb","avatars":[{"url":"https://www.gravatar.com/avatar/fd5ddc39eab136fd76ae4419d1a94039.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/fd5ddc39eab136fd76ae4419d1a94039.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/fd5ddc39eab136fd76ae4419d1a94039.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/fd5ddc39eab136fd76ae4419d1a94039.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"8b18c17d37ebafc23e08e19956fe45aac63dee2c","unresolved":true,"context_lines":[{"line_number":5403,"context_line":"        if (opts.r_key and opts.r_certificate is None) or (opts.r_key is None and opts.r_certificate):"},{"line_number":5404,"context_line":"            _exit_if_errors([\u0027-xdcr-user-certificate and --xdcr-user-key must be specified together\u0027])"},{"line_number":5405,"context_line":""},{"line_number":5406,"context_line":"        raw_user_key \u003d None"},{"line_number":5407,"context_line":"        if opts.r_key:"},{"line_number":5408,"context_line":"            raw_user_key \u003d _exit_on_file_read_failure(opts.r_key)"},{"line_number":5409,"context_line":"        raw_user_cert \u003d None"},{"line_number":5410,"context_line":"        if opts.r_certificate:"},{"line_number":5411,"context_line":"            raw_user_cert \u003d _exit_on_file_read_failure(opts.r_certificate)"},{"line_number":5412,"context_line":""},{"line_number":5413,"context_line":"        _, errors \u003d self.rest.stage_creds_on_xdcr_reference(opts.name, opts.r_username, opts.r_password, raw_user_cert,"},{"line_number":5414,"context_line":"                                                            raw_user_key)"},{"line_number":5415,"context_line":"        _exit_if_errors(errors)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a7d017e_cc31139d","line":5412,"range":{"start_line":5406,"start_character":0,"end_line":5412,"end_character":0},"updated":"2025-11-20 09:56:39.000000000","message":"It\u0027s not obvious from the help message that `-xdcr-user-certificate` and `--xdcr-user-key` are supposed to have a path certificate. Perhaps for the certificate, it\u0027s implicit, but I\u0027m not sure about the key. The dsame is true in the doscumentation","commit_id":"9255294ce819e082309f1b0f5dcb46b986271662"},{"author":{"_account_id":1005440,"name":"Matt Hall","email":"matt.hall@couchbase.com","username":"matthallcb","avatars":[{"url":"https://www.gravatar.com/avatar/165b38e9a590c70ff8b83b70e6494485.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/165b38e9a590c70ff8b83b70e6494485.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/165b38e9a590c70ff8b83b70e6494485.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/165b38e9a590c70ff8b83b70e6494485.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"eaa2f5276bb7e423b80d1a7955a455e15c738de1","unresolved":false,"context_lines":[{"line_number":5403,"context_line":"        if (opts.r_key and opts.r_certificate is None) or (opts.r_key is None and opts.r_certificate):"},{"line_number":5404,"context_line":"            _exit_if_errors([\u0027-xdcr-user-certificate and --xdcr-user-key must be specified together\u0027])"},{"line_number":5405,"context_line":""},{"line_number":5406,"context_line":"        raw_user_key \u003d None"},{"line_number":5407,"context_line":"        if opts.r_key:"},{"line_number":5408,"context_line":"            raw_user_key \u003d _exit_on_file_read_failure(opts.r_key)"},{"line_number":5409,"context_line":"        raw_user_cert \u003d None"},{"line_number":5410,"context_line":"        if opts.r_certificate:"},{"line_number":5411,"context_line":"            raw_user_cert \u003d _exit_on_file_read_failure(opts.r_certificate)"},{"line_number":5412,"context_line":""},{"line_number":5413,"context_line":"        _, errors \u003d self.rest.stage_creds_on_xdcr_reference(opts.name, opts.r_username, opts.r_password, raw_user_cert,"},{"line_number":5414,"context_line":"                                                            raw_user_key)"},{"line_number":5415,"context_line":"        _exit_if_errors(errors)"}],"source_content_type":"text/x-python","patch_set":4,"id":"d25c242b_1e8de98c","line":5412,"range":{"start_line":5406,"start_character":0,"end_line":5412,"end_character":0},"in_reply_to":"7a7d017e_cc31139d","updated":"2025-11-21 13:36:20.000000000","message":"Both have `\u003cpath\u003e` as their metavar in the documentation and help message, I think that is clear enough.","commit_id":"9255294ce819e082309f1b0f5dcb46b986271662"}]}
