Skip to content

gateway_servers_actions_view #429

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

Merged
merged 6 commits into from
Jul 14, 2025

Conversation

TS0713
Copy link
Collaborator

@TS0713 TS0713 commented Jul 14, 2025

🐛 Bug-fix PR


📌 Summary

💡 Fix Description

  • Gateway Servers will show status one of the following - [ Active (Green), Inactive (Red), Offline (Yellow)]
  • Updated the test case - test_gateway_services.py
  • Updated the version to use semantic version as in init.py (wherever version is being used)
  • Updated isActive to use reachable and enabled

🧪 Verification

Check Command Status
Unit tests make test pass
Unit tests make black pass
Unit tests make lint-web pass

📐 MCP Compliance (if relevant)

  • Matches current MCP spec
  • No breaking change to MCP clients

✅ Checklist

  • Code formatted (make black isort pre-commit)
  • No secrets/credentials committed

Signed-off-by: Satya tsp.0713@gmail.com

@crivetimihai
Copy link
Member

Hi @TS0713 - the code changed quite a bit since the PR got started, could you please rebase & retest the changes, and rename the PR? Thanks!

@TS0713 TS0713 changed the title Modified few things gateway_servers_actions_view Jul 14, 2025
@crivetimihai
Copy link
Member

Passes

  • make test
  • make doctest
  • make lint-web
  • make flake8
  • make pylint fails make pylint, please address this:
************* Module mcpgateway.services.gateway_service
mcpgateway/services/gateway_service.py:403:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)

Fails:

  • ❌ Fails make smoketest
🛂  Registering gateway                                                                                                   ───────────────────────
10:11:32  DEBUG    Starting new HTTPS connection (1): localhost:4444
10:11:32  DEBUG    https://localhost:4444 "POST /gateways HTTP/1.1" 502 42
10:11:32  INFO     → POST /gateways 502 49 ms
10:11:32  DEBUG      ↳ response: {"message":"Unable to connect to gateway"}
10:11:32  ERROR    ❌  Failure: Gateway registration failed 502: {'message': 'Unable to connect to gateway'}
Traceback (most recent call last):
  File "/home/cmihai/github/mcp-context-forge/./smoketest.py", line 422, in main
    gid = fn()  # type: ignore[func-returns-value]
          ^^^^
  File "/home/cmihai/github/mcp-context-forge/./smoketest.py", line 322, in step_6_register_gateway
    raise RuntimeError(f"Gateway registration failed {r.status_code}: {msg}")
RuntimeError: Gateway registration failed 502: {'message': 'Unable to connect to gateway'}

TS0713 and others added 4 commits July 14, 2025 09:49
Signed-off-by: Satya <tsp.0713@gmail.com>
Signed-off-by: Satya <tsp.0713@gmail.com>
Signed-off-by: Rakhi Dutta <rakhibiswas@yahoo.com>
Signed-off-by: Satya <tsp.0713@gmail.com>
@TS0713 TS0713 force-pushed the gateway_servers_actions_view branch from d19e160 to 2b335e6 Compare July 14, 2025 09:50
Copy link
Collaborator

@madhav165 madhav165 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TS0713 Tested the PR

  1. View Gateway working in Inactive and Offline states
  2. Status in View Gateway popup not changing with Gateway status - always showing Inactive.

Please check status in popup.

@kevalmahajan
Copy link
Member

@madhav165 Status in gateway popup is working fine. Just tested it. Could you please check in incognito once or try clearing cache.

@madhav165
Copy link
Collaborator

@kevalmahajan Yes, looks like a browser cache issue. Looks fine.

@crivetimihai Looks good.

@crivetimihai
Copy link
Member

Thanks, will fix the whitespace issue and merge.

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
@crivetimihai
Copy link
Member

Ran: make autoflake isort black pre-commit to fix flake8 issues.

Tested with:

  • make flake8 pylint
  • make test doctest
  • make venv install intall-dev serve
    Tested UI (added new server, enable, disable, test a tool)

Copy link
Member

@crivetimihai crivetimihai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works locally, merging after github actions targets run.

@crivetimihai crivetimihai merged commit a11fa60 into IBM:main Jul 14, 2025
22 of 23 checks passed
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]: API incorrectly shows version, use semantic version from __init__
5 participants