fix: forward all Webhook fields to ad-hoc webhooks#963
Open
vdusek wants to merge 7 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #963 +/- ##
==========================================
- Coverage 90.60% 90.48% -0.12%
==========================================
Files 49 49
Lines 3128 3132 +4
==========================================
Hits 2834 2834
- Misses 294 298 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vdusek
added a commit
to apify/apify-docs
that referenced
this pull request
Jun 16, 2026
…ion (#2640) - The `WebhookRepresentation` schema (items of the Base64-encoded `webhooks` query parameter on the run/build endpoints) declared only `eventTypes`, `requestUrl`, `payloadTemplate` and `headersTemplate`, but the platform accepts and honors more fields for ad-hoc webhooks: the run-start handler spreads each webhook object into the same `insertWebhook` path used by the create-webhook endpoint, including the `idempotencyKey` dedup logic. - This adds the missing `idempotencyKey`, `ignoreSslErrors` and `doNotRetry` properties to the schema, so generated API clients (e.g. `apify-client-python`) stop dropping them. - The Python client and SDK changes that build on this: - apify/apify-sdk-python#963 - apify/apify-client-python#855
vdusek
added a commit
to apify/apify-client-python
that referenced
this pull request
Jun 16, 2026
This PR updates the auto-generated Pydantic models and TypedDicts based on OpenAPI specification changes in [apify-docs PR #2640](apify/apify-docs#2640). On top of the regenerated models, it fixes a related bug: ad-hoc webhooks passed to `start()` / `call()` silently dropped `idempotency_key`, `ignore_ssl_errors` and `do_not_retry`. `WebhookRepresentation` declared only the four templating fields, and `encode_webhooks_to_base64` keeps only declared fields, so these three never reached the platform. The platform accepts and honors all three for ad-hoc webhooks (verified in apify-core: the run-start handler feeds them into the same webhook-creation path as the create-webhook endpoint, including the `idempotencyKey` dedup). What changed: - The regenerated models add the three fields to `WebhookRepresentation` and both webhook-representation typed dicts (snake_case + camelCase). - Reworks the `WebhookCreate` / dict projection in `encode_webhooks_to_base64` to filter by the fields `WebhookRepresentation` declares, instead of hand-listing them. New ad-hoc fields now flow through automatically, so this class of silent-drop bug cannot recur. Unblocks apify/apify-sdk-python#963, which forwards these fields from the SDK `Webhook` dataclass. --------- Co-authored-by: Vlada Dusek <v.dusek96@gmail.com>
7825809 to
f66a2e2
Compare
Webhook fields to ad-hoc webhooks
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.
Ad-hoc
Webhooks passed toActor.start()/call()/call_task()silently droppedidempotency_key,ignore_ssl_errors, anddo_not_retry. Both the ad-hoc andActor.add_webhook()paths now forward fields straight off theWebhookinstance instead of hand-listing them, so the drop is fixed and any future field flows through automatically. Builds on apify/apify-docs#2640 and apify/apify-client-python#854.