Skip to content

preventing SyncTriggers on placeholder hosts - #11874

Merged
Brett Samblanet (brettsam) merged 3 commits into
devfrom
brettsam/synctriggers-warmup-fix
Jul 16, 2026
Merged

Brett Samblanet (brettsam) merged 3 commits into
devfrom
brettsam/synctriggers-warmup-fix

Conversation

@brettsam

@brettsam Brett Samblanet (brettsam) commented Jul 16, 2026 •

Copy link
Copy Markdown
Member

Fixes #11873

Certain flows (namely worker specialization failures) could result in a SyncTriggers call being made against a placeholder host. This would result in a Warmup function being sent to the platform and could cause issues with scaling and metadata.

This change checks whether the current host is a placeholder and if so, skip the sync. Previous behavior checked if the environment was a placeholder but did not validate the active host.

Pull request checklist

IMPORTANT: Currently, changes must be backported to the in-proc branch to be included in Core Tools and non-Flex deployments.

  • Backporting to the in-proc branch is not required
    • Otherwise: Link to backporting PR
  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • My changes do not require diagnostic events changes
    • Otherwise: I have added/updated all related diagnostic events and their documentation (Documentation issue linked to PR)
  • I have added all required tests (Unit tests, E2E tests)

Copilot AI review requested due to automatic review settings July 16, 2026 14:52
@brettsam
Brett Samblanet (brettsam) requested a review from a team as a code owner July 16, 2026 14:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR prevents SyncTriggers from publishing placeholder-host trigger metadata (notably the WarmUp function) during the specialization window where placeholder mode has been cleared but the active host is still running the standby configuration, addressing the race described in #11873.

Changes:

  • Add a guard in FunctionsSyncManager.TrySyncTriggersAsync to skip syncing when the active host is still in standby configuration.
  • Add an integration test validating that a placeholder-only WarmUp payload is not published.
  • Add an E2E test reproducing the specialization window and asserting WarmUp is not published.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/WebJobs.Script.WebHost/Management/FunctionsSyncManager.cs Adds standby-host detection to prevent publishing placeholder triggers during specialization windows.
test/WebJobs.Script.Tests.Integration/Management/FunctionsSyncManagerTests.cs Adds an integration test ensuring placeholder WarmUp trigger payload is not published.
test/WebJobs.Script.Tests.Integration/WebHostEndToEnd/SpecializationE2ETests.cs Adds an E2E repro for the specialization race window and validates WarmUp isn’t published.

Comment thread src/WebJobs.Script.WebHost/Management/FunctionsSyncManager.cs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, but left a comment and I think a follow up is required.

Comment thread src/WebJobs.Script.WebHost/Management/FunctionsSyncManager.cs
@brettsam
Brett Samblanet (brettsam) merged commit ce8978f into dev Jul 16, 2026
11 checks passed
@brettsam
Brett Samblanet (brettsam) deleted the brettsam/synctriggers-warmup-fix branch July 16, 2026 21:40
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.

Apps get stuck showing only the placeholder WarmUp function after a deploy (SyncTriggers race during specialization)

4 participants