)]}'
{"deployment/ceph-ansible/ceph-base.yaml":[{"author":{"_account_id":6796,"name":"Giulio Fidente","email":"gfidente@redhat.com","username":"gfidente"},"change_message_id":"1bd22bb89eefced90f7d37e14808ae55ea533f35","unresolved":false,"context_lines":[{"line_number":213,"context_line":"                 deployment not to fail. Used to catch deployment errors early."},{"line_number":214,"context_line":"                 Set this value to 0 to disable this check."},{"line_number":215,"context_line":"    type: number"},{"line_number":216,"context_line":"  CephAuthRegistry:"},{"line_number":217,"context_line":"    default: False"},{"line_number":218,"context_line":"    type: boolean"},{"line_number":219,"context_line":"  CephAuthRegistryParams:"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"3fa7e38b_bd560f06","line":216,"updated":"2019-09-18 10:38:20.000000000","message":"I think we can remove this and assume we use credentials if they are given","commit_id":"68702c3d5567e7523769b7368db98f43348788a1"},{"author":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"change_message_id":"87ddd76b3f5fc17216757f9f60bfd63ae68d0c6f","unresolved":false,"context_lines":[{"line_number":213,"context_line":"                 deployment not to fail. Used to catch deployment errors early."},{"line_number":214,"context_line":"                 Set this value to 0 to disable this check."},{"line_number":215,"context_line":"    type: number"},{"line_number":216,"context_line":"  CephAuthRegistry:"},{"line_number":217,"context_line":"    default: False"},{"line_number":218,"context_line":"    type: boolean"},{"line_number":219,"context_line":"  CephAuthRegistryParams:"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"3fa7e38b_9454e954","line":216,"in_reply_to":"3fa7e38b_bd560f06","updated":"2019-09-24 12:08:15.000000000","message":"Ok, we can avoid an additional parameter for a boolean that we use to generate the condition, however looking at the ceph-ansible code they should expect 3 params:\n\n```\nceph_docker_registry_auth: (true|false)\nceph_docker_registry_username: \"\"\nceph_docker_registry_password: \"\"\n\n```\nSo we still need a boolean and pass it to the playbook.\nAs you suggested, I\u0027ll try to embed the boolean in the json parameter (CephAuthRegistryParams) and simplify this structure!","commit_id":"68702c3d5567e7523769b7368db98f43348788a1"},{"author":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"change_message_id":"aaca217a32862179dd30851df57cc98893c26c07","unresolved":false,"context_lines":[{"line_number":249,"context_line":"      expression: $.data.keys().any(predicate \u003d\u003e $ in [\u0027global\u0027, \u0027mon\u0027, \u0027mgr\u0027, \u0027osd\u0027, \u0027mds\u0027, \u0027client\u0027])"},{"line_number":250,"context_line":"  ceph_authenticated_registry:"},{"line_number":251,"context_line":"      and:"},{"line_number":252,"context_line":"      - not:"},{"line_number":253,"context_line":"          equals:"},{"line_number":254,"context_line":"          - yaql:"},{"line_number":255,"context_line":"              data: {get_param: CephAuthRegistryParams}"},{"line_number":256,"context_line":"              expression: $.data.get(\"username\").isEmpty()"},{"line_number":257,"context_line":"          - true"},{"line_number":258,"context_line":"      - not:"},{"line_number":259,"context_line":"          equals:"},{"line_number":260,"context_line":"          - yaql:"},{"line_number":261,"context_line":"              data: {get_param: CephAuthRegistryParams}"},{"line_number":262,"context_line":"              expression: $.data.get(\"password\").isEmpty()"},{"line_number":263,"context_line":"          - true"},{"line_number":264,"context_line":"      - equals:"},{"line_number":265,"context_line":"        - {get_param: CephAuthRegistry}"},{"line_number":266,"context_line":"        - true"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"5faad753_13b0f842","line":263,"range":{"start_line":252,"start_character":6,"end_line":263,"end_character":16},"updated":"2019-09-13 19:09:35.000000000","message":"This check over the expected parameters allow us to set the condition according to the CephAuthRegistry (line 265) and verifying (if CephAuthRegistry it\u0027s true) the user doesn\u0027t provide an empty string on both username and password: getting  an empty string would let the c-a playbook fail on `docker login command`[1], while evaluating username and password at this stage allow us to set the condition accordingly, undefine these variables (lines 535-546) and let ceph-ansible fail on the related validation task [2].\nI\u0027m testing this patch here[3], but we can plan to move it here if helps.\n\n[1] https://github.com/ceph/ceph-ansible/pull/4444/files#diff-87d7fc83e0cde9c50ea7635bd92e1ec5R19\n[2] https://github.com/ceph/ceph-ansible/pull/4444/files#diff-d4f8a0c1dabf72e117f5066953ff8eb6R145\n[3] https://review.opendev.org/#/c/677699/\n\n@fultonj, @gfidente, wdyt?","commit_id":"68702c3d5567e7523769b7368db98f43348788a1"},{"author":{"_account_id":6796,"name":"Giulio Fidente","email":"gfidente@redhat.com","username":"gfidente"},"change_message_id":"42878715ddebe6420cecba6e6eec9d24dd9a6d7a","unresolved":false,"context_lines":[{"line_number":249,"context_line":"      expression: $.data.keys().any(predicate \u003d\u003e $ in [\u0027global\u0027, \u0027mon\u0027, \u0027mgr\u0027, \u0027osd\u0027, \u0027mds\u0027, \u0027client\u0027])"},{"line_number":250,"context_line":"  ceph_authenticated_registry:"},{"line_number":251,"context_line":"      and:"},{"line_number":252,"context_line":"      - not:"},{"line_number":253,"context_line":"          equals:"},{"line_number":254,"context_line":"          - yaql:"},{"line_number":255,"context_line":"              data: {get_param: CephAuthRegistryParams}"},{"line_number":256,"context_line":"              expression: $.data.get(\"username\").isEmpty()"},{"line_number":257,"context_line":"          - true"},{"line_number":258,"context_line":"      - not:"},{"line_number":259,"context_line":"          equals:"},{"line_number":260,"context_line":"          - yaql:"},{"line_number":261,"context_line":"              data: {get_param: CephAuthRegistryParams}"},{"line_number":262,"context_line":"              expression: $.data.get(\"password\").isEmpty()"},{"line_number":263,"context_line":"          - true"},{"line_number":264,"context_line":"      - equals:"},{"line_number":265,"context_line":"        - {get_param: CephAuthRegistry}"},{"line_number":266,"context_line":"        - true"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"3fa7e38b_afe1f600","line":263,"range":{"start_line":252,"start_character":6,"end_line":263,"end_character":16},"in_reply_to":"3fa7e38b_1da083f4","updated":"2019-09-18 11:58:30.000000000","message":"it probably won\u0027t so we probably want to keep l252 and l258; I guess we need to add a default for the get() call here anyway?","commit_id":"68702c3d5567e7523769b7368db98f43348788a1"},{"author":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"change_message_id":"87ddd76b3f5fc17216757f9f60bfd63ae68d0c6f","unresolved":false,"context_lines":[{"line_number":249,"context_line":"      expression: $.data.keys().any(predicate \u003d\u003e $ in [\u0027global\u0027, \u0027mon\u0027, \u0027mgr\u0027, \u0027osd\u0027, \u0027mds\u0027, \u0027client\u0027])"},{"line_number":250,"context_line":"  ceph_authenticated_registry:"},{"line_number":251,"context_line":"      and:"},{"line_number":252,"context_line":"      - not:"},{"line_number":253,"context_line":"          equals:"},{"line_number":254,"context_line":"          - yaql:"},{"line_number":255,"context_line":"              data: {get_param: CephAuthRegistryParams}"},{"line_number":256,"context_line":"              expression: $.data.get(\"username\").isEmpty()"},{"line_number":257,"context_line":"          - true"},{"line_number":258,"context_line":"      - not:"},{"line_number":259,"context_line":"          equals:"},{"line_number":260,"context_line":"          - yaql:"},{"line_number":261,"context_line":"              data: {get_param: CephAuthRegistryParams}"},{"line_number":262,"context_line":"              expression: $.data.get(\"password\").isEmpty()"},{"line_number":263,"context_line":"          - true"},{"line_number":264,"context_line":"      - equals:"},{"line_number":265,"context_line":"        - {get_param: CephAuthRegistry}"},{"line_number":266,"context_line":"        - true"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"3fa7e38b_149c790d","line":263,"range":{"start_line":252,"start_character":6,"end_line":263,"end_character":16},"in_reply_to":"3fa7e38b_afe1f600","updated":"2019-09-24 12:08:15.000000000","message":"sure, we need a default on the get() call and I\u0027ll add it!","commit_id":"68702c3d5567e7523769b7368db98f43348788a1"},{"author":{"_account_id":6796,"name":"Giulio Fidente","email":"gfidente@redhat.com","username":"gfidente"},"change_message_id":"1bd22bb89eefced90f7d37e14808ae55ea533f35","unresolved":false,"context_lines":[{"line_number":249,"context_line":"      expression: $.data.keys().any(predicate \u003d\u003e $ in [\u0027global\u0027, \u0027mon\u0027, \u0027mgr\u0027, \u0027osd\u0027, \u0027mds\u0027, \u0027client\u0027])"},{"line_number":250,"context_line":"  ceph_authenticated_registry:"},{"line_number":251,"context_line":"      and:"},{"line_number":252,"context_line":"      - not:"},{"line_number":253,"context_line":"          equals:"},{"line_number":254,"context_line":"          - yaql:"},{"line_number":255,"context_line":"              data: {get_param: CephAuthRegistryParams}"},{"line_number":256,"context_line":"              expression: $.data.get(\"username\").isEmpty()"},{"line_number":257,"context_line":"          - true"},{"line_number":258,"context_line":"      - not:"},{"line_number":259,"context_line":"          equals:"},{"line_number":260,"context_line":"          - yaql:"},{"line_number":261,"context_line":"              data: {get_param: CephAuthRegistryParams}"},{"line_number":262,"context_line":"              expression: $.data.get(\"password\").isEmpty()"},{"line_number":263,"context_line":"          - true"},{"line_number":264,"context_line":"      - equals:"},{"line_number":265,"context_line":"        - {get_param: CephAuthRegistry}"},{"line_number":266,"context_line":"        - true"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"3fa7e38b_1da083f4","line":263,"range":{"start_line":252,"start_character":6,"end_line":263,"end_character":16},"in_reply_to":"5faad753_13b0f842","updated":"2019-09-18 10:38:20.000000000","message":"though I think this should be addressed in ceph-ansible, commented in https://github.com/ceph/ceph-ansible/pull/4444\n\nhopefully that will make it possible to avoid the condition entirely","commit_id":"68702c3d5567e7523769b7368db98f43348788a1"},{"author":{"_account_id":6796,"name":"Giulio Fidente","email":"gfidente@redhat.com","username":"gfidente"},"change_message_id":"1bd22bb89eefced90f7d37e14808ae55ea533f35","unresolved":false,"context_lines":[{"line_number":261,"context_line":"              data: {get_param: CephAuthRegistryParams}"},{"line_number":262,"context_line":"              expression: $.data.get(\"password\").isEmpty()"},{"line_number":263,"context_line":"          - true"},{"line_number":264,"context_line":"      - equals:"},{"line_number":265,"context_line":"        - {get_param: CephAuthRegistry}"},{"line_number":266,"context_line":"        - true"},{"line_number":267,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":4,"id":"3fa7e38b_bda4cf09","line":264,"updated":"2019-09-18 10:38:20.000000000","message":"can be removed I think","commit_id":"68702c3d5567e7523769b7368db98f43348788a1"},{"author":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"change_message_id":"87ddd76b3f5fc17216757f9f60bfd63ae68d0c6f","unresolved":false,"context_lines":[{"line_number":261,"context_line":"              data: {get_param: CephAuthRegistryParams}"},{"line_number":262,"context_line":"              expression: $.data.get(\"password\").isEmpty()"},{"line_number":263,"context_line":"          - true"},{"line_number":264,"context_line":"      - equals:"},{"line_number":265,"context_line":"        - {get_param: CephAuthRegistry}"},{"line_number":266,"context_line":"        - true"},{"line_number":267,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":4,"id":"3fa7e38b_74612d05","line":264,"in_reply_to":"3fa7e38b_bda4cf09","updated":"2019-09-24 12:08:15.000000000","message":"I can remove it since I\u0027m planning to remove the param on l216.\nThe result will be that this condition will be \"true\" just when both username and password are not empty strings (credentials are provided).","commit_id":"68702c3d5567e7523769b7368db98f43348788a1"},{"author":{"_account_id":6796,"name":"Giulio Fidente","email":"gfidente@redhat.com","username":"gfidente"},"change_message_id":"42878715ddebe6420cecba6e6eec9d24dd9a6d7a","unresolved":false,"context_lines":[{"line_number":292,"context_line":"            expression: $.data.rightSplit(\u0027:\u0027, 1)[1]"},{"line_number":293,"context_line":"            data: {get_param: ContainerCephDaemonImage}"},{"line_number":294,"context_line":"        registry_username:"},{"line_number":295,"context_line":"          if:"},{"line_number":296,"context_line":"          - ceph_authenticated_registry"},{"line_number":297,"context_line":"          - yaql:"},{"line_number":298,"context_line":"              data: {get_param: CephAuthRegistryParams}"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"3fa7e38b_6fe3fe06","line":295,"updated":"2019-09-18 11:58:30.000000000","message":"the if shouldn\u0027t be needed, yaql will default to \u0027\u0027 when not found anyway\n\nyou can instead optionally add these both directly below line 360 in a single condition which checks for ceph_authtenticated_registry","commit_id":"68702c3d5567e7523769b7368db98f43348788a1"},{"author":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"change_message_id":"87ddd76b3f5fc17216757f9f60bfd63ae68d0c6f","unresolved":false,"context_lines":[{"line_number":292,"context_line":"            expression: $.data.rightSplit(\u0027:\u0027, 1)[1]"},{"line_number":293,"context_line":"            data: {get_param: ContainerCephDaemonImage}"},{"line_number":294,"context_line":"        registry_username:"},{"line_number":295,"context_line":"          if:"},{"line_number":296,"context_line":"          - ceph_authenticated_registry"},{"line_number":297,"context_line":"          - yaql:"},{"line_number":298,"context_line":"              data: {get_param: CephAuthRegistryParams}"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"3fa7e38b_54543121","line":295,"in_reply_to":"3fa7e38b_6fe3fe06","updated":"2019-09-24 12:08:15.000000000","message":"Thanks for the hint. I\u0027ll remove the if here!","commit_id":"68702c3d5567e7523769b7368db98f43348788a1"},{"author":{"_account_id":6796,"name":"Giulio Fidente","email":"gfidente@redhat.com","username":"gfidente"},"change_message_id":"42878715ddebe6420cecba6e6eec9d24dd9a6d7a","unresolved":false,"context_lines":[{"line_number":306,"context_line":"              expression: $.data.get(\u0027password\u0027, \u0027\u0027)"},{"line_number":307,"context_line":"          - \u0027\u0027"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"  CephRegistryAuthParameters:"},{"line_number":310,"context_line":"    type: OS::Heat::Value"},{"line_number":311,"context_line":"    properties:"},{"line_number":312,"context_line":"      type: json"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"3fa7e38b_4fcf227f","line":309,"updated":"2019-09-18 11:58:30.000000000","message":"unnecessary","commit_id":"68702c3d5567e7523769b7368db98f43348788a1"},{"author":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"change_message_id":"87ddd76b3f5fc17216757f9f60bfd63ae68d0c6f","unresolved":false,"context_lines":[{"line_number":306,"context_line":"              expression: $.data.get(\u0027password\u0027, \u0027\u0027)"},{"line_number":307,"context_line":"          - \u0027\u0027"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"  CephRegistryAuthParameters:"},{"line_number":310,"context_line":"    type: OS::Heat::Value"},{"line_number":311,"context_line":"    properties:"},{"line_number":312,"context_line":"      type: json"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"3fa7e38b_942389bd","line":309,"in_reply_to":"3fa7e38b_4fcf227f","updated":"2019-09-24 12:08:15.000000000","message":"Since we want to always pass these parameters to ceph-ansible (even though auth_registry is false), we can avoid this structure and add the l31{4,5} in the CephBaseAnsibleVars structure (and avoid merging the two maps)","commit_id":"68702c3d5567e7523769b7368db98f43348788a1"},{"author":{"_account_id":6796,"name":"Giulio Fidente","email":"gfidente@redhat.com","username":"gfidente"},"change_message_id":"1bd22bb89eefced90f7d37e14808ae55ea533f35","unresolved":false,"context_lines":[{"line_number":357,"context_line":"          ceph_docker_registry: {get_attr: [ContainerImageUrlParts, value, host]}"},{"line_number":358,"context_line":"          ceph_docker_image: {get_attr: [ContainerImageUrlParts, value, image]}"},{"line_number":359,"context_line":"          ceph_docker_image_tag: {get_attr: [ContainerImageUrlParts, value, image_tag]}"},{"line_number":360,"context_line":"          ceph_docker_registry_auth: {get_param: CephAuthRegistry}"},{"line_number":361,"context_line":"          public_network:"},{"line_number":362,"context_line":"            list_join:"},{"line_number":363,"context_line":"              - \u0027,\u0027"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"3fa7e38b_ddf74bf5","line":360,"updated":"2019-09-18 10:38:20.000000000","message":"this should be removed as well, while you could add here l314 and l315","commit_id":"68702c3d5567e7523769b7368db98f43348788a1"},{"author":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"change_message_id":"87ddd76b3f5fc17216757f9f60bfd63ae68d0c6f","unresolved":false,"context_lines":[{"line_number":357,"context_line":"          ceph_docker_registry: {get_attr: [ContainerImageUrlParts, value, host]}"},{"line_number":358,"context_line":"          ceph_docker_image: {get_attr: [ContainerImageUrlParts, value, image]}"},{"line_number":359,"context_line":"          ceph_docker_image_tag: {get_attr: [ContainerImageUrlParts, value, image_tag]}"},{"line_number":360,"context_line":"          ceph_docker_registry_auth: {get_param: CephAuthRegistry}"},{"line_number":361,"context_line":"          public_network:"},{"line_number":362,"context_line":"            list_join:"},{"line_number":363,"context_line":"              - \u0027,\u0027"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"3fa7e38b_ef246ab1","line":360,"in_reply_to":"3fa7e38b_ddf74bf5","updated":"2019-09-24 12:08:15.000000000","message":"we should remove the {get_param: CephAuthRegistry} assignment since we want to remove a specific boolean param, but this should be present in the json variables, so I should add a new param in ContainerImageUrlParts:\n\n```\n auth_registry:\n    - yaql:\n       data: {get_param: CephAuthRegistryParams}\n       expression: $.data.get(\u0027authenticated_registry\u0027, \u0027\u0027)\n```\n\nand get it here (like I\u0027ve done with username and password).\nI think we cannot avoid to keep the boolean value because it\u0027s evaluated here [1][2].\n\n\n[1] https://github.com/ceph/ceph-ansible/pull/4444/files#diff-87d7fc83e0cde9c50ea7635bd92e1ec5R22\n[2] https://github.com/ceph/ceph-ansible/pull/4444/files#diff-d4f8a0c1dabf72e117f5066953ff8eb6R144","commit_id":"68702c3d5567e7523769b7368db98f43348788a1"},{"author":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"change_message_id":"066380e730a5fc5f9cfe1902a24bbe2770b98f63","unresolved":false,"context_lines":[{"line_number":357,"context_line":"          ceph_docker_registry: {get_attr: [ContainerImageUrlParts, value, host]}"},{"line_number":358,"context_line":"          ceph_docker_image: {get_attr: [ContainerImageUrlParts, value, image]}"},{"line_number":359,"context_line":"          ceph_docker_image_tag: {get_attr: [ContainerImageUrlParts, value, image_tag]}"},{"line_number":360,"context_line":"          ceph_docker_registry_auth: {get_param: CephAuthRegistry}"},{"line_number":361,"context_line":"          public_network:"},{"line_number":362,"context_line":"            list_join:"},{"line_number":363,"context_line":"              - \u0027,\u0027"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"3fa7e38b_ca595c8e","line":360,"in_reply_to":"3fa7e38b_ef246ab1","updated":"2019-09-24 13:24:12.000000000","message":"After few testings I realized I can avoid the auth_registry parameter and just set it directly to true when the username/password are not empty and the condition is true.\nI\u0027ll update this review removing this param.","commit_id":"68702c3d5567e7523769b7368db98f43348788a1"},{"author":{"_account_id":6796,"name":"Giulio Fidente","email":"gfidente@redhat.com","username":"gfidente"},"change_message_id":"1bd22bb89eefced90f7d37e14808ae55ea533f35","unresolved":false,"context_lines":[{"line_number":532,"context_line":"              set_fact:"},{"line_number":533,"context_line":"                blacklisted_hostnames: {get_param: DeploymentServerBlacklist}"},{"line_number":534,"context_line":"                ceph_ansible_group_vars_all:"},{"line_number":535,"context_line":"                  if:"},{"line_number":536,"context_line":"                  - ceph_authenticated_registry"},{"line_number":537,"context_line":"                  - yaql:"},{"line_number":538,"context_line":"                      data:"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"3fa7e38b_3de69f46","line":535,"updated":"2019-09-18 10:38:20.000000000","message":"so this won\u0027t be needed either","commit_id":"68702c3d5567e7523769b7368db98f43348788a1"},{"author":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"change_message_id":"87ddd76b3f5fc17216757f9f60bfd63ae68d0c6f","unresolved":false,"context_lines":[{"line_number":532,"context_line":"              set_fact:"},{"line_number":533,"context_line":"                blacklisted_hostnames: {get_param: DeploymentServerBlacklist}"},{"line_number":534,"context_line":"                ceph_ansible_group_vars_all:"},{"line_number":535,"context_line":"                  if:"},{"line_number":536,"context_line":"                  - ceph_authenticated_registry"},{"line_number":537,"context_line":"                  - yaql:"},{"line_number":538,"context_line":"                      data:"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"3fa7e38b_2f54c2fe","line":535,"in_reply_to":"3fa7e38b_3de69f46","updated":"2019-09-24 12:08:15.000000000","message":"yeah, we can avoid the map merge after reworking this review according to the comments above.","commit_id":"68702c3d5567e7523769b7368db98f43348788a1"},{"author":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"change_message_id":"edac3d93770c153b58318b0d1ecd973a971bed30","unresolved":false,"context_lines":[{"line_number":244,"context_line":"    yaql:"},{"line_number":245,"context_line":"      data: {get_param: CephConfigOverrides}"},{"line_number":246,"context_line":"      expression: $.data.keys().any(predicate \u003d\u003e $ in [\u0027global\u0027, \u0027mon\u0027, \u0027mgr\u0027, \u0027osd\u0027, \u0027mds\u0027, \u0027client\u0027])"},{"line_number":247,"context_line":"  ceph_authenticated_registry:"},{"line_number":248,"context_line":"      and:"},{"line_number":249,"context_line":"      - not:"},{"line_number":250,"context_line":"          equals:"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"3fa7e38b_9be88de2","line":247,"range":{"start_line":247,"start_character":2,"end_line":247,"end_character":30},"updated":"2019-09-24 20:32:40.000000000","message":"This condition will be true when both username and password are not an empty string.\nWe use this condition on l334 to assign the proper bool and pass it to ceph-ansible.\nCeph-ansible will process the registry credentials only if the bool is true.","commit_id":"dec6ae40cb072720bcdf73e4581f58a42d2e2748"},{"author":{"_account_id":6796,"name":"Giulio Fidente","email":"gfidente@redhat.com","username":"gfidente"},"change_message_id":"a68e46ac283f1670dc1629d0f8a7aa5400603527","unresolved":false,"context_lines":[{"line_number":247,"context_line":"  ceph_authenticated_registry:"},{"line_number":248,"context_line":"      and:"},{"line_number":249,"context_line":"      - not:"},{"line_number":250,"context_line":"          equals:"},{"line_number":251,"context_line":"          - yaql:"},{"line_number":252,"context_line":"              data: {get_param: CephAuthRegistryParams}"},{"line_number":253,"context_line":"              expression: $.data.get(\"username\", \u0027\u0027).isEmpty()"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"3fa7e38b_7cd8241d","line":250,"updated":"2019-09-25 07:31:57.000000000","message":"I think you can get rid of \"equals\" and just do not(yaql expression)","commit_id":"dec6ae40cb072720bcdf73e4581f58a42d2e2748"},{"author":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"change_message_id":"611e57e37b643a00a34b46654e3aad2cbdc8ab9d","unresolved":false,"context_lines":[{"line_number":247,"context_line":"  ceph_authenticated_registry:"},{"line_number":248,"context_line":"      and:"},{"line_number":249,"context_line":"      - not:"},{"line_number":250,"context_line":"          equals:"},{"line_number":251,"context_line":"          - yaql:"},{"line_number":252,"context_line":"              data: {get_param: CephAuthRegistryParams}"},{"line_number":253,"context_line":"              expression: $.data.get(\"username\", \u0027\u0027).isEmpty()"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"3fa7e38b_24291c9a","line":250,"in_reply_to":"3fa7e38b_7cd8241d","updated":"2019-09-26 06:52:12.000000000","message":"Thanks for this, yeah I\u0027ve tested it and equals is not required anymore!","commit_id":"dec6ae40cb072720bcdf73e4581f58a42d2e2748"},{"author":{"_account_id":18002,"name":"John Fulton","email":"fulton@redhat.com","username":"fultonj"},"change_message_id":"d288462e2905e51d6fd34de5b9209820444026f4","unresolved":false,"context_lines":[{"line_number":213,"context_line":"                 deployment not to fail. Used to catch deployment errors early."},{"line_number":214,"context_line":"                 Set this value to 0 to disable this check."},{"line_number":215,"context_line":"    type: number"},{"line_number":216,"context_line":"  CephAuthRegistryParams:"},{"line_number":217,"context_line":"    description: The username and password used to authenticate on the"},{"line_number":218,"context_line":"                 registry to pull ceph containers"},{"line_number":219,"context_line":"    type: json"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"3fa7e38b_96bfdb5f","line":216,"range":{"start_line":216,"start_character":2,"end_line":216,"end_character":24},"updated":"2019-09-26 13:48:30.000000000","message":"Often the user will have already set something like the following so can we have an option for this parameter to get the username/password from it? It doesn\u0027t seem good to require them to hardcode their username/password twice.\n\n  ContainerImagePrepare:\n  - push_destination: 192.168.24.1:8787\n    set:\n      ceph_namespace: registry.redhat.io/rhceph-beta\n      ceph_image: rhceph-4-rhel8\n      ceph_tag: latest\n      name_prefix: openstack-\n      namespace: registry.redhat.io/rhosp15-rhel8\n      tag: latest\n  ContainerImageRegistryCredentials:\n    registry.redhat.io:\n      username: password","commit_id":"b3c144331ff78e15d7bec49a66d4827ba60ee7ba"},{"author":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"change_message_id":"92fe00eaaac18559464bd505ff23d3f2c31f529d","unresolved":false,"context_lines":[{"line_number":213,"context_line":"                 deployment not to fail. Used to catch deployment errors early."},{"line_number":214,"context_line":"                 Set this value to 0 to disable this check."},{"line_number":215,"context_line":"    type: number"},{"line_number":216,"context_line":"  CephAuthRegistryParams:"},{"line_number":217,"context_line":"    description: The username and password used to authenticate on the"},{"line_number":218,"context_line":"                 registry to pull ceph containers"},{"line_number":219,"context_line":"    type: json"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"3fa7e38b_d4b9ba78","line":216,"range":{"start_line":216,"start_character":2,"end_line":216,"end_character":24},"in_reply_to":"3fa7e38b_96bfdb5f","updated":"2019-09-27 10:27:26.000000000","message":"Sure, I think you\u0027re right, we want to avoid users to hardcode credentials twice and it\u0027s worth to reuse the existing username/password if provided by ContainerImageRegistryCredentials.\nSo I think the evaluation flow is right, and I\u0027m going to turn this parameter:\n\n```\nCephAuthRegistryParams:\n   description: The username and password used to authenticate on the\n                 registry to pull ceph containers\n    type: json\n    default: {}\n```\n\ninto:\n\n```\nContainerImageRegistryCredentials:\n    description: The username and password used to authenticate on the\n                 registry to pull ceph containers\n    type: json\n    default: {}\n```\n\nIn this way we can keep the same json structure provided by the \"container image prepare\" flow and process it accordingly.\nThe other change I\u0027m going to make is related to the yaql expression.\nWhen I originally created this review I\u0027ve thought about this data structure:\n\n```\n CephAuthRegistryParams:\n    username: \"test_user\"\n    password: \"test_password\"\n```\nbut, since I realized the ContainerImageRegistryCredentials is something like:\n\n```\nContainerImageRegistryCredentials:\n    registry.redhat.io:\n      username: password\n```\nI decided to reuse the same json data structure.\nThis should ensure the same user experience to TripleO users (and for me it\u0027s resulting in changing the yaql expression to process the json).\nIn the next PS I\u0027ll provide the changes described above and I\u0027ll testing in this review [1]\n\n[1] https://review.opendev.org/#/c/677699","commit_id":"b3c144331ff78e15d7bec49a66d4827ba60ee7ba"},{"author":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"change_message_id":"9fe6d84a6919f984d8355704685ba26cd7a7a827","unresolved":false,"context_lines":[{"line_number":249,"context_line":"      - not:"},{"line_number":250,"context_line":"          yaql:"},{"line_number":251,"context_line":"            data: {get_param: ContainerImageRegistryCredentials}"},{"line_number":252,"context_line":"            expression: let(c \u003d\u003e $.data.values()) -\u003e list(list($c)[0].keys())[0].isEmpty()"},{"line_number":253,"context_line":"      - not:"},{"line_number":254,"context_line":"          yaql:"},{"line_number":255,"context_line":"            data: {get_param: ContainerImageRegistryCredentials}"}],"source_content_type":"text/x-yaml","patch_set":12,"id":"3fa7e38b_9db045df","line":252,"range":{"start_line":252,"start_character":24,"end_line":252,"end_character":80},"updated":"2019-09-27 12:07:20.000000000","message":"I\u0027m still working on this expression (and the others on l256, l336, l340) to handle these two cases:\n\n1. \n\n```\nContainerImageRegistryCredentials: {}\n```\n\n2.\n\n```\nContainerImageRegistryCredentials:\n    registry.redhat.io: {}\n```","commit_id":"88a6f969daeace2caf0b679bc432d0b5c9540c43"},{"author":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"change_message_id":"fea310da6c6eba3de7f2352f3674df70248a82f0","unresolved":false,"context_lines":[{"line_number":249,"context_line":"      - not:"},{"line_number":250,"context_line":"          yaql:"},{"line_number":251,"context_line":"            data: {get_param: ContainerImageRegistryCredentials}"},{"line_number":252,"context_line":"            expression: let(c \u003d\u003e $.data.values()) -\u003e list(list($c)[0].keys())[0].isEmpty()"},{"line_number":253,"context_line":"      - not:"},{"line_number":254,"context_line":"          yaql:"},{"line_number":255,"context_line":"            data: {get_param: ContainerImageRegistryCredentials}"}],"source_content_type":"text/x-yaml","patch_set":12,"id":"3fa7e38b_a8cf0127","line":252,"range":{"start_line":252,"start_character":24,"end_line":252,"end_character":80},"in_reply_to":"3fa7e38b_9db045df","updated":"2019-09-27 13:12:45.000000000","message":"The case 2. is covered by tripleo-common/image_uploader.py that will raise an exception [1] (TypeError: Credentials entry must be a dict with a single item) and with the last PS we\u0027re able to handle case 1. providing (like we\u0027ve done before) \"ceph_docker_registry_auth: false\" to ceph-ansible\n\n[1] https://github.com/openstack/tripleo-common/blob/master/tripleo_common/image/image_uploader.py#L173","commit_id":"88a6f969daeace2caf0b679bc432d0b5c9540c43"},{"author":{"_account_id":18002,"name":"John Fulton","email":"fulton@redhat.com","username":"fultonj"},"change_message_id":"d36f7e24502240193c7973c870a476afcc09b1a5","unresolved":false,"context_lines":[{"line_number":245,"context_line":"      data: {get_param: CephConfigOverrides}"},{"line_number":246,"context_line":"      expression: $.data.keys().any(predicate \u003d\u003e $ in [\u0027global\u0027, \u0027mon\u0027, \u0027mgr\u0027, \u0027osd\u0027, \u0027mds\u0027, \u0027client\u0027])"},{"line_number":247,"context_line":"  ceph_authenticated_registry:"},{"line_number":248,"context_line":"      and:"},{"line_number":249,"context_line":"      - not:"},{"line_number":250,"context_line":"          yaql:"},{"line_number":251,"context_line":"            data: {get_param: ContainerImageRegistryCredentials}"}],"source_content_type":"text/x-yaml","patch_set":14,"id":"3fa7e38b_35d92556","line":248,"range":{"start_line":248,"start_character":6,"end_line":248,"end_character":9},"updated":"2019-09-27 14:18:48.000000000","message":"Clever use of \"not and not\" to set this boolean.","commit_id":"4ec915671c5510a218b3844988689e05e663ecf0"},{"author":{"_account_id":18002,"name":"John Fulton","email":"fulton@redhat.com","username":"fultonj"},"change_message_id":"040f5740f7eb85260b64cbc7d82d8ba0f64481fb","unresolved":false,"context_lines":[{"line_number":249,"context_line":"      - not:"},{"line_number":250,"context_line":"          yaql:"},{"line_number":251,"context_line":"            data: {get_param: ContainerImageRegistryCredentials}"},{"line_number":252,"context_line":"            expression: let(c \u003d\u003e $.data.values()) -\u003e list($c).last(default \u003d\u003e {}).keys().last(default \u003d\u003e\"\").isEmpty()"},{"line_number":253,"context_line":"      - not:"},{"line_number":254,"context_line":"          yaql:"},{"line_number":255,"context_line":"            data: {get_param: ContainerImageRegistryCredentials}"}],"source_content_type":"text/x-yaml","patch_set":14,"id":"3fa7e38b_958b39c1","line":252,"range":{"start_line":252,"start_character":12,"end_line":252,"end_character":22},"updated":"2019-09-27 14:41:19.000000000","message":"This doesn\u0027t handle the following valid scenario:\n\n[docker.io: {username:password}, redhat.io: {username:password}, foo.io: {username:password}]\n\nIf the user passes the above for ContainerImageRegistryCredentials, then you need to pull only the username and password which match the key \"ceph_namespace\".\n\nFor context the user is allowed to do this:\n\n  ContainerImagePrepare:\n  - push_destination: 192.168.24.1:8787\n    set:\n      ceph_namespace: registry.redhat.io/rhceph-beta\n      ceph_image: rhceph-4-rhel8\n      ceph_tag: 4-1\n      name_prefix: openstack-\n      namespace: docker.io/train\n      tag: latest\n  ContainerImageRegistryCredentials:\n    registry.redhat.io:\n      username: password\n    docker.io:\n      username: password","commit_id":"4ec915671c5510a218b3844988689e05e663ecf0"},{"author":{"_account_id":18002,"name":"John Fulton","email":"fulton@redhat.com","username":"fultonj"},"change_message_id":"d36f7e24502240193c7973c870a476afcc09b1a5","unresolved":false,"context_lines":[{"line_number":249,"context_line":"      - not:"},{"line_number":250,"context_line":"          yaql:"},{"line_number":251,"context_line":"            data: {get_param: ContainerImageRegistryCredentials}"},{"line_number":252,"context_line":"            expression: let(c \u003d\u003e $.data.values()) -\u003e list($c).last(default \u003d\u003e {}).keys().last(default \u003d\u003e\"\").isEmpty()"},{"line_number":253,"context_line":"      - not:"},{"line_number":254,"context_line":"          yaql:"},{"line_number":255,"context_line":"            data: {get_param: ContainerImageRegistryCredentials}"}],"source_content_type":"text/x-yaml","patch_set":14,"id":"3fa7e38b_d50d31e8","line":252,"range":{"start_line":252,"start_character":81,"end_line":252,"end_character":88},"updated":"2019-09-27 14:18:48.000000000","message":"username","commit_id":"4ec915671c5510a218b3844988689e05e663ecf0"},{"author":{"_account_id":18002,"name":"John Fulton","email":"fulton@redhat.com","username":"fultonj"},"change_message_id":"d36f7e24502240193c7973c870a476afcc09b1a5","unresolved":false,"context_lines":[{"line_number":253,"context_line":"      - not:"},{"line_number":254,"context_line":"          yaql:"},{"line_number":255,"context_line":"            data: {get_param: ContainerImageRegistryCredentials}"},{"line_number":256,"context_line":"            expression: let(c \u003d\u003e $.data.values()) -\u003e list($c).last(default \u003d\u003e {}).values().last(default \u003d\u003e\"\").isEmpty()"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"resources:"},{"line_number":259,"context_line":"  ContainerImageUrlParts:"}],"source_content_type":"text/x-yaml","patch_set":14,"id":"3fa7e38b_f5106d02","line":256,"range":{"start_line":256,"start_character":81,"end_line":256,"end_character":90},"updated":"2019-09-27 14:18:48.000000000","message":"password","commit_id":"4ec915671c5510a218b3844988689e05e663ecf0"},{"author":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"change_message_id":"b9a43a5fef4d48ba90ad2453f449f4aee11f57b5","unresolved":false,"context_lines":[{"line_number":250,"context_line":"          yaql:"},{"line_number":251,"context_line":"            data:"},{"line_number":252,"context_line":"              cred: {get_param: ContainerImageRegistryCredentials}"},{"line_number":253,"context_line":"              ns:"},{"line_number":254,"context_line":"               yaql:"},{"line_number":255,"context_line":"                expression: let(location \u003d\u003e $.data.rightSplit(\u0027:\u0027, 1)[0]) -\u003e regex(\u0027(?:https?://)?(.*?)/(.*)\u0027).split($location)[1]"},{"line_number":256,"context_line":"                data: {get_param: ContainerCephDaemonImage}"},{"line_number":257,"context_line":"            expression: let(c \u003d\u003e $.data.cred) -\u003e $c.get($.data.ns, {}).keys().last(default \u003d\u003e\"\").isEmpty()"},{"line_number":258,"context_line":"      - not:"},{"line_number":259,"context_line":"          yaql:"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"3fa7e38b_04bf19d1","line":256,"range":{"start_line":253,"start_character":14,"end_line":256,"end_character":59},"updated":"2019-09-27 18:11:25.000000000","message":"At this stage {get_attr: [ContainerImageUrlParts, value, host]} is not available, so we need to check the username and password strings according to the selected registry.\nFor this reason this is an attempt to use a nested yaql structure that helps to retrieve the ceph_namespace and make some string manipulation (splitting by \"/\") to get the registry.\nThen we can use it on l257 to get the element of the dict.","commit_id":"eef918727443f3f82d913b36e354871f4d09bb69"},{"author":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"change_message_id":"b9a43a5fef4d48ba90ad2453f449f4aee11f57b5","unresolved":false,"context_lines":[{"line_number":259,"context_line":"          yaql:"},{"line_number":260,"context_line":"            data:"},{"line_number":261,"context_line":"              cred: {get_param: ContainerImageRegistryCredentials}"},{"line_number":262,"context_line":"              ns:"},{"line_number":263,"context_line":"               yaql:"},{"line_number":264,"context_line":"                expression: let(location \u003d\u003e $.data.rightSplit(\u0027:\u0027, 1)[0]) -\u003e regex(\u0027(?:https?://)?(.*?)/(.*)\u0027).split($location)[1]"},{"line_number":265,"context_line":"                data: {get_param: ContainerCephDaemonImage}"},{"line_number":266,"context_line":"            expression: let(c \u003d\u003e $.data.cred) -\u003e $c.get($.data.ns, {}).values().last(default \u003d\u003e\"\").isEmpty()"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"resources:"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"3fa7e38b_a4cde585","line":265,"range":{"start_line":262,"start_character":14,"end_line":265,"end_character":59},"updated":"2019-09-27 18:11:25.000000000","message":"Not sure if we can define a single block and then import in the yaql \"data\" to avoid code duplication (I tried without success :/).\n@gfidente any ideas?","commit_id":"eef918727443f3f82d913b36e354871f4d09bb69"},{"author":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"change_message_id":"b9a43a5fef4d48ba90ad2453f449f4aee11f57b5","unresolved":false,"context_lines":[{"line_number":345,"context_line":"              data:"},{"line_number":346,"context_line":"                cred: {get_param: ContainerImageRegistryCredentials}"},{"line_number":347,"context_line":"                ns: {get_attr: [ContainerImageUrlParts, value, host]}"},{"line_number":348,"context_line":"              expression: let(c \u003d\u003e $.data.cred) -\u003e $c.get($.data.ns, {}).keys().last(default \u003d\u003e\"\")"},{"line_number":349,"context_line":"          ceph_docker_registry_password:"},{"line_number":350,"context_line":"            yaql:"},{"line_number":351,"context_line":"              data:"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"3fa7e38b_8476a96f","line":348,"range":{"start_line":348,"start_character":58,"end_line":348,"end_character":67},"updated":"2019-09-27 18:11:25.000000000","message":"here is pretty simple make a \"filter by registry\": we can use the namespace (host) to get the username.\nSame story to get the password (l354)","commit_id":"eef918727443f3f82d913b36e354871f4d09bb69"},{"author":{"_account_id":6796,"name":"Giulio Fidente","email":"gfidente@redhat.com","username":"gfidente"},"change_message_id":"b8626a4fa17e25d7c3dfb5b8ee31c32502139e52","unresolved":false,"context_lines":[{"line_number":258,"context_line":"              cred: {get_param: ContainerImageRegistryCredentials}"},{"line_number":259,"context_line":"              ns:"},{"line_number":260,"context_line":"               yaql:"},{"line_number":261,"context_line":"                expression: let(location \u003d\u003e $.data.rightSplit(\u0027:\u0027, 1)[0]) -\u003e regex(\u0027(?:https?://)?(.*?)/(.*)\u0027).split($location)[1]"},{"line_number":262,"context_line":"                data: {get_param: ContainerCephDaemonImage}"},{"line_number":263,"context_line":"            expression: let(c \u003d\u003e $.data.cred) -\u003e $c.get($.data.ns, {}).keys().last(default \u003d\u003e\"\").isEmpty()"},{"line_number":264,"context_line":"      - not:"}],"source_content_type":"text/x-yaml","patch_set":17,"id":"3fa7e38b_55e5a8da","line":261,"updated":"2019-09-30 14:33:46.000000000","message":"the image url might or might not have the https:// http:// prefix, so this probably won\u0027t work as-is","commit_id":"9c13c95536c6088bbbf7b763cc0e644ee24e3a02"},{"author":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"change_message_id":"3ee3291e38f3c880082deaa176c4d41b9a3be4d0","unresolved":false,"context_lines":[{"line_number":258,"context_line":"              cred: {get_param: ContainerImageRegistryCredentials}"},{"line_number":259,"context_line":"              ns:"},{"line_number":260,"context_line":"               yaql:"},{"line_number":261,"context_line":"                expression: let(location \u003d\u003e $.data.rightSplit(\u0027:\u0027, 1)[0]) -\u003e regex(\u0027(?:https?://)?(.*?)/(.*)\u0027).split($location)[1]"},{"line_number":262,"context_line":"                data: {get_param: ContainerCephDaemonImage}"},{"line_number":263,"context_line":"            expression: let(c \u003d\u003e $.data.cred) -\u003e $c.get($.data.ns, {}).keys().last(default \u003d\u003e\"\").isEmpty()"},{"line_number":264,"context_line":"      - not:"}],"source_content_type":"text/x-yaml","patch_set":17,"id":"3fa7e38b_983037a1","line":261,"in_reply_to":"3fa7e38b_55e5a8da","updated":"2019-09-30 15:02:01.000000000","message":"tbh not sure about this expression, I can make more tests but basically I used the same of l284 and the same data (ContainerCephDaemonImage) and I assumed it works properly to get the registry starting from the registry/image:tag form: I\u0027ll double check it!","commit_id":"9c13c95536c6088bbbf7b763cc0e644ee24e3a02"},{"author":{"_account_id":6796,"name":"Giulio Fidente","email":"gfidente@redhat.com","username":"gfidente"},"change_message_id":"b8e9c8f2801f3632660d69f121d08d02f36dc0a4","unresolved":false,"context_lines":[{"line_number":258,"context_line":"              cred: {get_param: ContainerImageRegistryCredentials}"},{"line_number":259,"context_line":"              ns:"},{"line_number":260,"context_line":"               yaql:"},{"line_number":261,"context_line":"                expression: let(location \u003d\u003e $.data.rightSplit(\u0027:\u0027, 1)[0]) -\u003e regex(\u0027(?:https?://)?(.*?)/(.*)\u0027).split($location)[1]"},{"line_number":262,"context_line":"                data: {get_param: ContainerCephDaemonImage}"},{"line_number":263,"context_line":"            expression: let(c \u003d\u003e $.data.cred) -\u003e $c.get($.data.ns, {}).keys().last(default \u003d\u003e\"\").isEmpty()"},{"line_number":264,"context_line":"      - not:"}],"source_content_type":"text/x-yaml","patch_set":17,"id":"3fa7e38b_98a357b2","line":261,"in_reply_to":"3fa7e38b_983037a1","updated":"2019-09-30 15:05:46.000000000","message":"cool, np","commit_id":"9c13c95536c6088bbbf7b763cc0e644ee24e3a02"},{"author":{"_account_id":6796,"name":"Giulio Fidente","email":"gfidente@redhat.com","username":"gfidente"},"change_message_id":"b8626a4fa17e25d7c3dfb5b8ee31c32502139e52","unresolved":false,"context_lines":[{"line_number":260,"context_line":"               yaql:"},{"line_number":261,"context_line":"                expression: let(location \u003d\u003e $.data.rightSplit(\u0027:\u0027, 1)[0]) -\u003e regex(\u0027(?:https?://)?(.*?)/(.*)\u0027).split($location)[1]"},{"line_number":262,"context_line":"                data: {get_param: ContainerCephDaemonImage}"},{"line_number":263,"context_line":"            expression: let(c \u003d\u003e $.data.cred) -\u003e $c.get($.data.ns, {}).keys().last(default \u003d\u003e\"\").isEmpty()"},{"line_number":264,"context_line":"      - not:"},{"line_number":265,"context_line":"          yaql:"},{"line_number":266,"context_line":"            data:"}],"source_content_type":"text/x-yaml","patch_set":17,"id":"3fa7e38b_f215ca3d","line":263,"updated":"2019-09-30 14:33:46.000000000","message":"I think this could be shorter but you probably wanted to make sure the yaql called later would work?\n\nlet(c \u003d\u003e $.data.cred) -\u003e $c.get($.data.ns, {}).len() \u003c 1","commit_id":"9c13c95536c6088bbbf7b763cc0e644ee24e3a02"},{"author":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"change_message_id":"3ee3291e38f3c880082deaa176c4d41b9a3be4d0","unresolved":false,"context_lines":[{"line_number":260,"context_line":"               yaql:"},{"line_number":261,"context_line":"                expression: let(location \u003d\u003e $.data.rightSplit(\u0027:\u0027, 1)[0]) -\u003e regex(\u0027(?:https?://)?(.*?)/(.*)\u0027).split($location)[1]"},{"line_number":262,"context_line":"                data: {get_param: ContainerCephDaemonImage}"},{"line_number":263,"context_line":"            expression: let(c \u003d\u003e $.data.cred) -\u003e $c.get($.data.ns, {}).keys().last(default \u003d\u003e\"\").isEmpty()"},{"line_number":264,"context_line":"      - not:"},{"line_number":265,"context_line":"          yaql:"},{"line_number":266,"context_line":"            data:"}],"source_content_type":"text/x-yaml","patch_set":17,"id":"3fa7e38b_58f15f00","line":263,"in_reply_to":"3fa7e38b_f215ca3d","updated":"2019-09-30 15:02:01.000000000","message":"Yeah exactly, I\u0027ve tried the solution len-based, but for instance if you have data like:\n\n\u0027\u0027\u0027\ndata:\n  registry.redhat.io:\n    \"\": test_password\n  foo.bar.io:\n    foo_user: foo_password\n  \n\u0027\u0027\u0027\n\nthis is just a corner case, but if you try to execute the expression you suggest the result is still \"1\" (resulting in  \"true\"), but I need to get \"false\" because the first half is an empty string.\nSame story for the password.","commit_id":"9c13c95536c6088bbbf7b763cc0e644ee24e3a02"}]}
