Skip to content

fix: forward all Webhook fields to ad-hoc webhooks#963

Open
vdusek wants to merge 7 commits into
masterfrom
fix/webhook-adhoc-dropped-fields
Open

fix: forward all Webhook fields to ad-hoc webhooks#963
vdusek wants to merge 7 commits into
masterfrom
fix/webhook-adhoc-dropped-fields

Conversation

@vdusek

@vdusek vdusek commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Ad-hoc Webhooks passed to Actor.start() / call() / call_task() silently dropped idempotency_key, ignore_ssl_errors, and do_not_retry. Both the ad-hoc and Actor.add_webhook() paths now forward fields straight off the Webhook instance 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.

@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Jun 11, 2026
@vdusek vdusek self-assigned this Jun 11, 2026
@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.48%. Comparing base (5653a22) to head (d6b0008).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/apify/_actor.py 25.00% 3 Missing ⚠️
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     
Flag Coverage Δ
e2e 36.14% <20.00%> (-0.02%) ⬇️
integration 57.15% <20.00%> (-0.01%) ⬇️
unit 79.21% <40.00%> (-0.14%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek vdusek changed the title fix: warn when ad-hoc webhooks drop unsupported Webhook fields fix: forward idempotency_key, ignore_ssl_errors and do_not_retry in ad-hoc webhooks Jun 11, 2026
@github-actions github-actions Bot added this to the 142nd sprint - Tooling team milestone Jun 12, 2026
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label Jun 12, 2026
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>
@vdusek vdusek force-pushed the fix/webhook-adhoc-dropped-fields branch from 7825809 to f66a2e2 Compare June 16, 2026 14:37
@vdusek vdusek changed the title fix: forward idempotency_key, ignore_ssl_errors and do_not_retry in ad-hoc webhooks fix: forward all Webhook fields to ad-hoc webhooks Jun 16, 2026
@vdusek vdusek requested a review from Pijukatel June 16, 2026 15:04
@vdusek vdusek marked this pull request as ready for review June 16, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants