Skip to content

fix(gateway): update configuration before hot reload#384

Open
Pnkcaht wants to merge 2 commits intodocker:mainfrom
Pnkcaht:fix/config-hot-reload-383
Open

fix(gateway): update configuration before hot reload#384
Pnkcaht wants to merge 2 commits intodocker:mainfrom
Pnkcaht:fix/config-hot-reload-383

Conversation

@Pnkcaht
Copy link
Copy Markdown
Contributor

@Pnkcaht Pnkcaht commented Feb 5, 2026

What I did

  • Fixed config hot reload to keep the gateway state consistent
  • Updated the gateway configuration before applying the reload
  • Added a note documenting that reloadConfiguration only applies the given config and does not mutate global state

Related issue

What changes now

  • Servers added or removed via hot reload are immediately visible to the gateway
  • Server lookups no longer fail with MCP server not found
  • Hot reload behaves the same way as startup

Flow (hot reload)

flowchart TD
    A[Config file updated] --> B[Watcher receives update]
    B --> C[Update g.configuration]
    C --> D[reloadConfiguration]
    D --> E[Tools / prompts / resources reloaded]
    E --> F[Gateway state consistent]
Loading

Signed-off-by: pnkcaht <samzoovsk19@gmail.com>
@Pnkcaht Pnkcaht requested a review from a team as a code owner February 5, 2026 21:57
@chientranthien
Copy link
Copy Markdown

Hi @bobbyhouse can you merge this PR?

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.

Bug: Config not hot reload

2 participants