-
Notifications
You must be signed in to change notification settings - Fork 457
new api to get triggers #11021
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
new api to get triggers #11021
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
test/WebJobs.Script.Tests.Integration/Management/FunctionsSyncManagerTests.cs
Outdated
Show resolved
Hide resolved
af0f59e
to
eaf25df
Compare
src/WebJobs.Script.WebHost/Management/TriggersOperationResult.cs
Outdated
Show resolved
Hide resolved
test/WebJobs.Script.Tests.Integration/Management/FunctionsSyncManagerTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
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 introduces a new GET API endpoint (admin/host/triggers) for retrieving trigger payloads to support the Functions Deployment Manager and refactors the result types used for trigger operations. Key changes include:
- Renaming SyncTriggersResult to TriggersOperationResult and updating associated tests.
- Adding a new TriggersResult class to encapsulate the triggers payload.
- Incorporating a new GetTriggersAsync method in IFunctionsSyncManager and its implementation in FunctionsSyncManager.
- Creating a new controller endpoint with appropriate authorization and logging for trigger retrieval.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
test/WebJobs.Script.Tests/FunctionsSyncServiceTests.cs | Updated test to expect TriggersOperationResult instead of SyncTriggersResult. |
test/WebJobs.Script.Tests/Controllers/Admin/KeysControllerTests.cs | Updated setup to use the new TriggersOperationResult. |
test/WebJobs.Script.Tests.Integration/* | Modified several integration tests to use the new TriggersOperationResult. |
test/WebJobs.Script.Tests.Integration/Management/FunctionsSyncManagerTests.cs | Added new test coverage for the GetTriggersAsync API. |
src/WebJobs.Script/Diagnostics/MetricEventNames.cs | Added new metric constant for GetTriggersInvoked. |
src/WebJobs.Script.WebHost/Management/TriggersResult.cs | Introduced a new class to return trigger payload content. |
src/WebJobs.Script.WebHost/Management/TriggersOperationResult.cs | Renamed and updated result type documentation. |
src/WebJobs.Script.WebHost/Management/IFunctionsSyncManager.cs | Updated interface to support the new GetTriggersAsync method. |
src/WebJobs.Script.WebHost/Management/FunctionsSyncManager.cs | Implemented GetTriggersAsync and refactored TrySyncTriggersAsync to return the new result type. |
src/WebJobs.Script.WebHost/Controllers/HostController.cs | Added a new endpoint for retrieving triggers with proper authorization and metrics logging. |
…ow ex; Added comment on why string content
Issue describing the changes in this PR
New GET admin/host/triggers API needed for Functions Deployment Manager will return sync trigger payload.
It is using ResourceContainsSecrets Attribute.
Pull request checklist
IMPORTANT: Currently, changes must be backported to the
in-proc
branch to be included in Core Tools and non-Flex deployments.in-proc
branch is not requiredrelease_notes.md