)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"139462f5c33763edfe6f1f6b28e6c24132ad7bd1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"5f3c4cc7_87f3fda4","updated":"2025-10-22 16:51:05.000000000","message":"Sorry, I see the launchpad link now, it\u0027s right up against the SQA link, so I didn\u0027t initially see it.","commit_id":"8f1b98b6142cde51781aa7e2c26c00b1e1c2566b"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"bde17d452606f05ed1f67f246733ca06ea5fccea","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"14052d29_ff8ea8e6","updated":"2025-10-22 16:50:15.000000000","message":"This is a good catch we should fix soon.\nI have two requests:\n1. Can you add the link to the launch pad bug to the commit message? I.e. Closes-Bug: #2129562 (I\u0027m not doing it now to let zuul finish running on this patch)\n2. Can you add a unit test? I see this code was previously not covered by a unit test, which is likely how we missed it, so adding a unit test would help with future sqlalchemy changes.","commit_id":"8f1b98b6142cde51781aa7e2c26c00b1e1c2566b"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"e2bfbf6548a1e9be36def9f73f8e21011d4d35ab","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"0bcd2815_3728bce7","in_reply_to":"14052d29_ff8ea8e6","updated":"2025-10-23 16:47:52.000000000","message":"Thanks for the quick review. I think we are going to need a functional test to reproduce the error in this bug. I went down the unit test path, and I started needing to mock the internals of oslo_db to get anything meaningful. Something like this runs the wait_for_connection loop, but it\u0027s trivial, because it mocks the engine object.\n\n```\n+    @mock.patch(\u0027octavia.db.api.enginefacade\u0027) # TODO: Mock deeper into this             \n+    @mock.patch(\u0027octavia.controller.worker.v2.controller_worker.\u0027                        \n+                \u0027ControllerWorker.failover_amphora\u0027)                                     \n+    @mock.patch(\u0027octavia.db.repositories.AmphoraHealthRepository.\u0027                       \n+                \u0027get_stale_amphora\u0027)                                                     \n+    @mock.patch(\u0027octavia.db.api.get_session\u0027)                                            \n+    def _test_health_check_wait_for_connection(self, session_mock, get_stale_amp_mock,   \n+                                              failover_mock, enginefacade_mock):         \n+        conf \u003d oslo_fixture.Config(cfg.CONF)                                             \n+        conf.config(group\u003d\"health_manager\", heartbeat_timeout\u003d5)                         \n+        amphora_health \u003d mock.MagicMock()                                                \n+        amphora_health.amphora_id \u003d AMPHORA_ID                                           \n+                                                                                         \n+        get_stale_amp_mock.side_effect \u003d [amphora_health, None]                          \n+                                                                                         \n+        exit_event \u003d threading.Event()                                                   \n+        hm \u003d healthmanager.HealthManager(exit_event)                                     \n+        session_mock.reset_mock()                                                        \n+        mock_session \u003d mock.MagicMock()                                                  \n+        session_mock.return_value \u003d mock_session                                         \n+        get_stale_amp_mock.side_effect \u003d [                                               \n+            db_exc.DBConnectionError]                                                    \n+        self.assertIsNone(hm.health_check())                                             \n\n```\n\nI need to spend more time figuring out how the functional tests are working.","commit_id":"8f1b98b6142cde51781aa7e2c26c00b1e1c2566b"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"def98124c3522f3e2a54197a6864f76f75fc59b9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"d31914ff_601aba8f","updated":"2026-01-15 19:49:43.000000000","message":"LGTM","commit_id":"6fb0d272c78a101fca395afd875241e43318434c"},{"author":{"_account_id":38562,"name":"Richard Cruise","email":"rcruise@redhat.com","username":"rcruise"},"change_message_id":"cc784619908f9f0e51496f53f3e7e6c640ee08d8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"ac5fa4be_df90fee6","updated":"2026-01-15 14:12:10.000000000","message":"Ran the tests and they passed, changes look good","commit_id":"6fb0d272c78a101fca395afd875241e43318434c"},{"author":{"_account_id":29244,"name":"Gregory Thiemonge","email":"gthiemon@redhat.com","username":"gthiemonge"},"change_message_id":"d6578e8fe809930bc41892bc69848e6e6586b08e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"0b787aac_35f3866d","updated":"2026-01-16 09:32:51.000000000","message":"recheck POST_FAILURE","commit_id":"6fb0d272c78a101fca395afd875241e43318434c"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"b0d497dea335b473d543ceca7d7de8c6d3d42b0c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"5108d98d_a6b63b55","updated":"2026-01-15 17:59:02.000000000","message":"thanks all, good to see this land :D","commit_id":"6fb0d272c78a101fca395afd875241e43318434c"}],"octavia/db/api.py":[{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"631a39d7f9cc8fa992b764770aabf2c5d8d6c692","unresolved":true,"context_lines":[{"line_number":70,"context_line":"                conn.execute(select(1))"},{"line_number":71,"context_line":"            down \u003d False"},{"line_number":72,"context_line":"            LOG.debug(\u0027Connection to database re-established.\u0027)"},{"line_number":73,"context_line":"        except Exception:"},{"line_number":74,"context_line":"            retry_interval \u003d cfg.CONF.database.retry_interval"},{"line_number":75,"context_line":"            LOG.exception(\u0027Connection to database failed. Retrying in %s \u0027"},{"line_number":76,"context_line":"                          \u0027seconds.\u0027, retry_interval)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2f5c37_ee09745b","line":73,"updated":"2025-10-22 15:46:50.000000000","message":"Any thoughts on reducing the scope here to `oslo_db.exception.DBConnectionError`?","commit_id":"9803aa3d4cefc4f4335e4064160f76d256345f40"}],"octavia/tests/functional/db/test_api.py":[{"author":{"_account_id":38562,"name":"Richard Cruise","email":"rcruise@redhat.com","username":"rcruise"},"change_message_id":"cc784619908f9f0e51496f53f3e7e6c640ee08d8","unresolved":true,"context_lines":[{"line_number":1,"context_line":"#    Copyright 2026 Red Hat"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":4,"id":"3d939138_2c73cfeb","line":1,"updated":"2026-01-15 14:12:10.000000000","message":"Should a Red Hat copyright be included upstream?","commit_id":"6fb0d272c78a101fca395afd875241e43318434c"}]}
