From 0e6d0c452522b6578b226efb89f297495466383a Mon Sep 17 00:00:00 2001 From: Joe Laverty Date: Mon, 2 Nov 2026 11:51:25 -0500 Subject: [PATCH 1/2] fix(migrations): renumber instance_id migration to 209 --- ...ngs.py => 209_add_instance_id_to_instance_settings.py} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename migrations/versions/{207_add_instance_id_to_instance_settings.py => 209_add_instance_id_to_instance_settings.py} (85%) diff --git a/migrations/versions/207_add_instance_id_to_instance_settings.py b/migrations/versions/209_add_instance_id_to_instance_settings.py similarity index 85% rename from migrations/versions/207_add_instance_id_to_instance_settings.py rename to migrations/versions/209_add_instance_id_to_instance_settings.py index 3bc9531f24..2c962de64e 100644 --- a/migrations/versions/207_add_instance_id_to_instance_settings.py +++ b/migrations/versions/209_add_instance_id_to_instance_settings.py @@ -1,7 +1,7 @@ """Add instance_id to instance_settings, to identify the install in usage reports. -Revision ID: 207 -Revises: 206 +Revision ID: 209 +Revises: 208 Create Date: 2026-11-01 """ @@ -10,8 +10,8 @@ import sqlalchemy as sa from alembic import op -revision: str = '207' -down_revision: str | None = '206' +revision: str = '209' +down_revision: str | None = '208' branch_labels: str | Sequence[str] | None = None depends_on: str | Sequence[str] | None = None From 2495a88908b201166ad486dfac9f9dc643e3e5ac Mon Sep 17 00:00:00 2001 From: openhands Date: Mon, 2 Nov 2026 17:45:24 +0000 Subject: [PATCH 2/2] test(licensing): stop forcing propagation in usage report log test The openhands logger is configured with propagate=False, so pytest's caplog attaches its handler directly to it. Setting propagate=True mid-test also sent each record to the root logger, which holds the same caplog handler, so every warning was captured twice and the single-record unpacking failed. Co-authored-by: openhands --- tests/unit/server/licensing/test_usage_report.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/unit/server/licensing/test_usage_report.py b/tests/unit/server/licensing/test_usage_report.py index d78058fbe8..d875431fc9 100644 --- a/tests/unit/server/licensing/test_usage_report.py +++ b/tests/unit/server/licensing/test_usage_report.py @@ -316,10 +316,7 @@ async def test_posts_the_report_to_customer_center(): ], ids=['revoked-key', 'bad-field', 'server-error', 'unreachable'], ) -async def test_logs_a_failed_report_without_raising( - response, logged, caplog, monkeypatch -): - monkeypatch.setattr(openhands_logger, 'propagate', True) +async def test_logs_a_failed_report_without_raising(response, logged, caplog): customer_center = FakeCustomerCenter(response) with caplog.at_level(logging.WARNING, logger=openhands_logger.name):