)]}'
{"playbooks/roles/matrix-gerritbot/defaults/main.yaml":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"1cf8b6c854bf86e7b2f8c530934057157db67582","unresolved":true,"context_lines":[{"line_number":5,"context_line":"gerritbot_ssh_key: |"},{"line_number":6,"context_line":"  -----BEGIN OPENSSH PRIVATE KEY-----"},{"line_number":7,"context_line":"  ..."},{"line_number":8,"context_line":"  -----END OPENSSH PRIVATE KEY-----"},{"line_number":9,"context_line":"gerritbot_ssh_key_format: \"rsa\""},{"line_number":10,"context_line":"gerritbot_known_hosts: |"},{"line_number":11,"context_line":"  [review.opendev.org]:29418 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfsIj/jqpI+2CFdjCL6kOiqdORWvxQ2sQbCzSzzmLXic8yVhCCbwarkvEpfUOHG4eyB0vqVZfMffxf0Yy3qjURrsroBCiuJ8GdiAcGdfYwHNfBI0cR6kydBZL537YDasIk0Z3ILzhwf7474LmkVzS7V2tMTb4ZiBS/jUeiHsVp88FZhIBkyhlb/awAGcUxT5U4QBXCAmerYXeB47FPuz9JFOVyF08LzH9JRe9tfXtqaCNhlSdRe/2pPRvn2EIhn5uHWwATACG9MBdrK8xv8LqPOik2w1JkgLWyBj11vDd5I3IjrmREGw8dqImqp0r6MD8rxqADlc1elfDIXYsy+TVH"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"d467e563_686666e5","line":8,"updated":"2021-07-23 21:19:33.000000000","message":"Wouldn\u0027t it be better to not set a default value for this?","commit_id":"5db67488baeb018bd15c1cb4fc57ed24bc954eab"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"1f91599a10bbea52347c790c2ab10f6a7b5e9818","unresolved":false,"context_lines":[{"line_number":5,"context_line":"gerritbot_ssh_key: |"},{"line_number":6,"context_line":"  -----BEGIN OPENSSH PRIVATE KEY-----"},{"line_number":7,"context_line":"  ..."},{"line_number":8,"context_line":"  -----END OPENSSH PRIVATE KEY-----"},{"line_number":9,"context_line":"gerritbot_ssh_key_format: \"rsa\""},{"line_number":10,"context_line":"gerritbot_known_hosts: |"},{"line_number":11,"context_line":"  [review.opendev.org]:29418 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfsIj/jqpI+2CFdjCL6kOiqdORWvxQ2sQbCzSzzmLXic8yVhCCbwarkvEpfUOHG4eyB0vqVZfMffxf0Yy3qjURrsroBCiuJ8GdiAcGdfYwHNfBI0cR6kydBZL537YDasIk0Z3ILzhwf7474LmkVzS7V2tMTb4ZiBS/jUeiHsVp88FZhIBkyhlb/awAGcUxT5U4QBXCAmerYXeB47FPuz9JFOVyF08LzH9JRe9tfXtqaCNhlSdRe/2pPRvn2EIhn5uHWwATACG9MBdrK8xv8LqPOik2w1JkgLWyBj11vDd5I3IjrmREGw8dqImqp0r6MD8rxqADlc1elfDIXYsy+TVH"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"2492638a_a31918ed","line":8,"in_reply_to":"d467e563_686666e5","updated":"2021-07-24 01:05:40.000000000","message":"Done","commit_id":"5db67488baeb018bd15c1cb4fc57ed24bc954eab"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"759480429a8139c5a1c0d63d83d80fe066a84df7","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"# matrix configuration"},{"line_number":17,"context_line":"gerritbot_matrix_homeserver: \"https://opendev.ems.host\""},{"line_number":18,"context_line":"gerritbot_matrix_token: \"secret\""}],"source_content_type":"text/x-yaml","patch_set":10,"id":"826f45e2_45469194","line":18,"updated":"2021-07-23 21:26:02.000000000","message":"Is this a session token or password?  I suspect it may be a session token since we don\u0027t have a username.  But that means we need to manually obtain a session token.","commit_id":"5db67488baeb018bd15c1cb4fc57ed24bc954eab"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"1cf8b6c854bf86e7b2f8c530934057157db67582","unresolved":true,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"# matrix configuration"},{"line_number":17,"context_line":"gerritbot_matrix_homeserver: \"https://opendev.ems.host\""},{"line_number":18,"context_line":"gerritbot_matrix_token: \"secret\""}],"source_content_type":"text/x-yaml","patch_set":10,"id":"134c2352_fa3662ba","line":18,"updated":"2021-07-23 21:19:33.000000000","message":"Same as above. Probably better to not set a default that isn\u0027t valid.","commit_id":"5db67488baeb018bd15c1cb4fc57ed24bc954eab"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"1f91599a10bbea52347c790c2ab10f6a7b5e9818","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"# matrix configuration"},{"line_number":17,"context_line":"gerritbot_matrix_homeserver: \"https://opendev.ems.host\""},{"line_number":18,"context_line":"gerritbot_matrix_token: \"secret\""}],"source_content_type":"text/x-yaml","patch_set":10,"id":"eca6c5df_bbe7d8a6","line":18,"in_reply_to":"134c2352_fa3662ba","updated":"2021-07-24 01:05:40.000000000","message":"Done","commit_id":"5db67488baeb018bd15c1cb4fc57ed24bc954eab"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"1f91599a10bbea52347c790c2ab10f6a7b5e9818","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"# matrix configuration"},{"line_number":17,"context_line":"gerritbot_matrix_homeserver: \"https://opendev.ems.host\""},{"line_number":18,"context_line":"gerritbot_matrix_token: \"secret\""}],"source_content_type":"text/x-yaml","patch_set":10,"id":"d5356262_c99524fc","line":18,"in_reply_to":"826f45e2_45469194","updated":"2021-07-24 01:05:40.000000000","message":"It\u0027s an access token (not a session token): https://matrix.org/docs/spec/legacy/#client-authentication , you get by calling the login endpoint, and you can disable it by calling the logout endpoint.","commit_id":"5db67488baeb018bd15c1cb4fc57ed24bc954eab"}],"playbooks/roles/matrix-gerritbot/files/gerritbot.yaml":[{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"55a156ef183debe68393d53d1084e867e47bd24d","unresolved":false,"context_lines":[{"line_number":28,"context_line":"  branches:"},{"line_number":29,"context_line":"    - \"master\""},{"line_number":30,"context_line":"  servers:"},{"line_number":31,"context_line":"    - \"review.opendev.org\""}],"source_content_type":"text/x-yaml","patch_set":9,"id":"e2b9b55d_9c4964aa","line":31,"updated":"2021-07-23 15:14:38.000000000","message":"#admin and #zuul don\u0027t exist -- should we drop them from this patch for now?","commit_id":"4ebc1a502a1f977da1abe9710dd369508faeee5a"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"2b65a43cb7edf9df85de20e00dab44c94c868932","unresolved":false,"context_lines":[{"line_number":28,"context_line":"  branches:"},{"line_number":29,"context_line":"    - \"master\""},{"line_number":30,"context_line":"  servers:"},{"line_number":31,"context_line":"    - \"review.opendev.org\""}],"source_content_type":"text/x-yaml","patch_set":9,"id":"61a03cb8_39721c23","line":31,"updated":"2021-07-21 16:20:19.000000000","message":"I agree that would be best -- however with no existing framework for doing that, I didn\u0027t think it was appropriate to push that burden onto this effort.\n\nAt the very least, I don\u0027t think we shoud be putting new files that control the opendev system into openstack/project-config.","commit_id":"4ebc1a502a1f977da1abe9710dd369508faeee5a"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"734c963683188ab084f04ff5e13952afdd4a841f","unresolved":true,"context_lines":[{"line_number":28,"context_line":"  branches:"},{"line_number":29,"context_line":"    - \"master\""},{"line_number":30,"context_line":"  servers:"},{"line_number":31,"context_line":"    - \"review.opendev.org\""}],"source_content_type":"text/x-yaml","patch_set":9,"id":"ff371704_2f1d08db","line":31,"updated":"2021-07-16 23:33:49.000000000","message":"I\u0027m surprised that consensus seems to be to keep this semi-changing, user-focused config file here.  This is not something that needs system-config-core oversight of once in operation.\n\nI buy that openstack/project-config is probably not the home for it.  However, https://opendev.org/opendev/project-config/ could work just as well IMO and provides somewhere for people who are more project-focused than devop-focused to help manage it.  \n\nI feel like this split of responsibilities is a real feature of our CD story and worth keeping.","commit_id":"4ebc1a502a1f977da1abe9710dd369508faeee5a"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"d3b3d4988581bcb37caeb3570acb31843f5782d1","unresolved":false,"context_lines":[{"line_number":28,"context_line":"  branches:"},{"line_number":29,"context_line":"    - \"master\""},{"line_number":30,"context_line":"  servers:"},{"line_number":31,"context_line":"    - \"review.opendev.org\""}],"source_content_type":"text/x-yaml","patch_set":9,"id":"4b874596_4fe13512","line":31,"updated":"2021-07-23 15:43:47.000000000","message":"In IRC Tristan mentioned the bot would exit if it can\u0027t join the rooms, so I think we should reduce this to only #test.","commit_id":"4ebc1a502a1f977da1abe9710dd369508faeee5a"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"902c92a023dee60b8a272692c50582a62f6f99e9","unresolved":true,"context_lines":[{"line_number":28,"context_line":"  branches:"},{"line_number":29,"context_line":"    - \"master\""},{"line_number":30,"context_line":"  servers:"},{"line_number":31,"context_line":"    - \"review.opendev.org\""}],"source_content_type":"text/x-yaml","patch_set":9,"id":"a2c39621_13968ca5","line":31,"in_reply_to":"ff371704_2f1d08db","updated":"2021-07-17 00:01:54.000000000","message":"That sounds like a good idea, is there a sync-opendev-project-config role we can use?","commit_id":"4ebc1a502a1f977da1abe9710dd369508faeee5a"}],"playbooks/roles/matrix-gerritbot/tasks/main.yaml":[{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"058eab724a3d8fb5b3075b5e2b9ccb112f5fba59","unresolved":true,"context_lines":[{"line_number":9,"context_line":""},{"line_number":10,"context_line":"- name: Install gerritbot config"},{"line_number":11,"context_line":"  copy:"},{"line_number":12,"context_line":"    src: gerritbot.yaml"},{"line_number":13,"context_line":"    dest: /var/lib/matrix-gerritbot/config/gerritbot.yaml"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"- name: Validate the configuration"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"be3c8821_08760ac0","line":12,"updated":"2021-07-13 01:07:30.000000000","message":"I think that we should discuss continuing to keep this in project-config.  This feels like something projects should control and not necessarily need infra-root review.  My personal preference is to keep it separate.  Even if not, this should likely come from group vars (see note below on templating the dhall).","commit_id":"4fd38ad5f0eec4bc1a43734f8ec168b4bdddc77e"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"e683383a86e2ef2e2a31391d62d6a975b3fcc7b0","unresolved":false,"context_lines":[{"line_number":9,"context_line":""},{"line_number":10,"context_line":"- name: Install gerritbot config"},{"line_number":11,"context_line":"  copy:"},{"line_number":12,"context_line":"    src: gerritbot.yaml"},{"line_number":13,"context_line":"    dest: /var/lib/matrix-gerritbot/config/gerritbot.yaml"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"- name: Validate the configuration"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"e1ea7f95_f5966901","line":12,"updated":"2021-07-16 15:59:40.000000000","message":"Yeah, but project-config is in the openstack org.  It\u0027s actually better to move this into system-config so it\u0027s not controlled by the openstack project any more.  Doing that *helps* us move towards our goal of moving opendev out of openstack.","commit_id":"4fd38ad5f0eec4bc1a43734f8ec168b4bdddc77e"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"058eab724a3d8fb5b3075b5e2b9ccb112f5fba59","unresolved":true,"context_lines":[{"line_number":18,"context_line":"  vars:"},{"line_number":19,"context_line":"    config: /var/lib/matrix-gerritbot/config/gerritbot"},{"line_number":20,"context_line":"    yaml_to_dhall: \"docker run -i --rm docker.io/dhallhaskell/dhall-yaml yaml-to-dhall\""},{"line_number":21,"context_line":"    schema: \"List (https://raw.githubusercontent.com/softwarefactory-project/gerritbot-matrix/master/src/Config.dhall).Type\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"- name: Install gerritbot ssh key"},{"line_number":24,"context_line":"  copy:"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"1d3dad1c_d70d5b69","line":21,"updated":"2021-07-13 01:07:30.000000000","message":"I bet if I scroll back at some point someone said use YAML as that\u0027s what we\u0027ve got everywhere.  \nSo it\u0027s probably one of these cases where you ask 3 people and get 4 opinions.\n\nIt just seems to me that if there\u0027s ever anything wrong, then I don\u0027t just have to understand the dhall that comes out the other end, but also the YAML YATP (yet another transformation process).  When we have more channels, almost certainly we\u0027ll have lists of channels in a config yaml that are read by ansible and then put into this intermediate .yaml config via jinja templating.  So in this case our yaml template turns into a yaml file that is a yaml template for conversion to a dhall configuration file ...\n\nI think I\u0027d rather just see a config.dhall.j2 that generates something sane from an Ansible variable (which is YAML anyway).\n\nIf we split the config into project-config then I think we could do an include_vars: to read the YAML config file into a variable, then use that variable to template out the .j2","commit_id":"4fd38ad5f0eec4bc1a43734f8ec168b4bdddc77e"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"e683383a86e2ef2e2a31391d62d6a975b3fcc7b0","unresolved":false,"context_lines":[{"line_number":18,"context_line":"  vars:"},{"line_number":19,"context_line":"    config: /var/lib/matrix-gerritbot/config/gerritbot"},{"line_number":20,"context_line":"    yaml_to_dhall: \"docker run -i --rm docker.io/dhallhaskell/dhall-yaml yaml-to-dhall\""},{"line_number":21,"context_line":"    schema: \"List (https://raw.githubusercontent.com/softwarefactory-project/gerritbot-matrix/master/src/Config.dhall).Type\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"- name: Install gerritbot ssh key"},{"line_number":24,"context_line":"  copy:"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"2f46b8b8_a759efcb","line":21,"updated":"2021-07-16 15:59:40.000000000","message":"I feel *very* strongly that what we should ask end users (and remember, the people who will be adding channels to this are the opendev end users, not us) to edit yaml files.\n\nI don\u0027t care how many times it gets transformed in the process.  What the end user has to copy/pase/edit to configure a channel is all that matters.","commit_id":"4fd38ad5f0eec4bc1a43734f8ec168b4bdddc77e"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"136680a2ca8bb814fb22ca563fd9398af0cfb2f9","unresolved":false,"context_lines":[{"line_number":18,"context_line":"  vars:"},{"line_number":19,"context_line":"    config: /var/lib/matrix-gerritbot/config/gerritbot"},{"line_number":20,"context_line":"    yaml_to_dhall: \"docker run -i --rm docker.io/dhallhaskell/dhall-yaml yaml-to-dhall\""},{"line_number":21,"context_line":"    schema: \"List (https://raw.githubusercontent.com/softwarefactory-project/gerritbot-matrix/master/src/Config.dhall).Type\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"- name: Install gerritbot ssh key"},{"line_number":24,"context_line":"  copy:"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"aa931f36_45401b75","line":21,"updated":"2021-07-16 16:57:11.000000000","message":"I think if you want to replace yaml with dhall across the board, it should be proposed in an infra-spec.\n\n(I don\u0027t want to mislead you -- I\u0027m not in favor of it, and I don\u0027t think it\u0027s worth your time to do.  But if you feel strongly about it and would be willing to do the work, that\u0027s the process to try to get consensus on it.)","commit_id":"4fd38ad5f0eec4bc1a43734f8ec168b4bdddc77e"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"22057a5dd636d9233a07d56eee2ccb92f322af6f","unresolved":true,"context_lines":[{"line_number":18,"context_line":"  vars:"},{"line_number":19,"context_line":"    config: /var/lib/matrix-gerritbot/config/gerritbot"},{"line_number":20,"context_line":"    yaml_to_dhall: \"docker run -i --rm docker.io/dhallhaskell/dhall-yaml yaml-to-dhall\""},{"line_number":21,"context_line":"    schema: \"List (https://raw.githubusercontent.com/softwarefactory-project/gerritbot-matrix/master/src/Config.dhall).Type\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"- name: Install gerritbot ssh key"},{"line_number":24,"context_line":"  copy:"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"24e48ed5_9e2a8f9d","line":21,"in_reply_to":"18c42258_1e058fe8","updated":"2021-07-16 16:06:58.000000000","message":"\u003e I think clark was not opposed to using dhall directly, and I\u0027d rather propose that in the next PS since that would safely solve the templating and importing.\n\nI was trying to express a few things in IRC and maybe that got mixed up.\n\n* Not changing the config language is important for our existing users (eg keep yaml config).\n* Repetition in the config language seems like a bug in the software not the serialization format. There are ways around the repetition if people don\u0027t like that. Have the application understand defaults directly rather than doing that in a configuration language. Or Encode defaults in a separate section of yaml (that users can ignore).\n* I don\u0027t know that repetition is a major issue for us because many of our channels use very specific configs for the events and branches they care about.\n* I did concede that if the yaml conversion wasn\u0027t possible for some reason we could probably live with dhall. But from what I\u0027ve heard yaml is possible it may just not be as nice to some people. I think that we should stick to yaml to keep a consistent config in that case.\n\nI do not understand why any templating is involved? the old config does not do any templating. Can we not keep the old yaml config and simply supply a static list of \"here are the things to care about\" to the process?","commit_id":"4fd38ad5f0eec4bc1a43734f8ec168b4bdddc77e"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"8e9c1bcf6594df5cfa8a5cadfcf81a65e16faf25","unresolved":true,"context_lines":[{"line_number":18,"context_line":"  vars:"},{"line_number":19,"context_line":"    config: /var/lib/matrix-gerritbot/config/gerritbot"},{"line_number":20,"context_line":"    yaml_to_dhall: \"docker run -i --rm docker.io/dhallhaskell/dhall-yaml yaml-to-dhall\""},{"line_number":21,"context_line":"    schema: \"List (https://raw.githubusercontent.com/softwarefactory-project/gerritbot-matrix/master/src/Config.dhall).Type\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"- name: Install gerritbot ssh key"},{"line_number":24,"context_line":"  copy:"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"bae10c95_c816b1bb","line":21,"in_reply_to":"1d3dad1c_d70d5b69","updated":"2021-07-13 12:08:00.000000000","message":"Note that the configuration is not modified by the transformation, the yaml-to-dhall just changes its representation, and the result is isomorphic (e.g. you can convert it back). So I think it is fine to use YAML here.\n\nI would prefer to keep this separation of concern where the validation and templating is managed before the runtime using dhall, but if you prefer to use jinja, then we should make the bot do the transformation transparently (similarly to using yaml.load in a dynamic language). Like that there is no need to combine jinja and dhall.","commit_id":"4fd38ad5f0eec4bc1a43734f8ec168b4bdddc77e"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"29f3c48afdc076605406142b16a50075c3d63310","unresolved":true,"context_lines":[{"line_number":18,"context_line":"  vars:"},{"line_number":19,"context_line":"    config: /var/lib/matrix-gerritbot/config/gerritbot"},{"line_number":20,"context_line":"    yaml_to_dhall: \"docker run -i --rm docker.io/dhallhaskell/dhall-yaml yaml-to-dhall\""},{"line_number":21,"context_line":"    schema: \"List (https://raw.githubusercontent.com/softwarefactory-project/gerritbot-matrix/master/src/Config.dhall).Type\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"- name: Install gerritbot ssh key"},{"line_number":24,"context_line":"  copy:"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"aacf0e77_04e29b9f","line":21,"in_reply_to":"24e48ed5_9e2a8f9d","updated":"2021-07-16 16:12:52.000000000","message":"I agree with this.\n\nKeeping yaml is about keeping our user experience consistent and simple. Asking opendev users to learn and use dhall just for this one config is a bridge too far.\n\nAdditionally, as clarkb said, the repetition in the current config is minimal, and actually makes things very clear. Most people care about the config for their specific channel. It doesn\u0027t matter what other channels are doing to them. Everything is self contained in a single location. We don\u0027t need templating or functional config - in fact, I\u0027d say those would be negative features *for our specific users and use case*.","commit_id":"4fd38ad5f0eec4bc1a43734f8ec168b4bdddc77e"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"d1221d3a0a5771b6eb64c9ccd70a61b06d5ae545","unresolved":true,"context_lines":[{"line_number":18,"context_line":"  vars:"},{"line_number":19,"context_line":"    config: /var/lib/matrix-gerritbot/config/gerritbot"},{"line_number":20,"context_line":"    yaml_to_dhall: \"docker run -i --rm docker.io/dhallhaskell/dhall-yaml yaml-to-dhall\""},{"line_number":21,"context_line":"    schema: \"List (https://raw.githubusercontent.com/softwarefactory-project/gerritbot-matrix/master/src/Config.dhall).Type\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"- name: Install gerritbot ssh key"},{"line_number":24,"context_line":"  copy:"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"1efacf99_988522e9","line":21,"in_reply_to":"24e48ed5_9e2a8f9d","updated":"2021-07-16 16:26:11.000000000","message":"The gerrit service is using git config, perhaps we could add gerritbot setting in there?\n\nI find it cleaner to manage repetition, import and templating at the configuration layer so that we can keep the runtime simple, instead of implementing a hierarchy or template system in each program.","commit_id":"4fd38ad5f0eec4bc1a43734f8ec168b4bdddc77e"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"d1221d3a0a5771b6eb64c9ccd70a61b06d5ae545","unresolved":false,"context_lines":[{"line_number":18,"context_line":"  vars:"},{"line_number":19,"context_line":"    config: /var/lib/matrix-gerritbot/config/gerritbot"},{"line_number":20,"context_line":"    yaml_to_dhall: \"docker run -i --rm docker.io/dhallhaskell/dhall-yaml yaml-to-dhall\""},{"line_number":21,"context_line":"    schema: \"List (https://raw.githubusercontent.com/softwarefactory-project/gerritbot-matrix/master/src/Config.dhall).Type\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"- name: Install gerritbot ssh key"},{"line_number":24,"context_line":"  copy:"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"fcbf1928_b3979ba6","line":21,"in_reply_to":"2f46b8b8_a759efcb","updated":"2021-07-16 16:26:11.000000000","message":"I would prefer we do not use yaml because of its many flaws and incompatible implementations. I feel strongly that we should build on a better system and consider YAML as legacy.","commit_id":"4fd38ad5f0eec4bc1a43734f8ec168b4bdddc77e"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"15308dc1d16d1b989c143ef8634e61e49fa3401f","unresolved":false,"context_lines":[{"line_number":18,"context_line":"  vars:"},{"line_number":19,"context_line":"    config: /var/lib/matrix-gerritbot/config/gerritbot"},{"line_number":20,"context_line":"    yaml_to_dhall: \"docker run -i --rm docker.io/dhallhaskell/dhall-yaml yaml-to-dhall\""},{"line_number":21,"context_line":"    schema: \"List (https://raw.githubusercontent.com/softwarefactory-project/gerritbot-matrix/master/src/Config.dhall).Type\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"- name: Install gerritbot ssh key"},{"line_number":24,"context_line":"  copy:"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"9cea3a4c_e27c8a1f","line":21,"in_reply_to":"aa931f36_45401b75","updated":"2021-07-16 17:23:30.000000000","message":"Thank you for the helpful suggestion, though I don\u0027t think Dhall (at least in its current form) is the right choice for an infra-spec. The lack of type inference makes it hard to use for dynamic configuration such as the one used by Ansible.\n\nI find YAML and Jinja inefficient and it might be worth investigating alternatives as long term solution, e.g. I would keep an eye on https://2021.splashcon.org/home/conflang-2021","commit_id":"4fd38ad5f0eec4bc1a43734f8ec168b4bdddc77e"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"aa4b357a23cbcb05c253c99a08b330f076377c75","unresolved":true,"context_lines":[{"line_number":18,"context_line":"  vars:"},{"line_number":19,"context_line":"    config: /var/lib/matrix-gerritbot/config/gerritbot"},{"line_number":20,"context_line":"    yaml_to_dhall: \"docker run -i --rm docker.io/dhallhaskell/dhall-yaml yaml-to-dhall\""},{"line_number":21,"context_line":"    schema: \"List (https://raw.githubusercontent.com/softwarefactory-project/gerritbot-matrix/master/src/Config.dhall).Type\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"- name: Install gerritbot ssh key"},{"line_number":24,"context_line":"  copy:"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"cc5b725b_67058ba0","line":21,"in_reply_to":"bae10c95_c816b1bb","updated":"2021-07-16 04:14:29.000000000","message":"I\u0027d like to just see templates/config.dhall.j2 and then populate that from a Ansible variable loaded like\n\n - name: Sync project-config\n   include_role:\n     name: sync-project-config\n\n - name: Load config\n    include_vars: /opt/project-config/matrix-gerritbot/config.yaml\n\n - name: Write config\n   template:\n     src: gerritbot.dhall.j2\n     dest: /var/lib/matrix-gerritbot/config/gerritbot.dhall\n\nconfig.yaml should be simple and self-documented enough that anyone who has no idea what\u0027s goig on but wants to modify their logging for their channel can update it a priori.","commit_id":"4fd38ad5f0eec4bc1a43734f8ec168b4bdddc77e"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"f02729287c3d11fda732d0510614549b60167863","unresolved":true,"context_lines":[{"line_number":18,"context_line":"  vars:"},{"line_number":19,"context_line":"    config: /var/lib/matrix-gerritbot/config/gerritbot"},{"line_number":20,"context_line":"    yaml_to_dhall: \"docker run -i --rm docker.io/dhallhaskell/dhall-yaml yaml-to-dhall\""},{"line_number":21,"context_line":"    schema: \"List (https://raw.githubusercontent.com/softwarefactory-project/gerritbot-matrix/master/src/Config.dhall).Type\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"- name: Install gerritbot ssh key"},{"line_number":24,"context_line":"  copy:"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"18c42258_1e058fe8","line":21,"in_reply_to":"cc5b725b_67058ba0","updated":"2021-07-16 13:19:56.000000000","message":"While this is possible, i don\u0027t we should mix yaml/jinja and dhall. Here is a what this would look like:\n\n  [{% for channel in gerritbot_config %}\n  , Config::{\n    , roomId \u003d \"{{ channel[\u0027room\u0027] }}\"\n    , projects \u003d [\n  {% for project in channel[\u0027projects\u0027] %}\n    , \"{{ project }}\"\n  {% endfor %}\n    ]\n\n  {% if \u0027branches\u0027 in channel %}\n    , branches \u003d [\n  {% for branch in channel[\u0027branches\u0027] %}\n    , \"{{ branch }}\"\n  {% endfor %}]{% endif %}\n\n  {% if \u0027events\u0027 in channel %}\n    , events \u003d [\n  {% for event in channel[\u0027events\u0027] %}\n    , Config.Event.{{ event }}\n  {% endfor %}]{% endif %}\n\n  }{% endfor }]\n\nI think clark was not opposed to using dhall directly, and I\u0027d rather propose that in the next PS since that would safely solve the templating and importing.","commit_id":"4fd38ad5f0eec4bc1a43734f8ec168b4bdddc77e"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"058eab724a3d8fb5b3075b5e2b9ccb112f5fba59","unresolved":true,"context_lines":[{"line_number":44,"context_line":"      MATRIX_TOKEN\u003d{{ gerritbot_matrix_token }}"},{"line_number":45,"context_line":"    dest: /etc/matrix-gerritbot-docker/.env"},{"line_number":46,"context_line":"    mode: 0400"},{"line_number":47,"context_line":"  no_log: true"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"- name: Put docker-compose file in place"},{"line_number":50,"context_line":"  template:"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"c999c77a_53c03294","line":47,"updated":"2021-07-13 01:07:30.000000000","message":"since we\u0027re already using templates below perhaps we should just put this in directly to the docker-compose.yaml.j2 file","commit_id":"4fd38ad5f0eec4bc1a43734f8ec168b4bdddc77e"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"f02729287c3d11fda732d0510614549b60167863","unresolved":false,"context_lines":[{"line_number":44,"context_line":"      MATRIX_TOKEN\u003d{{ gerritbot_matrix_token }}"},{"line_number":45,"context_line":"    dest: /etc/matrix-gerritbot-docker/.env"},{"line_number":46,"context_line":"    mode: 0400"},{"line_number":47,"context_line":"  no_log: true"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"- name: Put docker-compose file in place"},{"line_number":50,"context_line":"  template:"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"e46de958_20f9b863","line":47,"in_reply_to":"4a1272ef_1e73106d","updated":"2021-07-16 13:19:56.000000000","message":"Done","commit_id":"4fd38ad5f0eec4bc1a43734f8ec168b4bdddc77e"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"aa4b357a23cbcb05c253c99a08b330f076377c75","unresolved":true,"context_lines":[{"line_number":44,"context_line":"      MATRIX_TOKEN\u003d{{ gerritbot_matrix_token }}"},{"line_number":45,"context_line":"    dest: /etc/matrix-gerritbot-docker/.env"},{"line_number":46,"context_line":"    mode: 0400"},{"line_number":47,"context_line":"  no_log: true"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"- name: Put docker-compose file in place"},{"line_number":50,"context_line":"  template:"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"4a1272ef_1e73106d","line":47,"in_reply_to":"985c128c_b18195ba","updated":"2021-07-16 04:14:29.000000000","message":"there\u0027s no difference between the permissions of the compose file or the .env file here, so the only concern is general consistency and most other roles have a docker-compose.yaml.j2 that populates everything.","commit_id":"4fd38ad5f0eec4bc1a43734f8ec168b4bdddc77e"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"8e9c1bcf6594df5cfa8a5cadfcf81a65e16faf25","unresolved":true,"context_lines":[{"line_number":44,"context_line":"      MATRIX_TOKEN\u003d{{ gerritbot_matrix_token }}"},{"line_number":45,"context_line":"    dest: /etc/matrix-gerritbot-docker/.env"},{"line_number":46,"context_line":"    mode: 0400"},{"line_number":47,"context_line":"  no_log: true"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"- name: Put docker-compose file in place"},{"line_number":50,"context_line":"  template:"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"985c128c_b18195ba","line":47,"in_reply_to":"c999c77a_53c03294","updated":"2021-07-13 12:08:00.000000000","message":"Isn\u0027t it better to keep secret separately?","commit_id":"4fd38ad5f0eec4bc1a43734f8ec168b4bdddc77e"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"058eab724a3d8fb5b3075b5e2b9ccb112f5fba59","unresolved":true,"context_lines":[{"line_number":56,"context_line":"    cmd: docker-compose pull"},{"line_number":57,"context_line":"    chdir: /etc/matrix-gerritbot-docker/"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"- name: Run docker-compose up"},{"line_number":60,"context_line":"  shell:"},{"line_number":61,"context_line":"    cmd: \"docker-compose up -d\""},{"line_number":62,"context_line":"    chdir: /etc/matrix-gerritbot-docker/"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"13daaefa_31fdc403","line":59,"updated":"2021-07-13 01:07:30.000000000","message":"Does the bot recognise config file changes, or should this restart itself if the config file is updated?","commit_id":"4fd38ad5f0eec4bc1a43734f8ec168b4bdddc77e"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"8e9c1bcf6594df5cfa8a5cadfcf81a65e16faf25","unresolved":true,"context_lines":[{"line_number":56,"context_line":"    cmd: docker-compose pull"},{"line_number":57,"context_line":"    chdir: /etc/matrix-gerritbot-docker/"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"- name: Run docker-compose up"},{"line_number":60,"context_line":"  shell:"},{"line_number":61,"context_line":"    cmd: \"docker-compose up -d\""},{"line_number":62,"context_line":"    chdir: /etc/matrix-gerritbot-docker/"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"dfe9e609_b5f2eb2c","line":59,"in_reply_to":"13daaefa_31fdc403","updated":"2021-07-13 12:08:00.000000000","message":"The bot does not reload the configuration automatically, but that could be added if needed.","commit_id":"4fd38ad5f0eec4bc1a43734f8ec168b4bdddc77e"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"aa4b357a23cbcb05c253c99a08b330f076377c75","unresolved":true,"context_lines":[{"line_number":56,"context_line":"    cmd: docker-compose pull"},{"line_number":57,"context_line":"    chdir: /etc/matrix-gerritbot-docker/"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"- name: Run docker-compose up"},{"line_number":60,"context_line":"  shell:"},{"line_number":61,"context_line":"    cmd: \"docker-compose up -d\""},{"line_number":62,"context_line":"    chdir: /etc/matrix-gerritbot-docker/"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"e3260bcb_45bd1bef","line":59,"in_reply_to":"dfe9e609_b5f2eb2c","updated":"2021-07-16 04:14:29.000000000","message":"I think the stausbot role is a good example.  If this is the case, it should add --force-recreate when Ansible notes the config file has changed.","commit_id":"4fd38ad5f0eec4bc1a43734f8ec168b4bdddc77e"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"f02729287c3d11fda732d0510614549b60167863","unresolved":true,"context_lines":[{"line_number":56,"context_line":"    cmd: docker-compose pull"},{"line_number":57,"context_line":"    chdir: /etc/matrix-gerritbot-docker/"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"- name: Run docker-compose up"},{"line_number":60,"context_line":"  shell:"},{"line_number":61,"context_line":"    cmd: \"docker-compose up -d\""},{"line_number":62,"context_line":"    chdir: /etc/matrix-gerritbot-docker/"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"d145480b_b970d08e","line":59,"in_reply_to":"e3260bcb_45bd1bef","updated":"2021-07-16 13:19:56.000000000","message":"Ok, I\u0027ll add automatic reload in the bot directly.","commit_id":"4fd38ad5f0eec4bc1a43734f8ec168b4bdddc77e"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"614a39e63832e95e49618203ca1e6292fa3d1797","unresolved":false,"context_lines":[{"line_number":18,"context_line":"  vars:"},{"line_number":19,"context_line":"    config: /var/lib/matrix-gerritbot/config/gerritbot"},{"line_number":20,"context_line":"    yaml_to_dhall: \"docker run -i --rm docker.io/dhallhaskell/dhall-yaml yaml-to-dhall\""},{"line_number":21,"context_line":"    schema: \"List (https://raw.githubusercontent.com/softwarefactory-project/gerritbot-matrix/master/src/Config.dhall).Type\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"- name: Install gerritbot ssh key"},{"line_number":24,"context_line":"  copy:"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"01cadb37_e09857da","line":21,"updated":"2021-07-16 17:01:32.000000000","message":"Is it possible to do this in a way that doesn\u0027t depend on a github url at runtime?  We\u0027ve had some bad experiences with that.  Can we extract it from the matrix-gerritbot image?","commit_id":"ae2455fdde3a587df8ace0bc07b353463f5bc992"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"15308dc1d16d1b989c143ef8634e61e49fa3401f","unresolved":false,"context_lines":[{"line_number":18,"context_line":"  vars:"},{"line_number":19,"context_line":"    config: /var/lib/matrix-gerritbot/config/gerritbot"},{"line_number":20,"context_line":"    yaml_to_dhall: \"docker run -i --rm docker.io/dhallhaskell/dhall-yaml yaml-to-dhall\""},{"line_number":21,"context_line":"    schema: \"List (https://raw.githubusercontent.com/softwarefactory-project/gerritbot-matrix/master/src/Config.dhall).Type\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"- name: Install gerritbot ssh key"},{"line_number":24,"context_line":"  copy:"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"45646117_2107765b","line":21,"in_reply_to":"01cadb37_e09857da","updated":"2021-07-16 17:23:30.000000000","message":"That could be possible, let me add that to the image.","commit_id":"ae2455fdde3a587df8ace0bc07b353463f5bc992"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"734c963683188ab084f04ff5e13952afdd4a841f","unresolved":true,"context_lines":[{"line_number":22,"context_line":"  vars:"},{"line_number":23,"context_line":"    config: /var/lib/matrix-gerritbot/config/gerritbot"},{"line_number":24,"context_line":"    yaml_to_dhall: \"docker run -i --rm docker.io/dhallhaskell/dhall-yaml yaml-to-dhall\""},{"line_number":25,"context_line":"    schema: \"List {{ _gerritbot_schema.stdout }}\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"- name: Install gerritbot ssh key"},{"line_number":28,"context_line":"  copy:"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"c4e147d9_6cb857bb","line":25,"updated":"2021-07-16 23:33:49.000000000","message":"I honestly didn\u0027t have a problem with the gerritbot.dhall.j2 sample posted before.  It\u0027s what we do everywhere else where we translate things kept in variables into whatever arbitrary format a program\u0027s configuration wants.  I mean ... that\u0027s kind of the pont of Ansible.  It\u0027s not beautiful but seemed no worse than any of the other templates we use.\n\nOther thoughts:\n\nIt doesn\u0027t seem idempotent (it always reports the config file as changed), whereas the template would be.\n\nIf this is validating the config, it would be better running as a linter check when the actual config file updates (which, as noted, I don\u0027t think should be in the role) instead of making people who don\u0027t understand system-config debug why their config file change fails in a nested-ansible run deep in a deployment playbook.","commit_id":"4ebc1a502a1f977da1abe9710dd369508faeee5a"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"902c92a023dee60b8a272692c50582a62f6f99e9","unresolved":true,"context_lines":[{"line_number":22,"context_line":"  vars:"},{"line_number":23,"context_line":"    config: /var/lib/matrix-gerritbot/config/gerritbot"},{"line_number":24,"context_line":"    yaml_to_dhall: \"docker run -i --rm docker.io/dhallhaskell/dhall-yaml yaml-to-dhall\""},{"line_number":25,"context_line":"    schema: \"List {{ _gerritbot_schema.stdout }}\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"- name: Install gerritbot ssh key"},{"line_number":28,"context_line":"  copy:"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"7b018c9b_e1442cc1","line":25,"in_reply_to":"c4e147d9_6cb857bb","updated":"2021-07-17 00:01:54.000000000","message":"Using jinja sounds error prone to me and I don\u0027t think we need to template anything here.\n\nWhy would the copy be idempotent, is this an ansible bug?\n\nIf we move the file to a project-config, then yes we should use a job to validate it there too.","commit_id":"4ebc1a502a1f977da1abe9710dd369508faeee5a"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"1cf8b6c854bf86e7b2f8c530934057157db67582","unresolved":true,"context_lines":[{"line_number":16,"context_line":"  command: docker run --rm \"{{ gerritbot_matrix_image }}\" print-config-schema"},{"line_number":17,"context_line":"  register: _gerritbot_schema"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"- name: Validate the configuration"},{"line_number":20,"context_line":"  shell: |"},{"line_number":21,"context_line":"    cat {{ config }}.yaml | {{ yaml_to_dhall }} \"{{ schema }}\" \u003e {{ config }}.dhall"},{"line_number":22,"context_line":"  vars:"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"638613c1_b87db0fe","line":19,"range":{"start_line":19,"start_character":8,"end_line":19,"end_character":16},"updated":"2021-07-23 21:19:33.000000000","message":"nit: This does more than validate the configuration. It writes the config to dhall for consumption by the process.","commit_id":"5db67488baeb018bd15c1cb4fc57ed24bc954eab"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"1f91599a10bbea52347c790c2ab10f6a7b5e9818","unresolved":false,"context_lines":[{"line_number":16,"context_line":"  command: docker run --rm \"{{ gerritbot_matrix_image }}\" print-config-schema"},{"line_number":17,"context_line":"  register: _gerritbot_schema"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"- name: Validate the configuration"},{"line_number":20,"context_line":"  shell: |"},{"line_number":21,"context_line":"    cat {{ config }}.yaml | {{ yaml_to_dhall }} \"{{ schema }}\" \u003e {{ config }}.dhall"},{"line_number":22,"context_line":"  vars:"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"46ad0128_8d341730","line":19,"range":{"start_line":19,"start_character":8,"end_line":19,"end_character":16},"in_reply_to":"638613c1_b87db0fe","updated":"2021-07-24 01:05:40.000000000","message":"Done","commit_id":"5db67488baeb018bd15c1cb4fc57ed24bc954eab"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"1cf8b6c854bf86e7b2f8c530934057157db67582","unresolved":true,"context_lines":[{"line_number":21,"context_line":"    cat {{ config }}.yaml | {{ yaml_to_dhall }} \"{{ schema }}\" \u003e {{ config }}.dhall"},{"line_number":22,"context_line":"  vars:"},{"line_number":23,"context_line":"    config: /var/lib/matrix-gerritbot/config/gerritbot"},{"line_number":24,"context_line":"    yaml_to_dhall: \"docker run -i --rm docker.io/dhallhaskell/dhall-yaml yaml-to-dhall\""},{"line_number":25,"context_line":"    schema: \"List {{ _gerritbot_schema.stdout }}\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"- name: Install gerritbot ssh key"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"bcacdea3_f8b94794","line":24,"range":{"start_line":24,"start_character":39,"end_line":24,"end_character":72},"updated":"2021-07-23 21:19:33.000000000","message":"Any concern that this image will get old and stale? I think that docker won\u0027t update it without an explicit pull?","commit_id":"5db67488baeb018bd15c1cb4fc57ed24bc954eab"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"1f91599a10bbea52347c790c2ab10f6a7b5e9818","unresolved":true,"context_lines":[{"line_number":21,"context_line":"    cat {{ config }}.yaml | {{ yaml_to_dhall }} \"{{ schema }}\" \u003e {{ config }}.dhall"},{"line_number":22,"context_line":"  vars:"},{"line_number":23,"context_line":"    config: /var/lib/matrix-gerritbot/config/gerritbot"},{"line_number":24,"context_line":"    yaml_to_dhall: \"docker run -i --rm docker.io/dhallhaskell/dhall-yaml yaml-to-dhall\""},{"line_number":25,"context_line":"    schema: \"List {{ _gerritbot_schema.stdout }}\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"- name: Install gerritbot ssh key"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"0c31088b_c7ca8bcb","line":24,"range":{"start_line":24,"start_character":39,"end_line":24,"end_character":72},"in_reply_to":"bcacdea3_f8b94794","updated":"2021-07-24 01:05:40.000000000","message":"It should not be a concern, I don\u0027t except the schema to require a special version.","commit_id":"5db67488baeb018bd15c1cb4fc57ed24bc954eab"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"98739f09d93f6551adf30cb1224259e400b44283","unresolved":true,"context_lines":[{"line_number":15,"context_line":"- name: Ensure access token"},{"line_number":16,"context_line":"  when: not _access_token.stat.exists"},{"line_number":17,"context_line":"  block:"},{"line_number":18,"context_line":"    - name: Create access token"},{"line_number":19,"context_line":"      no_log: true"},{"line_number":20,"context_line":"      uri:"},{"line_number":21,"context_line":"        url: \"{{ gerritbot_matrix_homeserver }}/_matrix/client/r0/login\""}],"source_content_type":"text/x-yaml","patch_set":13,"id":"83d281d8_31741df8","line":18,"updated":"2021-07-26 22:29:11.000000000","message":"This is the task that failed. I think you\u0027ll need to stub this out in testing as we don\u0027t want to have prod credentials in our test jobs.","commit_id":"4b63bac80d43040fde7181e3602e1052e73935b0"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"c757aebea2a1d5ee713601f74d287bf3899ebaf8","unresolved":true,"context_lines":[{"line_number":15,"context_line":"- name: Ensure access token"},{"line_number":16,"context_line":"  when: not _access_token.stat.exists"},{"line_number":17,"context_line":"  block:"},{"line_number":18,"context_line":"    - name: Create access token"},{"line_number":19,"context_line":"      no_log: true"},{"line_number":20,"context_line":"      uri:"},{"line_number":21,"context_line":"        url: \"{{ gerritbot_matrix_homeserver }}/_matrix/client/r0/login\""}],"source_content_type":"text/x-yaml","patch_set":13,"id":"f542abb2_c15c1ad2","line":18,"in_reply_to":"83d281d8_31741df8","updated":"2021-07-27 02:21:15.000000000","message":"Next PS checks for a non empty password. Is there a better way to detect testing?","commit_id":"4b63bac80d43040fde7181e3602e1052e73935b0"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"e46614bcb3c25645ff93e2e76a19295ecb76538b","unresolved":true,"context_lines":[{"line_number":15,"context_line":"- name: Ensure access token"},{"line_number":16,"context_line":"  when: not _access_token.stat.exists"},{"line_number":17,"context_line":"  block:"},{"line_number":18,"context_line":"    - name: Create access token"},{"line_number":19,"context_line":"      no_log: true"},{"line_number":20,"context_line":"      uri:"},{"line_number":21,"context_line":"        url: \"{{ gerritbot_matrix_homeserver }}/_matrix/client/r0/login\""}],"source_content_type":"text/x-yaml","patch_set":13,"id":"589f2b80_44d9baba","line":18,"in_reply_to":"f542abb2_c15c1ad2","updated":"2021-07-28 23:50:03.000000000","message":"I think you can check for the presence of a zuul vars dict which isn\u0027t present in production.","commit_id":"4b63bac80d43040fde7181e3602e1052e73935b0"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"52a626cf156508cb6ff4e64cbca2a7a5a411c182","unresolved":true,"context_lines":[{"line_number":52,"context_line":"  vars:"},{"line_number":53,"context_line":"    config: /var/lib/matrix-gerritbot/config/gerritbot"},{"line_number":54,"context_line":"    yaml_to_dhall: \"docker run -i --rm docker.io/dhallhaskell/dhall-yaml yaml-to-dhall\""},{"line_number":55,"context_line":"    schema: \"List {{ _gerritbot_schema.stdout }}\""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"- name: Install gerritbot ssh key"},{"line_number":58,"context_line":"  copy:"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"57c536f0_910eead0","line":55,"updated":"2021-07-27 20:16:25.000000000","message":"it still feels wrong that we prefer bringing in entire containers over an idempotent write of a .dhall.j2 file.  afaict this will re-write the config-file every time.  i believe the bot is watching for config updates (it doesn\u0027t have a restart mechanism here) but if it\u0027s doing something like a inotify i believe it will look like it\u0027s always modified whenever the prod job runs, even if this file isn\u0027t updated.  if we want to lint the file, that feels like it\u0027s better done as a separate tox linter job, not several layers deep in deployment.","commit_id":"47ace2efb8b6235abe2f1135c783d2b557261aa2"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"2f7edebe0f43652f1b34ea9004e035f6131919ba","unresolved":true,"context_lines":[{"line_number":52,"context_line":"  vars:"},{"line_number":53,"context_line":"    config: /var/lib/matrix-gerritbot/config/gerritbot"},{"line_number":54,"context_line":"    yaml_to_dhall: \"docker run -i --rm docker.io/dhallhaskell/dhall-yaml yaml-to-dhall\""},{"line_number":55,"context_line":"    schema: \"List {{ _gerritbot_schema.stdout }}\""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"- name: Install gerritbot ssh key"},{"line_number":58,"context_line":"  copy:"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"e6e95141_ae07b908","line":55,"in_reply_to":"57c536f0_910eead0","updated":"2021-07-28 02:17:35.000000000","message":"Note that the entire container weight 5.8MB. In the next PS I added a condition to skip the task when the source is older. If we are going to use a template, we should keep the validation here anyway.","commit_id":"47ace2efb8b6235abe2f1135c783d2b557261aa2"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"5c770f6a67bdfc3a4f8356f7da3afbb67dd93b98","unresolved":true,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"- name: Validate and create the configuration"},{"line_number":50,"context_line":"  shell: |"},{"line_number":51,"context_line":"    if test {{ config }}.yaml -nt {{ config }}.dhall; then"},{"line_number":52,"context_line":"      cat {{ config }}.yaml | {{ yaml_to_dhall }} \"{{ schema }}\" --output {{ config }}.dhall"},{"line_number":53,"context_line":"    fi"},{"line_number":54,"context_line":"  vars:"}],"source_content_type":"text/x-yaml","patch_set":17,"id":"dd5a212a_fdc1cfbb","line":51,"range":{"start_line":51,"start_character":3,"end_line":51,"end_character":58},"updated":"2021-07-28 04:10:59.000000000","message":"I think it would be better to register the status of the copy above add a when: var.changed here","commit_id":"8b4e530e28cddcf5f91a1530f8e3f329f18b54fc"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"b6952e668288825f6eeacb6a642d9508450878b5","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"- name: Validate and create the configuration"},{"line_number":50,"context_line":"  shell: |"},{"line_number":51,"context_line":"    if test {{ config }}.yaml -nt {{ config }}.dhall; then"},{"line_number":52,"context_line":"      cat {{ config }}.yaml | {{ yaml_to_dhall }} \"{{ schema }}\" --output {{ config }}.dhall"},{"line_number":53,"context_line":"    fi"},{"line_number":54,"context_line":"  vars:"}],"source_content_type":"text/x-yaml","patch_set":17,"id":"eb5fe089_c2b7af4f","line":51,"range":{"start_line":51,"start_character":3,"end_line":51,"end_character":58},"in_reply_to":"dd5a212a_fdc1cfbb","updated":"2021-07-28 11:29:25.000000000","message":"Done","commit_id":"8b4e530e28cddcf5f91a1530f8e3f329f18b54fc"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"ba7eea444bd364c05759bfec5636d1964d54f1d4","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    src: docker-compose.yaml.j2"},{"line_number":83,"context_line":"    dest: /etc/matrix-gerritbot-docker/docker-compose.yaml"},{"line_number":84,"context_line":"  vars:"},{"line_number":85,"context_line":"    gerritbot_matrix_access_token: \"{{ lookup(\u0027file\u0027, \u0027/var/lib/matrix-gerritbot/.token\u0027, errors\u003d\u0027ignore\u0027) | default(\u0027\u0027) }}\""},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"- name: Run docker-compose up"},{"line_number":88,"context_line":"  shell:"}],"source_content_type":"text/x-yaml","patch_set":21,"id":"61a5bf95_f5e27d37","line":85,"updated":"2021-07-30 00:06:50.000000000","message":"Ansible loads the token here.","commit_id":"628120551e557b498b5c49e30307f1d210f59fde"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"ba7eea444bd364c05759bfec5636d1964d54f1d4","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    src: docker-compose.yaml.j2"},{"line_number":83,"context_line":"    dest: /etc/matrix-gerritbot-docker/docker-compose.yaml"},{"line_number":84,"context_line":"  vars:"},{"line_number":85,"context_line":"    gerritbot_matrix_access_token: \"{{ lookup(\u0027file\u0027, \u0027/var/lib/matrix-gerritbot/.token\u0027, errors\u003d\u0027ignore\u0027) | default(\u0027\u0027) }}\""},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"- name: Run docker-compose up"},{"line_number":88,"context_line":"  shell:"}],"source_content_type":"text/x-yaml","patch_set":21,"id":"ddfca96b_81446103","line":85,"updated":"2021-07-30 00:06:50.000000000","message":"Isn\u0027t this going to read the token from the ansible controller (ie, bridge?)","commit_id":"628120551e557b498b5c49e30307f1d210f59fde"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"596a16657f6b56c22229ca8d01f85c587d09eef1","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    src: docker-compose.yaml.j2"},{"line_number":83,"context_line":"    dest: /etc/matrix-gerritbot-docker/docker-compose.yaml"},{"line_number":84,"context_line":"  vars:"},{"line_number":85,"context_line":"    gerritbot_matrix_access_token: \"{{ lookup(\u0027file\u0027, \u0027/var/lib/matrix-gerritbot/.token\u0027, errors\u003d\u0027ignore\u0027) | default(\u0027\u0027) }}\""},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"- name: Run docker-compose up"},{"line_number":88,"context_line":"  shell:"}],"source_content_type":"text/x-yaml","patch_set":21,"id":"e2d557df_d12cfec4","line":85,"in_reply_to":"ddfca96b_81446103","updated":"2021-07-30 01:21:05.000000000","message":"Oops indeed, that is not going to work.","commit_id":"628120551e557b498b5c49e30307f1d210f59fde"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"4c780164da76159d7d968ae17e06a035df98cc49","unresolved":true,"context_lines":[{"line_number":52,"context_line":"    src: docker-compose.yaml.j2"},{"line_number":53,"context_line":"    dest: /etc/matrix-gerritbot-docker/docker-compose.yaml"},{"line_number":54,"context_line":"  vars:"},{"line_number":55,"context_line":"    gerritbot_matrix_access_token: \"{{ lookup(\u0027file\u0027, \u0027/var/lib/matrix-gerritbot/.token\u0027, errors\u003d\u0027ignore\u0027) | default(\u0027\u0027) }}\""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"- name: Run docker-compose up"},{"line_number":58,"context_line":"  shell:"}],"source_content_type":"text/x-yaml","patch_set":22,"id":"78d70ad3_3f6af206","line":55,"updated":"2021-07-30 14:14:10.000000000","message":"Isn\u0027t this still going to not work? We have the variable set in secrets with the new instructions, but this lookup is leftover from the previous approach, yes?","commit_id":"a03e42187c24a904892e3bffab7f35e49d2ad090"}],"playbooks/roles/matrix-gerritbot/templates/docker-compose.yaml.j2":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"eb7fdda3d89f486edb1faad1c4f10dd46803caa5","unresolved":true,"context_lines":[{"line_number":12,"context_line":"      options:"},{"line_number":13,"context_line":"        tag: \"docker-matrix-gerritbot\""},{"line_number":14,"context_line":"    environment:"},{"line_number":15,"context_line":"      MATRIX_TOKEN: {{ gerritbot_matrix_access_token }}"},{"line_number":16,"context_line":"    volumes:"},{"line_number":17,"context_line":"      - /var/lib/matrix-gerritbot/config:/config"},{"line_number":18,"context_line":"      - /var/lib/matrix-gerritbot/ssh:/root/.ssh"}],"source_content_type":"text/x-jinja2","patch_set":21,"id":"56f85761_c6a684d5","line":15,"updated":"2021-07-30 00:01:14.000000000","message":"Is this still required when using the auto token generation?","commit_id":"628120551e557b498b5c49e30307f1d210f59fde"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"ba7eea444bd364c05759bfec5636d1964d54f1d4","unresolved":false,"context_lines":[{"line_number":12,"context_line":"      options:"},{"line_number":13,"context_line":"        tag: \"docker-matrix-gerritbot\""},{"line_number":14,"context_line":"    environment:"},{"line_number":15,"context_line":"      MATRIX_TOKEN: {{ gerritbot_matrix_access_token }}"},{"line_number":16,"context_line":"    volumes:"},{"line_number":17,"context_line":"      - /var/lib/matrix-gerritbot/config:/config"},{"line_number":18,"context_line":"      - /var/lib/matrix-gerritbot/ssh:/root/.ssh"}],"source_content_type":"text/x-jinja2","patch_set":21,"id":"5c9bb7a2_53f19b9c","line":15,"updated":"2021-07-30 00:06:50.000000000","message":"Yeah this is a template; ansible writes it out based on the token value it reads in from the filesystem.","commit_id":"628120551e557b498b5c49e30307f1d210f59fde"}],"zuul.d/system-config-run.yaml":[{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"4c197a2ef2aed532bd8321170022f9a3f9ffb1ba","unresolved":true,"context_lines":[{"line_number":165,"context_line":"      - docker/accessbot/"},{"line_number":166,"context_line":"      - docker/ircbot"},{"line_number":167,"context_line":"      - docker/matrix-eavesdrop"},{"line_number":168,"context_line":"      - docker/matrix-gerritbot"},{"line_number":169,"context_line":"      - testinfra/test_eavesdrop.py"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"- job:"}],"source_content_type":"text/x-yaml","patch_set":23,"id":"01c7b339_32fee2a2","line":168,"updated":"2021-08-01 22:24:26.000000000","message":"I think this should be `playbooks/roles/matrix-gerritbot`","commit_id":"c4b0a8950de667817e8dde880471deab3a3ac8c3"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"a0c7f94fb2aa639401606b919cff565f6f9c17fa","unresolved":false,"context_lines":[{"line_number":165,"context_line":"      - docker/accessbot/"},{"line_number":166,"context_line":"      - docker/ircbot"},{"line_number":167,"context_line":"      - docker/matrix-eavesdrop"},{"line_number":168,"context_line":"      - docker/matrix-gerritbot"},{"line_number":169,"context_line":"      - testinfra/test_eavesdrop.py"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"- job:"}],"source_content_type":"text/x-yaml","patch_set":23,"id":"88e176e4_4fb05ed4","line":168,"in_reply_to":"01c7b339_32fee2a2","updated":"2021-08-02 12:21:09.000000000","message":"Fixed in https://review.opendev.org/c/opendev/system-config/+/803125","commit_id":"c4b0a8950de667817e8dde880471deab3a3ac8c3"}]}
