Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark SyncTriggers [RequiresRunningHost] #9904

Closed
mathewc opened this issue Feb 28, 2024 · 0 comments
Closed

Mark SyncTriggers [RequiresRunningHost] #9904

mathewc opened this issue Feb 28, 2024 · 0 comments

Comments

@mathewc
Copy link
Member

mathewc commented Feb 28, 2024

The SyncTriggers admin operation is a WebHost level API that currently doesn't require a running ScriptHost (see API here - it's not marked [RequiresRunningHost]). Historically when we only had file based function.json indexing that hasn't been a problem, because the metadata provider didn't requires a running host - it just indexed function directories.

With the recent addition of worker indexing, we need to verify that those assumptions still hold, and ensure that the SyncTriggers behavior is correct in cases where the worker can't start. FunctionsSyncManager uses the WebHost metadata provider here to get metadata. If this metadata provider can't return reliable information (e.g. worker can't start) it needs to hard fail - not return empty, since the latter could result in oscillating sync operations in the case of transient failures.

Similarly, Functions also supports custom IFunctionProvider implementations that can be provided by extensions when they're registered. Metadata from these providers requires a running host, since they're only added when the inner host has started.

In summary, we need to spend time exploring these worker indexing scenarios to see if things are behaving the way we expect. However, I do think we should just mark the operation RequiresRunningHost.

@mathewc mathewc changed the title Verify Worker Indexing SyncTriggers Behavior Make SyncTriggers RequiresRunningHost Mar 19, 2024
@mathewc mathewc changed the title Make SyncTriggers RequiresRunningHost Mark SyncTriggers [RequiresRunningHost] Mar 19, 2024
@mathewc mathewc closed this as completed Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants