Skip to content

[BUG]: Gateway activation/deactivation does not update prompts and resourcesΒ #2212

@rakdutta

Description

@rakdutta

🐞 / ✨ Issue Summary

Gateway activation and deactivation currently update only associated tools, leaving prompts and resources out of sync. Additionally, the admin UI uses an outdated property to display gateway status, and unit tests do not cover these gaps.

πŸ“Œ Problem Description

When a gateway is activated or deactivated:

  • Prompts and resources linked to the gateway do not have their states updated.
  • This causes inconsistent availability of gateway-dependent assets.
  • The admin UI may display an incorrect gateway status due to use of the isActive property instead of enabled.
  • Existing unit tests do not validate prompt and resource state changes.

🎯 Expected Behavior

  • Gateway activation/deactivation should update the state of:
    • Tools
    • Prompts
    • Resources
  • Gateway status should be accurately reflected in the admin UI.
  • Unit tests should validate state propagation across all associated entities.

πŸ›  Proposed Solution

  • Extend gateway state handling to update prompts and resources in addition to tools.
  • Use PromptService and ResourceService within GatewayService for managing state updates.
  • Invalidate prompt and resource caches after batch updates.
  • Update frontend to rely on the enabled property for gateway status display.
  • Enhance unit tests with appropriate mocks and assertions for the new services.

πŸ§ͺ Testing Plan

  • Add/update unit tests to verify:
    • Tool, prompt, and resource state updates during gateway activation/deactivation
    • Correct interaction with PromptService and ResourceService
  • Validate admin UI correctly reflects gateway state.

βœ… Acceptance Criteria

  • Gateway activation/deactivation updates tools, prompts, and resources consistently
  • Prompt and resource caches are invalidated after state changes
  • Admin UI uses enabled to display gateway status
  • Unit tests cover tools, prompts, and resources state transitions
  • No regression in existing gateway functionality

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions