WIP: webhooks: remove subject-based subscription surface (v0.7.0)#27
Closed
makegov-hal[bot] wants to merge 1 commit into
Closed
WIP: webhooks: remove subject-based subscription surface (v0.7.0)#27makegov-hal[bot] wants to merge 1 commit into
makegov-hal[bot] wants to merge 1 commit into
Conversation
Tango is dropping subject-based webhook subscriptions (see makegov/tango#2267). This PR mirrors the removal in the Python SDK: list/get/create/update/delete_webhook_subscription methods, the `tango webhooks subscriptions` CLI group, and the subject fields on event-type / subscription / sample-payload models, plus matching tests + docs. Endpoint CRUD, signing helpers, `WebhookReceiver`, `test_delivery`, `get_webhook_sample_payload`, and `list_webhook_event_types` are untouched. SemVer-major (0.6.0 → 0.7.0). Closes makegov/tango#2275 Part of makegov/tango#2267
infinityplusone
added a commit
that referenced
this pull request
May 12, 2026
Folds in the work from PR #27 (issue-2275-drop-subjects) plus three cleanup-batch carry-overs from tango's `dogpile/api-cleanup-batch`: - #2256: add `endpoint` kwarg to create_webhook_alert (multi-endpoint accounts can now use the convenience wrapper) - #2254: remove `ordering` kwarg from list_notices and list_protests (server rejects every value) - #2252: switch test_webhook_delivery to canonical `endpoint` body key Closes makegov/tango#2275 — part of makegov/tango#2267. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mirror of makegov/tango#2267 in the Python SDK — removes subject-based webhook subscriptions.
list_/get_/create_/update_/delete_webhook_subscriptionmethods onTangoClientWebhookSubscriptionandWebhookSubjectTypeDefinitiondataclasses (and theirtangopackage re-exports)WebhookEventType/WebhookEventTypesResponse/ sample-payload responsestango webhooks subscriptionsClick subgroup; replaces the no-argsimulatefallback payload with a no-subject shapetest_client.py,test_webhooks_cli.py,test_production_smoke.py) and docs (README.md,docs/WEBHOOKS.md,docs/API_REFERENCE.md)0.6.0→0.7.0(still pre-1.0)Endpoint CRUD, signing helpers,
WebhookReceiver,test_webhook_delivery,get_webhook_sample_payload, andlist_webhook_event_typesare unaffected.Dependency
Must land after the tango API surface change (makegov/tango#2270) ships. Drafted now so it's ready when tango is.
Verification
uv run ruff check tango/— cleanuv run ruff format --check tango/ tests/test_client.py tests/test_webhooks_cli.py tests/production/test_production_smoke.py— clean (after running formatter ontango/models.py)uv run mypy tango/client.py tango/models.py tango/__init__.py tango/webhooks/cli.py— cleanuv run pytest tests/test_client.py tests/test_webhooks_cli.py tests/test_webhooks_simulate.py tests/test_webhooks_signing.py tests/test_webhooks_receiver.py— 110 passedtests/production/) deliberately not run — would hit live tango, not safe pre-#2270Pre-existing failures (not caused by this PR)
uv run pytest tests/ --ignore=tests/productionshows 21 failures intests/test_models.pyandtests/test_shapes.py. These touch shape/factory machinery I didn't modify (no diff in those files) and reproduce onmainas well. Not addressed here.Pre-existing lint warnings
uv run ruff check .(whole tree) reports 24 errors, all intests/test_shapes.py— pre-existing.Closes makegov/tango#2275 — part of makegov/tango#2267.
~ Hal