)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"2a8b75ff6ec119e492cdde9d96e54a98b87dd15a","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix token cache expires_at check"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Tokens can have a expires_at field, and not a expires_in. This patch"},{"line_number":10,"context_line":"corrects the key lookup to allow for both fields from the token to resolve"},{"line_number":11,"context_line":"cached token authentication issues."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"0d6dce78_3aaeb4ce","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":34},"updated":"2022-11-01 04:03:06.000000000","message":"(low-prio) I\u0027d mention this behavior is specific to Satellite as far as we are aware of.","commit_id":"6c290ff70a46e79cb66a6ad4cafc345cce741377"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":30073,"name":"Brendan Shephard","email":"bshephar@bne-home.net","username":"bshephar"},"change_message_id":"d22137513dcb3b1d0d4e2dd004e3981a8d1cb44f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"387ffc2d_d7082a13","updated":"2022-10-28 12:56:30.000000000","message":"needs a unit test. I’ll work on that next week. marking WIP until then.","commit_id":"b3dc3faf6adab8bcc2e4ac8a0bb37175a0702a12"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"4302db1f35ab3f473651414677ad0fd5104ea0f9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":19,"id":"1e576c42_5956ec91","updated":"2022-11-11 05:21:32.000000000","message":"recheck","commit_id":"08e890ee61869b32e1604b86cb466e7d5596ee8e"},{"author":{"_account_id":30073,"name":"Brendan Shephard","email":"bshephar@bne-home.net","username":"bshephar"},"change_message_id":"2170b81c5c28bee013a9e99b5e1197ec609427c2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":19,"id":"60470e76_35dd0290","updated":"2022-11-15 03:32:53.000000000","message":"recheck gate","commit_id":"08e890ee61869b32e1604b86cb466e7d5596ee8e"},{"author":{"_account_id":30073,"name":"Brendan Shephard","email":"bshephar@bne-home.net","username":"bshephar"},"change_message_id":"95aa5b5942b58da0e7440d563f0bbe7cebdcf3c9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":19,"id":"b0bd5bc9_9c8f4265","updated":"2022-11-15 22:48:38.000000000","message":"recheck gate","commit_id":"08e890ee61869b32e1604b86cb466e7d5596ee8e"},{"author":{"_account_id":30073,"name":"Brendan Shephard","email":"bshephar@bne-home.net","username":"bshephar"},"change_message_id":"6edb468754145b631b653e42bebc8fe6d4945dfc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":19,"id":"e302e626_f56a9a50","updated":"2022-11-15 02:25:09.000000000","message":"recheck gate","commit_id":"08e890ee61869b32e1604b86cb466e7d5596ee8e"}],"tripleo_common/image/image_uploader.py":[{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"06ace7ad9621db2a57575bbdd99d64ec332f32dc","unresolved":true,"context_lines":[{"line_number":314,"context_line":"            data \u003d lock.sessions().get(scope)"},{"line_number":315,"context_line":"            if data and data.get(\u0027issued_at\u0027):"},{"line_number":316,"context_line":"                now \u003d datetime.utcnow()"},{"line_number":317,"context_line":"                expires_at \u003d data.get(\u0027expires_at\u0027)"},{"line_number":318,"context_line":"                if expires_at:"},{"line_number":319,"context_line":"                    exp \u003d datetime.strptime(expires_at,"},{"line_number":320,"context_line":"                                            \"%Y-%m-%dT%H:%M:%S.%fZ\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"73843e27_bf4d7041","line":317,"range":{"start_line":317,"start_character":39,"end_line":317,"end_character":49},"updated":"2022-10-31 01:36:43.000000000","message":"We can check expires_at regardless of issues_at.\n\nAlso, I think it\u0027s better to check both expires_at and expires_in. I googled a few spec docs of Oauth but seems expires_in is more popular.","commit_id":"02742af7ea4b4bb717f530299dfd37ab9b4d1722"},{"author":{"_account_id":30073,"name":"Brendan Shephard","email":"bshephar@bne-home.net","username":"bshephar"},"change_message_id":"3747a9510cac5235992842ea73ba6bc0d799d4c9","unresolved":false,"context_lines":[{"line_number":314,"context_line":"            data \u003d lock.sessions().get(scope)"},{"line_number":315,"context_line":"            if data and data.get(\u0027issued_at\u0027):"},{"line_number":316,"context_line":"                now \u003d datetime.utcnow()"},{"line_number":317,"context_line":"                expires_at \u003d data.get(\u0027expires_at\u0027)"},{"line_number":318,"context_line":"                if expires_at:"},{"line_number":319,"context_line":"                    exp \u003d datetime.strptime(expires_at,"},{"line_number":320,"context_line":"                                            \"%Y-%m-%dT%H:%M:%S.%fZ\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"f772e62e_9b7d8c92","line":317,"range":{"start_line":317,"start_character":39,"end_line":317,"end_character":49},"in_reply_to":"73843e27_bf4d7041","updated":"2022-10-31 02:01:46.000000000","message":"Done","commit_id":"02742af7ea4b4bb717f530299dfd37ab9b4d1722"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"31123125866e523a8c60c195a20de0edae9c10e3","unresolved":true,"context_lines":[{"line_number":314,"context_line":"            data \u003d lock.sessions().get(scope)"},{"line_number":315,"context_line":"            if data:"},{"line_number":316,"context_line":"                now \u003d datetime.utcnow()"},{"line_number":317,"context_line":"                expires \u003d data.get(\u0027expires_at\u0027) or data.get(\u0027expires_in\u0027)"},{"line_number":318,"context_line":"                if expires:"},{"line_number":319,"context_line":"                    exp \u003d datetime.strptime(expires,"},{"line_number":320,"context_line":"                                            \"%Y-%m-%dT%H:%M:%S.%fZ\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"8ef0d87a_d2f136ec","line":317,"range":{"start_line":317,"start_character":52,"end_line":317,"end_character":74},"updated":"2022-10-31 02:15:29.000000000","message":"expires_in is not in the date/time format but the delta seconds.","commit_id":"e13b0b734e257d678898f8ac63291a0bd2d82023"},{"author":{"_account_id":30073,"name":"Brendan Shephard","email":"bshephar@bne-home.net","username":"bshephar"},"change_message_id":"8e4d31092f77df98f2cc234f00ba91cd84a747d3","unresolved":false,"context_lines":[{"line_number":314,"context_line":"            data \u003d lock.sessions().get(scope)"},{"line_number":315,"context_line":"            if data:"},{"line_number":316,"context_line":"                now \u003d datetime.utcnow()"},{"line_number":317,"context_line":"                expires \u003d data.get(\u0027expires_at\u0027) or data.get(\u0027expires_in\u0027)"},{"line_number":318,"context_line":"                if expires:"},{"line_number":319,"context_line":"                    exp \u003d datetime.strptime(expires,"},{"line_number":320,"context_line":"                                            \"%Y-%m-%dT%H:%M:%S.%fZ\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"30b03e56_bff3ea82","line":317,"range":{"start_line":317,"start_character":52,"end_line":317,"end_character":74},"in_reply_to":"8ef0d87a_d2f136ec","updated":"2022-10-31 04:11:46.000000000","message":"Done","commit_id":"e13b0b734e257d678898f8ac63291a0bd2d82023"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"3cfe4e0695c6e0abe6ac6baf3716a56d29fc874e","unresolved":true,"context_lines":[{"line_number":321,"context_line":"                    return data[\u0027token\u0027]"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"                # expires_at uses UTC date and time format. Although, this"},{"line_number":324,"context_line":"                # field doesn\u0027t appear in the RFC for OAuth. It appears some"},{"line_number":325,"context_line":"                # API\u0027s return a response with expires_at instead of expires_in"},{"line_number":326,"context_line":"                # https://www.rfc-editor.org/rfc/rfc6749"},{"line_number":327,"context_line":"                # https://bugzilla.redhat.com/show_bug.cgi?id\u003d2134075"},{"line_number":328,"context_line":"                if data.get(\u0027expires_at\u0027):"}],"source_content_type":"text/x-python","patch_set":12,"id":"20ed6a46_57dc48e5","line":325,"range":{"start_line":324,"start_character":61,"end_line":325,"end_character":79},"updated":"2022-10-31 04:16:25.000000000","message":"Have we checked with satellite folks why they\u0027re not adhering to the spec before the workaround here?","commit_id":"9b02f1b2da24dfd99821e0ea2d7c5102014ccb20"},{"author":{"_account_id":30073,"name":"Brendan Shephard","email":"bshephar@bne-home.net","username":"bshephar"},"change_message_id":"7e65586ced000cfa0eebe1c3b0d32728686ddc88","unresolved":true,"context_lines":[{"line_number":321,"context_line":"                    return data[\u0027token\u0027]"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"                # expires_at uses UTC date and time format. Although, this"},{"line_number":324,"context_line":"                # field doesn\u0027t appear in the RFC for OAuth. It appears some"},{"line_number":325,"context_line":"                # API\u0027s return a response with expires_at instead of expires_in"},{"line_number":326,"context_line":"                # https://www.rfc-editor.org/rfc/rfc6749"},{"line_number":327,"context_line":"                # https://bugzilla.redhat.com/show_bug.cgi?id\u003d2134075"},{"line_number":328,"context_line":"                if data.get(\u0027expires_at\u0027):"}],"source_content_type":"text/x-python","patch_set":12,"id":"7b0956e7_62d83646","line":325,"range":{"start_line":324,"start_character":61,"end_line":325,"end_character":79},"in_reply_to":"20ed6a46_57dc48e5","updated":"2022-10-31 04:38:06.000000000","message":"No, I haven\u0027t checked with the Foreman project. But it does look like expires_at did exist at some point but may have been removed in OAuth 2.0:\nhttps://mailarchive.ietf.org/arch/msg/oauth/FDKZDeAza5zsnzTMCeBeXbQAlm4/\nhttps://oauth.net/faq/\n\nGiven that, we should probably check for both.","commit_id":"9b02f1b2da24dfd99821e0ea2d7c5102014ccb20"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"d50cec41aa12950dfcab57cec8df834e0b929f9e","unresolved":true,"context_lines":[{"line_number":321,"context_line":"                    return data[\u0027token\u0027]"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"                # expires_at uses UTC date and time format. Although, this"},{"line_number":324,"context_line":"                # field doesn\u0027t appear in the RFC for OAuth. It appears some"},{"line_number":325,"context_line":"                # API\u0027s return a response with expires_at instead of expires_in"},{"line_number":326,"context_line":"                # https://www.rfc-editor.org/rfc/rfc6749"},{"line_number":327,"context_line":"                # https://bugzilla.redhat.com/show_bug.cgi?id\u003d2134075"},{"line_number":328,"context_line":"                if data.get(\u0027expires_at\u0027):"}],"source_content_type":"text/x-python","patch_set":12,"id":"f56184ca_15844234","line":325,"range":{"start_line":324,"start_character":61,"end_line":325,"end_character":79},"in_reply_to":"7b0956e7_62d83646","updated":"2022-10-31 04:55:53.000000000","message":"Nah, I don\u0027t think it has ever made it to the oauth spec. I don\u0027t see it in oauth 1.0[1]. I would like we raise a satellite BZ and reference here, so that we can track it to remove the WA. \n\n[1] https://datatracker.ietf.org/doc/html/rfc5849","commit_id":"9b02f1b2da24dfd99821e0ea2d7c5102014ccb20"},{"author":{"_account_id":30073,"name":"Brendan Shephard","email":"bshephar@bne-home.net","username":"bshephar"},"change_message_id":"5237b2d86df917983fba3ae9a582aeba8141a607","unresolved":true,"context_lines":[{"line_number":321,"context_line":"                    return data[\u0027token\u0027]"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"                # expires_at uses UTC date and time format. Although, this"},{"line_number":324,"context_line":"                # field doesn\u0027t appear in the RFC for OAuth. It appears some"},{"line_number":325,"context_line":"                # API\u0027s return a response with expires_at instead of expires_in"},{"line_number":326,"context_line":"                # https://www.rfc-editor.org/rfc/rfc6749"},{"line_number":327,"context_line":"                # https://bugzilla.redhat.com/show_bug.cgi?id\u003d2134075"},{"line_number":328,"context_line":"                if data.get(\u0027expires_at\u0027):"}],"source_content_type":"text/x-python","patch_set":12,"id":"867cbaea_6c8865b6","line":325,"range":{"start_line":324,"start_character":61,"end_line":325,"end_character":79},"in_reply_to":"f56184ca_15844234","updated":"2022-10-31 05:30:06.000000000","message":"https://projects.theforeman.org/issues/35690\nhttps://bugzilla.redhat.com/show_bug.cgi?id\u003d2138743","commit_id":"9b02f1b2da24dfd99821e0ea2d7c5102014ccb20"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"d50cec41aa12950dfcab57cec8df834e0b929f9e","unresolved":true,"context_lines":[{"line_number":335,"context_line":"                # expires_in is an integer value from the issued_at time."},{"line_number":336,"context_line":"                # We will use this to determine if the token should be expired"},{"line_number":337,"context_line":"                # https://www.rfc-editor.org/rfc/rfc6749#section-4.2.2"},{"line_number":338,"context_line":"                if data.get(\u0027expires_in\u0027):"},{"line_number":339,"context_line":"                    now \u003d datetime.now(tzlocal())"},{"line_number":340,"context_line":"                    expires_in \u003d data.get(\u0027expires_in\u0027)"},{"line_number":341,"context_line":"                    token_time \u003d dt_parse(data.get(\u0027issued_at\u0027))"}],"source_content_type":"text/x-python","patch_set":12,"id":"880f72d6_f86bd4b6","line":338,"range":{"start_line":338,"start_character":16,"end_line":338,"end_character":42},"updated":"2022-10-31 04:55:53.000000000","message":"Move this block before check for expires_at which is an outlier and use an else block. If expires_in and expires_at both are there we should use expires_in to check.","commit_id":"9b02f1b2da24dfd99821e0ea2d7c5102014ccb20"},{"author":{"_account_id":30073,"name":"Brendan Shephard","email":"bshephar@bne-home.net","username":"bshephar"},"change_message_id":"5237b2d86df917983fba3ae9a582aeba8141a607","unresolved":false,"context_lines":[{"line_number":335,"context_line":"                # expires_in is an integer value from the issued_at time."},{"line_number":336,"context_line":"                # We will use this to determine if the token should be expired"},{"line_number":337,"context_line":"                # https://www.rfc-editor.org/rfc/rfc6749#section-4.2.2"},{"line_number":338,"context_line":"                if data.get(\u0027expires_in\u0027):"},{"line_number":339,"context_line":"                    now \u003d datetime.now(tzlocal())"},{"line_number":340,"context_line":"                    expires_in \u003d data.get(\u0027expires_in\u0027)"},{"line_number":341,"context_line":"                    token_time \u003d dt_parse(data.get(\u0027issued_at\u0027))"}],"source_content_type":"text/x-python","patch_set":12,"id":"c7c87a9d_2dd84df4","line":338,"range":{"start_line":338,"start_character":16,"end_line":338,"end_character":42},"in_reply_to":"880f72d6_f86bd4b6","updated":"2022-10-31 05:30:06.000000000","message":"Done","commit_id":"9b02f1b2da24dfd99821e0ea2d7c5102014ccb20"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"d133120167c54d18c509c1a47e005b962180119f","unresolved":true,"context_lines":[{"line_number":317,"context_line":"            if data:"},{"line_number":318,"context_line":"                # We need to check for both expires_in and expires_at"},{"line_number":319,"context_line":"                # if neither exist. We\u0027ll just return the token early"},{"line_number":320,"context_line":"                if not (data.get(\u0027expires_in\u0027) or data.get(\u0027expires_at\u0027)):"},{"line_number":321,"context_line":"                    return data[\u0027token\u0027]"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"                # expires_in is an integer value from the issued_at time."}],"source_content_type":"text/x-python","patch_set":16,"id":"b2644c8a_22f69f2c","line":320,"range":{"start_line":320,"start_character":16,"end_line":320,"end_character":74},"updated":"2022-10-31 15:42:49.000000000","message":"The following structure would be more readable.\n\n```\nif data.get(\u0027expires_in\u0027):\n    ....\nelif data.get(\u0027expires_at\u0027):\n    ...\nelse:\n    # No expiration is defined, so assume the token never expires\n    return data[\u0027token\u0027]\n```","commit_id":"00366aa4d04fe61bd181a22c6666d30a072f72dd"},{"author":{"_account_id":30073,"name":"Brendan Shephard","email":"bshephar@bne-home.net","username":"bshephar"},"change_message_id":"8e0bccc8482f2ce6f4ab23e4a571f56cfc35b465","unresolved":false,"context_lines":[{"line_number":317,"context_line":"            if data:"},{"line_number":318,"context_line":"                # We need to check for both expires_in and expires_at"},{"line_number":319,"context_line":"                # if neither exist. We\u0027ll just return the token early"},{"line_number":320,"context_line":"                if not (data.get(\u0027expires_in\u0027) or data.get(\u0027expires_at\u0027)):"},{"line_number":321,"context_line":"                    return data[\u0027token\u0027]"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"                # expires_in is an integer value from the issued_at time."}],"source_content_type":"text/x-python","patch_set":16,"id":"1eb9a0cb_2e4c4fcd","line":320,"range":{"start_line":320,"start_character":16,"end_line":320,"end_character":74},"in_reply_to":"92b6254a_0027f3dd","updated":"2022-10-31 23:43:08.000000000","message":"Done","commit_id":"00366aa4d04fe61bd181a22c6666d30a072f72dd"},{"author":{"_account_id":30073,"name":"Brendan Shephard","email":"bshephar@bne-home.net","username":"bshephar"},"change_message_id":"c92cc9823a17e018c862c680be082f012efe4d23","unresolved":true,"context_lines":[{"line_number":317,"context_line":"            if data:"},{"line_number":318,"context_line":"                # We need to check for both expires_in and expires_at"},{"line_number":319,"context_line":"                # if neither exist. We\u0027ll just return the token early"},{"line_number":320,"context_line":"                if not (data.get(\u0027expires_in\u0027) or data.get(\u0027expires_at\u0027)):"},{"line_number":321,"context_line":"                    return data[\u0027token\u0027]"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"                # expires_in is an integer value from the issued_at time."}],"source_content_type":"text/x-python","patch_set":16,"id":"92b6254a_0027f3dd","line":320,"range":{"start_line":320,"start_character":16,"end_line":320,"end_character":74},"in_reply_to":"b2644c8a_22f69f2c","updated":"2022-10-31 23:10:04.000000000","message":"I don\u0027t have a preference here. Either of them is computationally equivalent in terms of efficiency. Happy to break it up. I just went with this option to avoid adding additional if statements.","commit_id":"00366aa4d04fe61bd181a22c6666d30a072f72dd"}],"tripleo_common/tests/image/test_image_uploader.py":[{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"31123125866e523a8c60c195a20de0edae9c10e3","unresolved":true,"context_lines":[{"line_number":256,"context_line":"        ret \u003d image_uploader.RegistrySessionHelper.get_cached_bearer_token("},{"line_number":257,"context_line":"            mock_lock, scope)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"        self.assertEqual(ret, None)"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    @mock.patch(\u0027tripleo_common.utils.locks.threadinglock.ThreadingLock\u0027,"},{"line_number":262,"context_line":"                name\u003d\u0027mock_lock\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7b9429e0_f157fb07","line":259,"range":{"start_line":259,"start_character":13,"end_line":259,"end_character":24},"updated":"2022-10-31 02:15:29.000000000","message":"use assertIsNone","commit_id":"e13b0b734e257d678898f8ac63291a0bd2d82023"},{"author":{"_account_id":30073,"name":"Brendan Shephard","email":"bshephar@bne-home.net","username":"bshephar"},"change_message_id":"8e4d31092f77df98f2cc234f00ba91cd84a747d3","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        ret \u003d image_uploader.RegistrySessionHelper.get_cached_bearer_token("},{"line_number":257,"context_line":"            mock_lock, scope)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"        self.assertEqual(ret, None)"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    @mock.patch(\u0027tripleo_common.utils.locks.threadinglock.ThreadingLock\u0027,"},{"line_number":262,"context_line":"                name\u003d\u0027mock_lock\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fb59e0c3_3aeb707f","line":259,"range":{"start_line":259,"start_character":13,"end_line":259,"end_character":24},"in_reply_to":"7b9429e0_f157fb07","updated":"2022-10-31 04:11:46.000000000","message":"Done","commit_id":"e13b0b734e257d678898f8ac63291a0bd2d82023"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"31123125866e523a8c60c195a20de0edae9c10e3","unresolved":true,"context_lines":[{"line_number":310,"context_line":"        ret \u003d image_uploader.RegistrySessionHelper.get_cached_bearer_token("},{"line_number":311,"context_line":"            mock_lock, scope)"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"        self.assertEqual(ret, None)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    @mock.patch(\u0027tripleo_common.utils.locks.threadinglock.ThreadingLock\u0027,"},{"line_number":316,"context_line":"                name\u003d\u0027mock_lock\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"0f7c9db4_3642c55f","line":313,"range":{"start_line":313,"start_character":13,"end_line":313,"end_character":24},"updated":"2022-10-31 02:15:29.000000000","message":"use assertIsNone","commit_id":"e13b0b734e257d678898f8ac63291a0bd2d82023"},{"author":{"_account_id":30073,"name":"Brendan Shephard","email":"bshephar@bne-home.net","username":"bshephar"},"change_message_id":"8e4d31092f77df98f2cc234f00ba91cd84a747d3","unresolved":false,"context_lines":[{"line_number":310,"context_line":"        ret \u003d image_uploader.RegistrySessionHelper.get_cached_bearer_token("},{"line_number":311,"context_line":"            mock_lock, scope)"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"        self.assertEqual(ret, None)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    @mock.patch(\u0027tripleo_common.utils.locks.threadinglock.ThreadingLock\u0027,"},{"line_number":316,"context_line":"                name\u003d\u0027mock_lock\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"755feb9f_e1e964b5","line":313,"range":{"start_line":313,"start_character":13,"end_line":313,"end_character":24},"in_reply_to":"0f7c9db4_3642c55f","updated":"2022-10-31 04:11:46.000000000","message":"Done","commit_id":"e13b0b734e257d678898f8ac63291a0bd2d82023"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"31123125866e523a8c60c195a20de0edae9c10e3","unresolved":true,"context_lines":[{"line_number":320,"context_line":""},{"line_number":321,"context_line":"        resp \u003d {\"fakeimage\": {"},{"line_number":322,"context_line":"            \u0027token\u0027: \u0027blah\u0027,"},{"line_number":323,"context_line":"            \u0027expires_in\u0027: expiry_time,"},{"line_number":324,"context_line":"            \u0027issued_at\u0027: \u00272022-10-17T23:45:09.306Z\u0027}"},{"line_number":325,"context_line":"        }"},{"line_number":326,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"502cabfd_1f220ba3","line":323,"range":{"start_line":323,"start_character":26,"end_line":323,"end_character":37},"updated":"2022-10-31 02:15:29.000000000","message":"this should be an integer representing how long the token is valid.","commit_id":"e13b0b734e257d678898f8ac63291a0bd2d82023"},{"author":{"_account_id":30073,"name":"Brendan Shephard","email":"bshephar@bne-home.net","username":"bshephar"},"change_message_id":"8e4d31092f77df98f2cc234f00ba91cd84a747d3","unresolved":false,"context_lines":[{"line_number":320,"context_line":""},{"line_number":321,"context_line":"        resp \u003d {\"fakeimage\": {"},{"line_number":322,"context_line":"            \u0027token\u0027: \u0027blah\u0027,"},{"line_number":323,"context_line":"            \u0027expires_in\u0027: expiry_time,"},{"line_number":324,"context_line":"            \u0027issued_at\u0027: \u00272022-10-17T23:45:09.306Z\u0027}"},{"line_number":325,"context_line":"        }"},{"line_number":326,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"e6c60f61_0190219a","line":323,"range":{"start_line":323,"start_character":26,"end_line":323,"end_character":37},"in_reply_to":"502cabfd_1f220ba3","updated":"2022-10-31 04:11:46.000000000","message":"Done","commit_id":"e13b0b734e257d678898f8ac63291a0bd2d82023"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"2a8b75ff6ec119e492cdde9d96e54a98b87dd15a","unresolved":true,"context_lines":[{"line_number":246,"context_line":"    @mock.patch(\u0027tripleo_common.utils.locks.threadinglock.ThreadingLock\u0027,"},{"line_number":247,"context_line":"                name\u003d\u0027mock_lock\u0027)"},{"line_number":248,"context_line":"    def test_get_cached_bearer_token_expired(self, mock_lock):"},{"line_number":249,"context_line":"        issued \u003d datetime.datetime.now(tzlocal()) + datetime.timedelta("},{"line_number":250,"context_line":"            minutes\u003d1"},{"line_number":251,"context_line":"        )"},{"line_number":252,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"14c52fa5_3600ae4b","line":249,"range":{"start_line":249,"start_character":50,"end_line":249,"end_character":51},"updated":"2022-11-01 04:03:06.000000000","message":"shouldn\u0027t this be - instead of +, because you are simulating the case when the token was issued 1 minute ago and expired 1 second after that ?","commit_id":"6c290ff70a46e79cb66a6ad4cafc345cce741377"},{"author":{"_account_id":30073,"name":"Brendan Shephard","email":"bshephar@bne-home.net","username":"bshephar"},"change_message_id":"45713d59d7a87b7c03982c2ae2e159db7251195d","unresolved":false,"context_lines":[{"line_number":246,"context_line":"    @mock.patch(\u0027tripleo_common.utils.locks.threadinglock.ThreadingLock\u0027,"},{"line_number":247,"context_line":"                name\u003d\u0027mock_lock\u0027)"},{"line_number":248,"context_line":"    def test_get_cached_bearer_token_expired(self, mock_lock):"},{"line_number":249,"context_line":"        issued \u003d datetime.datetime.now(tzlocal()) + datetime.timedelta("},{"line_number":250,"context_line":"            minutes\u003d1"},{"line_number":251,"context_line":"        )"},{"line_number":252,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"dbe295e2_4ee82e35","line":249,"range":{"start_line":249,"start_character":50,"end_line":249,"end_character":51},"in_reply_to":"14c52fa5_3600ae4b","updated":"2022-11-01 05:54:01.000000000","message":"Yeah, you\u0027re right. It should be.","commit_id":"6c290ff70a46e79cb66a6ad4cafc345cce741377"}]}
