)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":16137,"name":"Tobias Urdin","email":"tobias.urdin@binero.com","username":"tobasco"},"change_message_id":"5c6328ac9eff45738cf4189f0a259ddbee7c192d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"17d63279_14f1e26c","updated":"2025-06-17 14:53:35.000000000","message":"Trying to wrap my head around this change, think I understand but could you please add some testing.","commit_id":"725d0e99329ce4a0cf56d17ec150761f362fa7fe"},{"author":{"_account_id":7888,"name":"Benedikt Trefzer","email":"benedikt.trefzer@cirrax.com","username":"trefzer"},"change_message_id":"4a3a682a9f47055d12b04607ace1e6bb2d02d49c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"34c63b0d_580fbc6f","in_reply_to":"17d63279_14f1e26c","updated":"2025-06-17 20:38:48.000000000","message":"In short: It\u0027s not possible to make a spec test to ensure a manifest is idempotent !\n\nI added some tests to ensure the right policy content and ensure that file line\nis not used if purge_config is true.\n\nsome more info about the fix: \nSetting $purge_config to true and setting $policies!\u003d{} is working, but not idempotent and worse triggers an api reload on every run, the reason is, that (before this fix) it runs openstacklib::policy::base which purges the config (since $purge_config is true) which ensure_resource openstacklib::policy::default which sets content to \u0027\u0027 and then it runs the file_line statements to enter the the lines again. Since puppet thinks now the policy changed, it triggers the reloads.\n\nOther Remark: I\u0027m pretty shure that all [ensure|create]_resources are not needed and could be replaced by a simple each loop in openstacklib::policy which also makes openstacklib::policy::* obsolete. If this is done we should also get rid of file_line which is \u0027not best practice\u0027 !","commit_id":"725d0e99329ce4a0cf56d17ec150761f362fa7fe"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"6ce7d8c2659b74c7235134c87213ba9a43acdb57","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"ea2ddb4c_5112d8ea","in_reply_to":"34c63b0d_580fbc6f","updated":"2026-10-06 02:45:00.000000000","message":"We have acceptance tests","commit_id":"725d0e99329ce4a0cf56d17ec150761f362fa7fe"},{"author":{"_account_id":7888,"name":"Benedikt Trefzer","email":"benedikt.trefzer@cirrax.com","username":"trefzer"},"change_message_id":"d8f3be03f33628d705b441c71131fbf352f88577","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"f752505d_40cd2577","updated":"2025-06-18 06:46:29.000000000","message":"recheck","commit_id":"978dfe014cd061a243e825f24c9b4d3c1f4428b4"},{"author":{"_account_id":7888,"name":"Benedikt Trefzer","email":"benedikt.trefzer@cirrax.com","username":"trefzer"},"change_message_id":"dd260ecc0eb8b6ee863d2b488bd577d49a1919c4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"f763194d_b7f097e4","updated":"2026-10-06 07:24:12.000000000","message":"I will do a reabase.","commit_id":"d2255e80888de720e4710a2a7c96f78aea8b87b6"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"6ce7d8c2659b74c7235134c87213ba9a43acdb57","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"148d64ad_221de16b","updated":"2026-10-06 02:45:00.000000000","message":"Sorry this dropped from my radar for long time. Please find the comments inline.\n\nWe\u0027ve been struggling to make this work in a right way after migration to yaml, mainly due to our own template hacks to generate yaml (we used to use augeas but it doesn\u0027t handle yaml correctly...).\nI wonder this implies that we should consider implementing a provider instead.","commit_id":"d2255e80888de720e4710a2a7c96f78aea8b87b6"},{"author":{"_account_id":7888,"name":"Benedikt Trefzer","email":"benedikt.trefzer@cirrax.com","username":"trefzer"},"change_message_id":"7f1fcfee705b23cd836eb40aac5786f17f153d67","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":10,"id":"8fd64ad7_16dd36d4","updated":"2026-10-05 19:24:52.000000000","message":"any chance this gets merged ?","commit_id":"d2255e80888de720e4710a2a7c96f78aea8b87b6"},{"author":{"_account_id":7888,"name":"Benedikt Trefzer","email":"benedikt.trefzer@cirrax.com","username":"trefzer"},"change_message_id":"80bfd1d7300b53adf9b6500c408f195a9698c7be","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"48ef3bb0_b5356fc2","in_reply_to":"8fd64ad7_16dd36d4","updated":"2026-10-05 19:25:44.000000000","message":"Done","commit_id":"d2255e80888de720e4710a2a7c96f78aea8b87b6"}],"manifests/policy.pp":[{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"6ce7d8c2659b74c7235134c87213ba9a43acdb57","unresolved":true,"context_lines":[{"line_number":61,"context_line":"  Boolean $purge_config              \u003d false,"},{"line_number":62,"context_line":") {"},{"line_number":63,"context_line":"  if empty($policies) or $purge_config {"},{"line_number":64,"context_line":"    create_resources(\u0027openstacklib::policy::default\u0027, {"},{"line_number":65,"context_line":"      $policy_path \u003d\u003e {"},{"line_number":66,"context_line":"        file_mode    \u003d\u003e $file_mode,"},{"line_number":67,"context_line":"        file_user    \u003d\u003e $file_user,"},{"line_number":68,"context_line":"        file_group   \u003d\u003e $file_group,"},{"line_number":69,"context_line":"        file_format  \u003d\u003e $file_format,"},{"line_number":70,"context_line":"        purge_config \u003d\u003e $purge_config,"},{"line_number":71,"context_line":"        policies     \u003d\u003e $policies,"},{"line_number":72,"context_line":"      },"},{"line_number":73,"context_line":"    })"},{"line_number":74,"context_line":"  } else {"},{"line_number":75,"context_line":"    $policy_defaults \u003d {"},{"line_number":76,"context_line":"      file_path    \u003d\u003e $policy_path,"}],"source_content_type":"text/x-puppet","patch_set":10,"id":"7407ab70_44448c84","line":73,"range":{"start_line":64,"start_character":0,"end_line":73,"end_character":6},"updated":"2026-10-06 02:45:00.000000000","message":"I wonder if the logic becomes much simpler if we should create ::default resource anyway.","commit_id":"d2255e80888de720e4710a2a7c96f78aea8b87b6"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"db474a99dc55995c4d34a62b33d82306ff665a04","unresolved":false,"context_lines":[{"line_number":61,"context_line":"  Boolean $purge_config              \u003d false,"},{"line_number":62,"context_line":") {"},{"line_number":63,"context_line":"  if empty($policies) or $purge_config {"},{"line_number":64,"context_line":"    create_resources(\u0027openstacklib::policy::default\u0027, {"},{"line_number":65,"context_line":"      $policy_path \u003d\u003e {"},{"line_number":66,"context_line":"        file_mode    \u003d\u003e $file_mode,"},{"line_number":67,"context_line":"        file_user    \u003d\u003e $file_user,"},{"line_number":68,"context_line":"        file_group   \u003d\u003e $file_group,"},{"line_number":69,"context_line":"        file_format  \u003d\u003e $file_format,"},{"line_number":70,"context_line":"        purge_config \u003d\u003e $purge_config,"},{"line_number":71,"context_line":"        policies     \u003d\u003e $policies,"},{"line_number":72,"context_line":"      },"},{"line_number":73,"context_line":"    })"},{"line_number":74,"context_line":"  } else {"},{"line_number":75,"context_line":"    $policy_defaults \u003d {"},{"line_number":76,"context_line":"      file_path    \u003d\u003e $policy_path,"}],"source_content_type":"text/x-puppet","patch_set":10,"id":"f574ecd5_8a7ab970","line":73,"range":{"start_line":64,"start_character":0,"end_line":73,"end_character":6},"in_reply_to":"6f9a9427_eb4e8db2","updated":"2026-10-19 16:21:40.000000000","message":"OK we can leave that refactoring for follow-up","commit_id":"d2255e80888de720e4710a2a7c96f78aea8b87b6"},{"author":{"_account_id":7888,"name":"Benedikt Trefzer","email":"benedikt.trefzer@cirrax.com","username":"trefzer"},"change_message_id":"dd260ecc0eb8b6ee863d2b488bd577d49a1919c4","unresolved":true,"context_lines":[{"line_number":61,"context_line":"  Boolean $purge_config              \u003d false,"},{"line_number":62,"context_line":") {"},{"line_number":63,"context_line":"  if empty($policies) or $purge_config {"},{"line_number":64,"context_line":"    create_resources(\u0027openstacklib::policy::default\u0027, {"},{"line_number":65,"context_line":"      $policy_path \u003d\u003e {"},{"line_number":66,"context_line":"        file_mode    \u003d\u003e $file_mode,"},{"line_number":67,"context_line":"        file_user    \u003d\u003e $file_user,"},{"line_number":68,"context_line":"        file_group   \u003d\u003e $file_group,"},{"line_number":69,"context_line":"        file_format  \u003d\u003e $file_format,"},{"line_number":70,"context_line":"        purge_config \u003d\u003e $purge_config,"},{"line_number":71,"context_line":"        policies     \u003d\u003e $policies,"},{"line_number":72,"context_line":"      },"},{"line_number":73,"context_line":"    })"},{"line_number":74,"context_line":"  } else {"},{"line_number":75,"context_line":"    $policy_defaults \u003d {"},{"line_number":76,"context_line":"      file_path    \u003d\u003e $policy_path,"}],"source_content_type":"text/x-puppet","patch_set":10,"id":"6f9a9427_eb4e8db2","line":73,"range":{"start_line":64,"start_character":0,"end_line":73,"end_character":6},"in_reply_to":"7407ab70_44448c84","updated":"2026-10-06 07:24:12.000000000","message":"My intention was not to simplify but to fix a bug (ensure idempotency when using purge parameter). This said, I wanted to change as less as possible. I\u0027m pretty shure that any approach to simplify this code, will end up in a braking change for some edge cases and is outside the focus of this bug fix.","commit_id":"d2255e80888de720e4710a2a7c96f78aea8b87b6"}],"manifests/policy/default.pp":[{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"6ce7d8c2659b74c7235134c87213ba9a43acdb57","unresolved":true,"context_lines":[{"line_number":45,"context_line":"    mode    \u003d\u003e $file_mode,"},{"line_number":46,"context_line":"    owner   \u003d\u003e $file_user,"},{"line_number":47,"context_line":"    group   \u003d\u003e $file_group,"},{"line_number":48,"context_line":"    replace \u003d\u003e $purge_config,"},{"line_number":49,"context_line":"    content \u003d\u003e inline_epp(\"\u003c% \\$policies.each | String \\$k, Hash \\$v | { %\u003e\u0027\u003c%\u003d pick(\\$v[\u0027key\u0027], \\$k) %\u003e\u0027: \u0027\u003c%\u003d \\$v[\u0027value\u0027] %\u003e\u0027\\n\u003c% } -%\u003e\"),"},{"line_number":50,"context_line":"  })"},{"line_number":51,"context_line":"}"}],"source_content_type":"text/x-puppet","patch_set":10,"id":"ebd0ff5c_e2d31bf1","line":49,"range":{"start_line":48,"start_character":29,"end_line":49,"end_character":141},"updated":"2026-10-06 02:45:00.000000000","message":"We have to handle the case where policy key and value may content \u0027 . That\u0027s why I added regsubst hacks in ::base class.\n\nMaybe it\u0027s easier if we could use native yaml formatter instead of epp.","commit_id":"d2255e80888de720e4710a2a7c96f78aea8b87b6"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"db474a99dc55995c4d34a62b33d82306ff665a04","unresolved":true,"context_lines":[{"line_number":45,"context_line":"    mode    \u003d\u003e $file_mode,"},{"line_number":46,"context_line":"    owner   \u003d\u003e $file_user,"},{"line_number":47,"context_line":"    group   \u003d\u003e $file_group,"},{"line_number":48,"context_line":"    replace \u003d\u003e $purge_config,"},{"line_number":49,"context_line":"    content \u003d\u003e inline_epp(\"\u003c% \\$policies.each | String \\$k, Hash \\$v | { %\u003e\u0027\u003c%\u003d pick(\\$v[\u0027key\u0027], \\$k) %\u003e\u0027: \u0027\u003c%\u003d \\$v[\u0027value\u0027] %\u003e\u0027\\n\u003c% } -%\u003e\"),"},{"line_number":50,"context_line":"  })"},{"line_number":51,"context_line":"}"}],"source_content_type":"text/x-puppet","patch_set":10,"id":"ae3a4c5c_b5d3f088","line":49,"range":{"start_line":48,"start_character":29,"end_line":49,"end_character":141},"in_reply_to":"8e8d244d_d9350cbb","updated":"2026-10-19 16:21:40.000000000","message":"Yeah we have to try generating a formatted hash for it.\nI wonder if you could try adding escape for \u0027 in key,value which is already handled in the ::policy defined type ? I think I saw that in a few service policies.","commit_id":"d2255e80888de720e4710a2a7c96f78aea8b87b6"},{"author":{"_account_id":7888,"name":"Benedikt Trefzer","email":"benedikt.trefzer@cirrax.com","username":"trefzer"},"change_message_id":"dd260ecc0eb8b6ee863d2b488bd577d49a1919c4","unresolved":true,"context_lines":[{"line_number":45,"context_line":"    mode    \u003d\u003e $file_mode,"},{"line_number":46,"context_line":"    owner   \u003d\u003e $file_user,"},{"line_number":47,"context_line":"    group   \u003d\u003e $file_group,"},{"line_number":48,"context_line":"    replace \u003d\u003e $purge_config,"},{"line_number":49,"context_line":"    content \u003d\u003e inline_epp(\"\u003c% \\$policies.each | String \\$k, Hash \\$v | { %\u003e\u0027\u003c%\u003d pick(\\$v[\u0027key\u0027], \\$k) %\u003e\u0027: \u0027\u003c%\u003d \\$v[\u0027value\u0027] %\u003e\u0027\\n\u003c% } -%\u003e\"),"},{"line_number":50,"context_line":"  })"},{"line_number":51,"context_line":"}"}],"source_content_type":"text/x-puppet","patch_set":10,"id":"8e8d244d_d9350cbb","line":49,"range":{"start_line":48,"start_character":29,"end_line":49,"end_character":141},"in_reply_to":"ebd0ff5c_e2d31bf1","updated":"2026-10-06 07:24:12.000000000","message":"Well, the problem is that there are two ways to define an equal policy:\na) mypolicy \u003d\u003e { value \u003d\u003e blah }\nb) iwantthis \u003d\u003e { key \u003d\u003e mypolicy, value \u003d\u003e blah }\nhence I used the epp template to use the pick function. I do not think there is a yaml formatter with this feature.","commit_id":"d2255e80888de720e4710a2a7c96f78aea8b87b6"}]}
