fix: clarify webhook debug endpoint behavior#33597
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the webhook debug endpoint's behavior by providing a clear error response when a debug call is made without an active Variable Inspector listener. Previously, such calls might have resulted in a misleading success response despite no workflow execution. The change now returns a 409 Conflict status with an informative message and the correct execution URL, improving user experience and preventing confusion about the debug endpoint's purpose. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-03-17 13:07:36.663862004 +0000
+++ /tmp/pyrefly_pr.txt 2026-03-17 13:07:27.715841781 +0000
@@ -2200,17 +2200,21 @@
ERROR `SimpleNamespace` is not assignable to attribute `request` with type `Request` [bad-assignment]
--> tests/unit_tests/controllers/trigger/test_webhook.py:12:22
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:72:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:73:16
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:83:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:84:16
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:100:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:101:16
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:124:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:122:16
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:135:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:123:16
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:152:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:146:16
+ERROR Cannot index into `Response` [bad-index]
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:157:16
+ERROR Cannot index into `Response` [bad-index]
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:174:16
ERROR Object of class `ModuleType` has no attribute `web_ns` [missing-attribute]
--> tests/unit_tests/controllers/web/test_message_list.py:41:9
ERROR Object of class `ModuleType` has no attribute `WebApiResource` [missing-attribute]
|
1 similar comment
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-03-17 13:07:36.663862004 +0000
+++ /tmp/pyrefly_pr.txt 2026-03-17 13:07:27.715841781 +0000
@@ -2200,17 +2200,21 @@
ERROR `SimpleNamespace` is not assignable to attribute `request` with type `Request` [bad-assignment]
--> tests/unit_tests/controllers/trigger/test_webhook.py:12:22
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:72:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:73:16
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:83:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:84:16
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:100:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:101:16
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:124:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:122:16
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:135:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:123:16
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:152:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:146:16
+ERROR Cannot index into `Response` [bad-index]
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:157:16
+ERROR Cannot index into `Response` [bad-index]
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:174:16
ERROR Object of class `ModuleType` has no attribute `web_ns` [missing-attribute]
--> tests/unit_tests/controllers/web/test_message_list.py:41:9
ERROR Object of class `ModuleType` has no attribute `WebApiResource` [missing-attribute]
|
There was a problem hiding this comment.
Code Review
This pull request improves the webhook debug endpoint by returning a 409 Conflict response when no debug listener is active, which is a great clarification of its behavior. The changes are well-implemented and include a new test case to cover this scenario. I have one suggestion to make the new test even more robust.
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-03-17 13:12:45.478621402 +0000
+++ /tmp/pyrefly_pr.txt 2026-03-17 13:12:36.782508218 +0000
@@ -2200,17 +2200,23 @@
ERROR `SimpleNamespace` is not assignable to attribute `request` with type `Request` [bad-assignment]
--> tests/unit_tests/controllers/trigger/test_webhook.py:12:22
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:72:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:73:16
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:83:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:84:16
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:100:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:101:16
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:124:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:122:16
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:135:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:123:16
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:152:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:127:16
+ERROR Cannot index into `Response` [bad-index]
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:150:16
+ERROR Cannot index into `Response` [bad-index]
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:161:16
+ERROR Cannot index into `Response` [bad-index]
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:178:16
ERROR Object of class `ModuleType` has no attribute `web_ns` [missing-attribute]
--> tests/unit_tests/controllers/web/test_message_list.py:41:9
ERROR Object of class `ModuleType` has no attribute `WebApiResource` [missing-attribute]
|
1 similar comment
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-03-17 13:12:45.478621402 +0000
+++ /tmp/pyrefly_pr.txt 2026-03-17 13:12:36.782508218 +0000
@@ -2200,17 +2200,23 @@
ERROR `SimpleNamespace` is not assignable to attribute `request` with type `Request` [bad-assignment]
--> tests/unit_tests/controllers/trigger/test_webhook.py:12:22
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:72:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:73:16
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:83:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:84:16
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:100:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:101:16
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:124:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:122:16
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:135:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:123:16
ERROR Cannot index into `Response` [bad-index]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:152:16
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:127:16
+ERROR Cannot index into `Response` [bad-index]
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:150:16
+ERROR Cannot index into `Response` [bad-index]
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:161:16
+ERROR Cannot index into `Response` [bad-index]
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:178:16
ERROR Object of class `ModuleType` has no attribute `web_ns` [missing-attribute]
--> tests/unit_tests/controllers/web/test_message_list.py:41:9
ERROR Object of class `ModuleType` has no attribute `WebApiResource` [missing-attribute]
|
Important
Fixes #<issue number>.Summary
Fixes #33595
Return an explicit conflict response when the webhook debug URL is called without an active debug listener, and include the published execution URL so callers can use the correct endpoint for workflow execution.
This prevents a misleading success response when the request cannot produce a workflow run.
Screenshots
Checklist
make lintandmake type-check(backend) andcd web && npx lint-staged(frontend) to appease the lint gods