Synchronize Gateway Activation State Across Tools, Prompts, and Resources#2211
Merged
crivetimihai merged 1 commit intomainfrom Jan 20, 2026
Merged
Synchronize Gateway Activation State Across Tools, Prompts, and Resources#2211crivetimihai merged 1 commit intomainfrom
crivetimihai merged 1 commit intomainfrom
Conversation
0786db8 to
1b61459
Compare
kevalmahajan
approved these changes
Jan 20, 2026
Member
kevalmahajan
left a comment
There was a problem hiding this comment.
Tested and rebased
- The bug with Active virtual servers shown as inactive in the view panel is resolved now.
- The Prompts and Resources toggles active or inactive when the MCP server is toggled, similar to how tool toggles behave.
… resources When a gateway is activated or deactivated, the system now updates the states of all associated prompts and resources in addition to tools. This ensures consistent behavior across all gateway-related entities. Changes: - Add PromptService and ResourceService to GatewayService for state sync - Update prompts and resources state when gateway state changes - Add skip_cache_invalidation parameter to set_prompt_state and set_resource_state for batch operation optimization (consistent with tool_service implementation) - Skip prompt/resource DB queries when only_update_reachable=True to avoid unnecessary DB work during health checks - Fix admin UI to use 'enabled' property instead of 'isActive' for gateway status display - Add unit tests for prompt and resource state synchronization - Add unit test verifying prompts/resources are skipped for reachability-only updates Co-authored-by: rakdutta <rakhibiswas@yahoo.com> Closes #2212 Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
1b61459 to
7df47e3
Compare
crivetimihai
approved these changes
Jan 20, 2026
This was referenced Jan 23, 2026
Closed
kcostell06
pushed a commit
to kcostell06/mcp-context-forge
that referenced
this pull request
Feb 24, 2026
… resources (IBM#2211) When a gateway is activated or deactivated, the system now updates the states of all associated prompts and resources in addition to tools. This ensures consistent behavior across all gateway-related entities. Changes: - Add PromptService and ResourceService to GatewayService for state sync - Update prompts and resources state when gateway state changes - Add skip_cache_invalidation parameter to set_prompt_state and set_resource_state for batch operation optimization (consistent with tool_service implementation) - Skip prompt/resource DB queries when only_update_reachable=True to avoid unnecessary DB work during health checks - Fix admin UI to use 'enabled' property instead of 'isActive' for gateway status display - Add unit tests for prompt and resource state synchronization - Add unit test verifying prompts/resources are skipped for reachability-only updates Closes IBM#2212 Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> Co-authored-by: Mihai Criveti <crivetimihai@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes issue #2212
This pull request enhances the gateway activation and deactivation process by ensuring that prompt and resource states are updated in sync with the gateway state, in addition to tools. It also updates the frontend to use the correct property for gateway status display and improves unit tests to cover these new behaviors.
Gateway state management improvements:
PromptServiceandResourceService, and invalidates their respective caches after batch updates.GatewayServiceclass is updated to instantiate and usePromptServiceandResourceServicefor these state changes. [1] [2]Frontend status display update:
enabledproperty instead ofisActiveto determine and display the gateway's active/inactive status.Unit test coverage enhancements: