)]}'
{"galaxy.yml":[{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"b6e8981950b0b22721b91734a9ff1f4d8a084a2f","unresolved":true,"context_lines":[{"line_number":1,"context_line":"name: repos"},{"line_number":2,"context_line":"namespace: tripleo"},{"line_number":3,"context_line":"version: 0.0.5"},{"line_number":4,"context_line":"readme: README.md"},{"line_number":5,"context_line":"authors:"},{"line_number":6,"context_line":"  - Red Hat"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"cc7b0dfc_badb85ce","line":3,"range":{"start_line":3,"start_character":9,"end_line":3,"end_character":14},"updated":"2021-08-16 08:17:45.000000000","message":"We also need to update it here: https://galaxy.ansible.com/tripleo/repos ?","commit_id":"5e8a7e403ce191a55f3ae4880e4d947cebecb5c8"},{"author":{"_account_id":24162,"name":"Sorin Sbârnea","display_name":"zbr","email":"ssbarnea@redhat.com","username":"ssbarnea","status":"do not feed the troll 🥕"},"change_message_id":"170ff28f64dec4d11608a49bdaa189b66b98e02d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"name: repos"},{"line_number":2,"context_line":"namespace: tripleo"},{"line_number":3,"context_line":"version: 0.0.5"},{"line_number":4,"context_line":"readme: README.md"},{"line_number":5,"context_line":"authors:"},{"line_number":6,"context_line":"  - Red Hat"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"89cbaa25_f699c666","line":3,"range":{"start_line":3,"start_character":9,"end_line":3,"end_character":14},"in_reply_to":"cc7b0dfc_badb85ce","updated":"2021-08-16 08:22:14.000000000","message":"I will publish it manually to galaxy once we merge this, so we have the same version in both. After we sort all the 3 patches I will talk with Sagi to setup the pipeline for publishing the collection.","commit_id":"5e8a7e403ce191a55f3ae4880e4d947cebecb5c8"}],"plugins/module_utils/tripleo_repos/get_hash/constants.py":[{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"16eaeefe73b99c656a7812e81274c4623ca9cbf9","unresolved":true,"context_lines":[{"line_number":37,"context_line":"\"\"\""},{"line_number":38,"context_line":"CONFIG_PATH \u003d \u0027/usr/local/etc/tripleo_get_hash/config.yaml\u0027"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"DEFAULT_CONFIG \u003d {"},{"line_number":41,"context_line":"    \"tripleo_releases\": ["},{"line_number":42,"context_line":"        \"master\","},{"line_number":43,"context_line":"        \"wallaby\","}],"source_content_type":"text/x-python","patch_set":4,"id":"37ce03f8_695b0837","line":40,"updated":"2021-08-13 07:17:01.000000000","message":"Why do we need to carry this config and why do we want to default to it instead of throwing the error as before","commit_id":"5e8a7e403ce191a55f3ae4880e4d947cebecb5c8"},{"author":{"_account_id":24162,"name":"Sorin Sbârnea","display_name":"zbr","email":"ssbarnea@redhat.com","username":"ssbarnea","status":"do not feed the troll 🥕"},"change_message_id":"236bc087d96e577574571c6d9d2a5d761bd85c89","unresolved":true,"context_lines":[{"line_number":37,"context_line":"\"\"\""},{"line_number":38,"context_line":"CONFIG_PATH \u003d \u0027/usr/local/etc/tripleo_get_hash/config.yaml\u0027"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"DEFAULT_CONFIG \u003d {"},{"line_number":41,"context_line":"    \"tripleo_releases\": ["},{"line_number":42,"context_line":"        \"master\","},{"line_number":43,"context_line":"        \"wallaby\","}],"source_content_type":"text/x-python","patch_set":4,"id":"50029186_2eacd712","line":40,"in_reply_to":"37ce03f8_695b0837","updated":"2021-08-13 09:19:08.000000000","message":"You cannot throw a error anymore because in most cases there is no config file.\n\nWe cannot include/deploy a config file with the module, the config is embedded inside the module itself. \n\nPlease read at least https://docs.ansible.com/ansible/latest/dev_guide/developing_program_flow_modules.html#ansiballz-framework section to get a glimpse about how ansible executes modules on remote hosts (zipping, what is included in these zips) -- hint: data files are not, so we could not make it ship an config.yaml file to the remote host. This is why we use a default/embedded config.","commit_id":"5e8a7e403ce191a55f3ae4880e4d947cebecb5c8"},{"author":{"_account_id":24162,"name":"Sorin Sbârnea","display_name":"zbr","email":"ssbarnea@redhat.com","username":"ssbarnea","status":"do not feed the troll 🥕"},"change_message_id":"bbd7d89c78b19c9d403e9ab21ec1021fc8330bd2","unresolved":false,"context_lines":[{"line_number":37,"context_line":"\"\"\""},{"line_number":38,"context_line":"CONFIG_PATH \u003d \u0027/usr/local/etc/tripleo_get_hash/config.yaml\u0027"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"DEFAULT_CONFIG \u003d {"},{"line_number":41,"context_line":"    \"tripleo_releases\": ["},{"line_number":42,"context_line":"        \"master\","},{"line_number":43,"context_line":"        \"wallaby\","}],"source_content_type":"text/x-python","patch_set":4,"id":"02657724_8c8ab417","line":40,"in_reply_to":"50029186_2eacd712","updated":"2021-08-16 08:22:58.000000000","message":"Done","commit_id":"5e8a7e403ce191a55f3ae4880e4d947cebecb5c8"}],"plugins/module_utils/tripleo_repos/get_hash/tripleo_hash_info.py":[{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"16eaeefe73b99c656a7812e81274c4623ca9cbf9","unresolved":true,"context_lines":[{"line_number":19,"context_line":"import sys"},{"line_number":20,"context_line":"import os"},{"line_number":21,"context_line":"import yaml"},{"line_number":22,"context_line":"import requests"},{"line_number":23,"context_line":"from .constants import CONFIG_PATH, CONFIG_KEYS"},{"line_number":24,"context_line":"from .exceptions import TripleOHashMissingConfig, TripleOHashInvalidConfig"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"0067100d_ea8bc57f","side":"PARENT","line":22,"updated":"2021-08-13 07:17:01.000000000","message":"The main point of this is not having to rely on requests but remind me why that was a problem please","commit_id":"222e81c5ff40439d0b737e12dd1fd68142f67328"},{"author":{"_account_id":24162,"name":"Sorin Sbârnea","display_name":"zbr","email":"ssbarnea@redhat.com","username":"ssbarnea","status":"do not feed the troll 🥕"},"change_message_id":"942dd21365ab4b89831ed82391a7779a8d2ef146","unresolved":true,"context_lines":[{"line_number":19,"context_line":"import sys"},{"line_number":20,"context_line":"import os"},{"line_number":21,"context_line":"import yaml"},{"line_number":22,"context_line":"import requests"},{"line_number":23,"context_line":"from .constants import CONFIG_PATH, CONFIG_KEYS"},{"line_number":24,"context_line":"from .exceptions import TripleOHashMissingConfig, TripleOHashInvalidConfig"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"e0c56506_277d1c0d","side":"PARENT","line":22,"in_reply_to":"0067100d_ea8bc57f","updated":"2021-08-13 09:07:37.000000000","message":"requests is not available on all remote nodes, previous test runs proved that.","commit_id":"222e81c5ff40439d0b737e12dd1fd68142f67328"},{"author":{"_account_id":24162,"name":"Sorin Sbârnea","display_name":"zbr","email":"ssbarnea@redhat.com","username":"ssbarnea","status":"do not feed the troll 🥕"},"change_message_id":"f81fcf7f1beb1854d7e9e5986a92625b606ed666","unresolved":false,"context_lines":[{"line_number":19,"context_line":"import sys"},{"line_number":20,"context_line":"import os"},{"line_number":21,"context_line":"import yaml"},{"line_number":22,"context_line":"import requests"},{"line_number":23,"context_line":"from .constants import CONFIG_PATH, CONFIG_KEYS"},{"line_number":24,"context_line":"from .exceptions import TripleOHashMissingConfig, TripleOHashInvalidConfig"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"746bb69a_eac96162","side":"PARENT","line":22,"in_reply_to":"e0c56506_277d1c0d","updated":"2021-08-13 09:14:36.000000000","message":"Done","commit_id":"222e81c5ff40439d0b737e12dd1fd68142f67328"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"16eaeefe73b99c656a7812e81274c4623ca9cbf9","unresolved":true,"context_lines":[{"line_number":164,"context_line":"        repo_url \u003d self._resolve_repo_url(config[\u0027dlrn_url\u0027])"},{"line_number":165,"context_line":"        self.dlrn_url \u003d repo_url"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        repo_url_response \u003d requests.get(repo_url).text"},{"line_number":168,"context_line":"        if repo_url.endswith(\u0027commit.yaml\u0027):"},{"line_number":169,"context_line":"            from_commit_yaml \u003d self._hashes_from_commit_yaml(repo_url_response)"},{"line_number":170,"context_line":"            self.full_hash \u003d from_commit_yaml[0]"}],"source_content_type":"text/x-python","patch_set":4,"id":"f714131a_084583d3","side":"PARENT","line":167,"updated":"2021-08-13 07:17:01.000000000","message":"seems we are locked in perpetual merge conflict https://review.opendev.org/c/openstack/tripleo-repos/+/804385/1/plugins/module_utils/tripleo_repos/get_hash/tripleo_hash_info.py\n\n:/","commit_id":"222e81c5ff40439d0b737e12dd1fd68142f67328"},{"author":{"_account_id":24162,"name":"Sorin Sbârnea","display_name":"zbr","email":"ssbarnea@redhat.com","username":"ssbarnea","status":"do not feed the troll 🥕"},"change_message_id":"f81fcf7f1beb1854d7e9e5986a92625b606ed666","unresolved":true,"context_lines":[{"line_number":164,"context_line":"        repo_url \u003d self._resolve_repo_url(config[\u0027dlrn_url\u0027])"},{"line_number":165,"context_line":"        self.dlrn_url \u003d repo_url"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        repo_url_response \u003d requests.get(repo_url).text"},{"line_number":168,"context_line":"        if repo_url.endswith(\u0027commit.yaml\u0027):"},{"line_number":169,"context_line":"            from_commit_yaml \u003d self._hashes_from_commit_yaml(repo_url_response)"},{"line_number":170,"context_line":"            self.full_hash \u003d from_commit_yaml[0]"}],"source_content_type":"text/x-python","patch_set":4,"id":"05f323ed_ff33c384","side":"PARENT","line":167,"in_reply_to":"f714131a_084583d3","updated":"2021-08-13 09:14:36.000000000","message":"Yep, that would have to be rewritten. Is not my fault that get_hash module was written without considering ansible guidelines from writing modules. Ideally these changes should have happened before we even added the module in the first place. \n\nI see these as costs of not having adequate testing from start. Lucky for us that module is very simple.","commit_id":"222e81c5ff40439d0b737e12dd1fd68142f67328"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"011fed8083133baa4301b7142c5e444ff93e1160","unresolved":true,"context_lines":[{"line_number":29,"context_line":"    from ansible.module_utils.urls import open_url"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def http_get(url: str) -\u003e Tuple[str, int]:"},{"line_number":32,"context_line":"        response \u003d open_url(url, method\u003d\u0027GET\u0027)"},{"line_number":33,"context_line":"        return (response.read(), response.status)"},{"line_number":34,"context_line":"except ImportError:"},{"line_number":35,"context_line":"    import gzip"}],"source_content_type":"text/x-python","patch_set":4,"id":"f0c785b0_d5ea5bf9","line":32,"updated":"2021-08-16 12:14:55.000000000","message":"This will get messy consider error handling I am trying to replace mine on to this now now \nhttps://review.opendev.org/c/openstack/tripleo-repos/+/804385/1/plugins/module_utils/tripleo_repos/get_hash/tripleo_hash_info.py\n\nSo I guess I will have to catch two different types of connection error there","commit_id":"5e8a7e403ce191a55f3ae4880e4d947cebecb5c8"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"c2adde49365702917ae23dd12afac028f022e010","unresolved":true,"context_lines":[{"line_number":39,"context_line":"        # https://stackoverflow.com/questions/35122232/urllib-request-urlopen-return-bytes-but-i-cannot-decode-it"},{"line_number":40,"context_line":"        response \u003d urlopen(url)"},{"line_number":41,"context_line":"        return ("},{"line_number":42,"context_line":"            gzip.decompress(response.read()).decode(\u0027utf-8\u0027),"},{"line_number":43,"context_line":"            int(response.status))"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"__metaclass__ \u003d type"}],"source_content_type":"text/x-python","patch_set":5,"id":"4b4a990e_c4e93c24","line":42,"range":{"start_line":42,"start_character":0,"end_line":42,"end_character":1},"updated":"2021-08-17 08:56:01.000000000","message":"sorin does this work for you? on my system:\n\n\n(venv) [m@localhost tripleo-repos]$ python plugins/module_utils/tripleo_repos/get_hash/__main__.py\n2021-08-17 11:54:02,503 - tripleo-get-hash - INFO - Using config file at /usr/local/etc/tripleo_get_hash/config.yaml\n2021-08-17 11:54:02,507 - tripleo-get-hash - INFO - Using config file at /usr/local/etc/tripleo_get_hash/config.yaml\nTraceback (most recent call last):\n...\n    gzip.decompress(response.read()).decode(\u0027utf-8\u0027),\n  File \"/usr/lib64/python3.9/gzip.py\", line 556, in decompress\n    return f.read()\n  File \"/usr/lib64/python3.9/gzip.py\", line 300, in read\n    return self._buffer.read(size)\n  File \"/usr/lib64/python3.9/gzip.py\", line 487, in read\n    if not self._read_gzip_header():\n  File \"/usr/lib64/python3.9/gzip.py\", line 435, in _read_gzip_header\n    raise BadGzipFile(\u0027Not a gzipped file (%r)\u0027 % magic)\ngzip.BadGzipFile: Not a gzipped file (b\u002782\u0027)","commit_id":"c31394e58c39cdcaa4537b9d839e17a1ce6b4c3f"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"86528e2d861606e0516fa3f54cea64e2391f80e2","unresolved":true,"context_lines":[{"line_number":39,"context_line":"        # https://stackoverflow.com/questions/35122232/urllib-request-urlopen-return-bytes-but-i-cannot-decode-it"},{"line_number":40,"context_line":"        response \u003d urlopen(url)"},{"line_number":41,"context_line":"        return ("},{"line_number":42,"context_line":"            gzip.decompress(response.read()).decode(\u0027utf-8\u0027),"},{"line_number":43,"context_line":"            int(response.status))"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"__metaclass__ \u003d type"}],"source_content_type":"text/x-python","patch_set":5,"id":"368abf14_27b398db","line":42,"range":{"start_line":42,"start_character":0,"end_line":42,"end_character":1},"in_reply_to":"4b4a990e_c4e93c24","updated":"2021-08-17 09:09:30.000000000","message":"i removed the gzip.decompress and it works ok then\n\ntests also seem to be unaffected in either case\n\ni can fixup in my patch which i\u0027m rebasing onto this so removing -1 but should have blocked the merged for that cos it breaks","commit_id":"c31394e58c39cdcaa4537b9d839e17a1ce6b4c3f"}],"tests/unit/get_hash/test_tripleo_get_hash.py":[{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"fdcf369f63222e3cc64ee8d82f9ed33676320513","unresolved":true,"context_lines":[{"line_number":14,"context_line":"#"},{"line_number":15,"context_line":"#"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import requests_mock"},{"line_number":18,"context_line":"import sys"},{"line_number":19,"context_line":"import unittest"},{"line_number":20,"context_line":"from unittest import mock"}],"source_content_type":"text/x-python","patch_set":4,"id":"7ec464ef_5e550273","side":"PARENT","line":17,"updated":"2021-08-16 12:19:34.000000000","message":"We can also remove it from here: https://opendev.org/openstack/tripleo-repos/src/branch/master/test-requirements.txt#L16","commit_id":"222e81c5ff40439d0b737e12dd1fd68142f67328"},{"author":{"_account_id":24162,"name":"Sorin Sbârnea","display_name":"zbr","email":"ssbarnea@redhat.com","username":"ssbarnea","status":"do not feed the troll 🥕"},"change_message_id":"00972125876be9c7d068a7233509ca4e1867a12e","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#"},{"line_number":15,"context_line":"#"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import requests_mock"},{"line_number":18,"context_line":"import sys"},{"line_number":19,"context_line":"import unittest"},{"line_number":20,"context_line":"from unittest import mock"}],"source_content_type":"text/x-python","patch_set":4,"id":"1eb71ae2_39e44eb8","side":"PARENT","line":17,"in_reply_to":"7ec464ef_5e550273","updated":"2021-08-16 14:25:07.000000000","message":"Thanks fixed it!","commit_id":"222e81c5ff40439d0b737e12dd1fd68142f67328"}],"tests/unit/get_hash/test_tripleo_get_hash_info.py":[{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"16eaeefe73b99c656a7812e81274c4623ca9cbf9","unresolved":true,"context_lines":[{"line_number":18,"context_line":"import tripleo_repos.get_hash.tripleo_hash_info as thi"},{"line_number":19,"context_line":"import tripleo_repos.get_hash.exceptions as exc"},{"line_number":20,"context_line":"from . import fakes as test_fakes"},{"line_number":21,"context_line":"import requests_mock"},{"line_number":22,"context_line":"from unittest import mock"},{"line_number":23,"context_line":"from unittest.mock import mock_open"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1e1402f1_77e12a0d","side":"PARENT","line":21,"updated":"2021-08-13 07:17:01.000000000","message":"again why is using requests and requests mock a bad thing?","commit_id":"222e81c5ff40439d0b737e12dd1fd68142f67328"},{"author":{"_account_id":24162,"name":"Sorin Sbârnea","display_name":"zbr","email":"ssbarnea@redhat.com","username":"ssbarnea","status":"do not feed the troll 🥕"},"change_message_id":"e0bd4a0690a15b01968f011982e696670d917c84","unresolved":true,"context_lines":[{"line_number":18,"context_line":"import tripleo_repos.get_hash.tripleo_hash_info as thi"},{"line_number":19,"context_line":"import tripleo_repos.get_hash.exceptions as exc"},{"line_number":20,"context_line":"from . import fakes as test_fakes"},{"line_number":21,"context_line":"import requests_mock"},{"line_number":22,"context_line":"from unittest import mock"},{"line_number":23,"context_line":"from unittest.mock import mock_open"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"fb8ab2d0_fe323f0b","side":"PARENT","line":21,"in_reply_to":"1e1402f1_77e12a0d","updated":"2021-08-13 09:09:47.000000000","message":"DITTO: requests, and yaml are not available on all remote nodes. When ansible sends module to these hots tasks will fail. Removal of requests_mock is a side-effect of\nreplacing requests with python/ansible urllib.","commit_id":"222e81c5ff40439d0b737e12dd1fd68142f67328"},{"author":{"_account_id":24162,"name":"Sorin Sbârnea","display_name":"zbr","email":"ssbarnea@redhat.com","username":"ssbarnea","status":"do not feed the troll 🥕"},"change_message_id":"bbd7d89c78b19c9d403e9ab21ec1021fc8330bd2","unresolved":false,"context_lines":[{"line_number":18,"context_line":"import tripleo_repos.get_hash.tripleo_hash_info as thi"},{"line_number":19,"context_line":"import tripleo_repos.get_hash.exceptions as exc"},{"line_number":20,"context_line":"from . import fakes as test_fakes"},{"line_number":21,"context_line":"import requests_mock"},{"line_number":22,"context_line":"from unittest import mock"},{"line_number":23,"context_line":"from unittest.mock import mock_open"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"117b759a_a092e641","side":"PARENT","line":21,"in_reply_to":"fb8ab2d0_fe323f0b","updated":"2021-08-16 08:22:58.000000000","message":"Done","commit_id":"222e81c5ff40439d0b737e12dd1fd68142f67328"}]}
