From 00bc5f24c7793cbab4becdb21eff55d8ae769716 Mon Sep 17 00:00:00 2001 From: ayoubdiourin7 Date: Wed, 2 Sep 2026 15:48:55 +0200 Subject: [PATCH 1/2] Stop sending is_markdown when filing bugs, BMO's POST /bug rejects it with a 400 --- libs/hackbot-runtime/hackbot_runtime/actions/bugzilla.py | 1 - .../hackbot_runtime/actions/handlers/bugzilla_handler.py | 7 ++++++- libs/hackbot-runtime/tests/test_bugzilla_actions.py | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/libs/hackbot-runtime/hackbot_runtime/actions/bugzilla.py b/libs/hackbot-runtime/hackbot_runtime/actions/bugzilla.py index 0cd5d4d2e9..1c31fc8d7d 100644 --- a/libs/hackbot-runtime/hackbot_runtime/actions/bugzilla.py +++ b/libs/hackbot-runtime/hackbot_runtime/actions/bugzilla.py @@ -226,7 +226,6 @@ async def create_bug( "summary": summary, "version": version, "description": description, - "is_markdown": True, } for k, v in (extra or {}).items(): body.setdefault(k, v) diff --git a/libs/hackbot-runtime/hackbot_runtime/actions/handlers/bugzilla_handler.py b/libs/hackbot-runtime/hackbot_runtime/actions/handlers/bugzilla_handler.py index 1cd875730f..82e5e1f939 100644 --- a/libs/hackbot-runtime/hackbot_runtime/actions/handlers/bugzilla_handler.py +++ b/libs/hackbot-runtime/hackbot_runtime/actions/handlers/bugzilla_handler.py @@ -143,8 +143,13 @@ async def apply(self, params: dict[str, Any], ctx: ApplyContext) -> ActionResult class CreateBugHandler: async def apply(self, params: dict[str, Any], ctx: ApplyContext) -> ActionResult: + # TEMPORARY: BMO's POST /bug rejects `is_markdown` with a 400 Bad + # Request. `create_bug` no longer records it, but this strip is needed + # to apply actions recorded before that change. Delete it once no + # pending/failed `bugzilla.create_bug` row still carries the flag. + body = {k: v for k, v in params.items() if k != "is_markdown"} try: - data = _request("POST", "bug", params) + data = _request("POST", "bug", body) except Exception as exc: log.exception("Failed to create bug: %s", params.get("summary")) return ActionResult.failed(str(exc)) diff --git a/libs/hackbot-runtime/tests/test_bugzilla_actions.py b/libs/hackbot-runtime/tests/test_bugzilla_actions.py index f9bccc86ac..02c1e969f5 100644 --- a/libs/hackbot-runtime/tests/test_bugzilla_actions.py +++ b/libs/hackbot-runtime/tests/test_bugzilla_actions.py @@ -58,7 +58,8 @@ async def test_create_bug_merges_extra_top_level_wins(): body = rec.actions[0]["params"] assert body["severity"] == "S3" assert body["product"] == "Core" # explicit arg wins over extra - assert body["is_markdown"] is True + # BMO's POST /bug rejects `is_markdown` with a 400, so it is never recorded. + assert "is_markdown" not in body async def test_handlers_return_confirmation_string(): From e9fd68526d8cec386054db241ea5e23772a8e90b Mon Sep 17 00:00:00 2001 From: ayoubdiourin7 Date: Thu, 3 Sep 2026 09:41:48 +0200 Subject: [PATCH 2/2] Remove obsolete is_markdown compatibility handling --- .../hackbot_runtime/actions/handlers/bugzilla_handler.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libs/hackbot-runtime/hackbot_runtime/actions/handlers/bugzilla_handler.py b/libs/hackbot-runtime/hackbot_runtime/actions/handlers/bugzilla_handler.py index 82e5e1f939..1cd875730f 100644 --- a/libs/hackbot-runtime/hackbot_runtime/actions/handlers/bugzilla_handler.py +++ b/libs/hackbot-runtime/hackbot_runtime/actions/handlers/bugzilla_handler.py @@ -143,13 +143,8 @@ async def apply(self, params: dict[str, Any], ctx: ApplyContext) -> ActionResult class CreateBugHandler: async def apply(self, params: dict[str, Any], ctx: ApplyContext) -> ActionResult: - # TEMPORARY: BMO's POST /bug rejects `is_markdown` with a 400 Bad - # Request. `create_bug` no longer records it, but this strip is needed - # to apply actions recorded before that change. Delete it once no - # pending/failed `bugzilla.create_bug` row still carries the flag. - body = {k: v for k, v in params.items() if k != "is_markdown"} try: - data = _request("POST", "bug", body) + data = _request("POST", "bug", params) except Exception as exc: log.exception("Failed to create bug: %s", params.get("summary")) return ActionResult.failed(str(exc))