Skip to content

Remove webhook polling fallback in cloud adapter#997

Merged
jnunemaker merged 3 commits into
mainfrom
remove-webhook-polling
May 11, 2026
Merged

Remove webhook polling fallback in cloud adapter#997
jnunemaker merged 3 commits into
mainfrom
remove-webhook-polling

Conversation

@jnunemaker
Copy link
Copy Markdown
Collaborator

@jnunemaker jnunemaker commented May 11, 2026

Summary

  • Use the local adapter for reads when sync_method is :webhook, so webhook-configured instances stop polling entirely
  • Simplify setup_sync to a single 10s default sync_interval (the dual webhook/poll default is no longer needed)
  • Trim Poller#jitter back to plain rand since the capped jitter only mattered for the large webhook interval
  • Update specs to reflect that webhook mode no longer triggers polling requests, and tighten assertions to have_been_requested

Test plan

  • `bundle exec rspec spec/flipper/cloud/configuration_spec.rb spec/flipper/cloud/dsl_spec.rb spec/flipper/cloud/middleware_spec.rb spec/flipper_spec.rb`
  • `bundle exec rake`

🤖 Generated with Claude Code

jnunemaker and others added 2 commits May 11, 2026 09:20
When sync_method is :webhook, use the local adapter for reads instead of
the poll adapter so we don't poll at all. Simplifies the sync_interval
setup to a single 10s default and trims jitter back to rand. Updates
specs to reflect that webhook mode no longer triggers polling requests.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@jnunemaker jnunemaker self-assigned this May 11, 2026
The stub_request_for_token helper was relaxed in 73d18be to a URL pattern
that matched with or without the _cb param, so nothing verified that the
webhook still triggers a cache-busted sync. Tighten the regex to require
both exclude_gate_names=true and _cb=<digits> (in any order, since WebMock
normalizes query params alphabetically) so every webhook test fails if
cache busting regresses.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@jnunemaker jnunemaker merged commit 50a8207 into main May 11, 2026
46 checks passed
@jnunemaker jnunemaker deleted the remove-webhook-polling branch May 11, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant