You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(format): pre-rebase autoflake + isort + black + ruff format pass
Applies formatter output from the current toolchain to align the branch
with upstream pre-commit hooks (ruff check + formatter, PR #5169) before
rebasing onto main. Absorbs trivial format-only conflicts (f-string
concatenation cleanup, import reordering, isort comment groupers) so the
rebase replays substantive work only.
No semantic changes.
Generated by:
make autoflake isort black
make ruff RUFF_MODE=format
Signed-off-by: Jonathan Springer <jps@s390x.com>
Copy file name to clipboardExpand all lines: mcpgateway/alembic/versions/3f7e9d1a2b4c_a2a_v1_domain_models.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -153,7 +153,7 @@ def upgrade() -> None:
153
153
154
154
conn=op.get_bind()
155
155
agents_with_auth=conn.execute(
156
-
sa.text("SELECT id, auth_type, auth_value, auth_query_params ""FROM a2a_agents ""WHERE auth_type IS NOT NULL ""AND id NOT IN (SELECT a2a_agent_id FROM a2a_agent_auth)")
156
+
sa.text("SELECT id, auth_type, auth_value, auth_query_params FROM a2a_agents WHERE auth_type IS NOT NULL AND id NOT IN (SELECT a2a_agent_id FROM a2a_agent_auth)")
157
157
).fetchall()
158
158
foragentinagents_with_auth:
159
159
# auth_query_params may be a Python dict (from a JSON column);
Copy file name to clipboardExpand all lines: mcpgateway/alembic/versions/77243f5bfce5_add_tool_id_to_a2a_agents.py
+3-5Lines changed: 3 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -47,9 +47,7 @@ def upgrade() -> None:
47
47
48
48
# Fail if tools table doesn't exist - FK requires it
49
49
ifnotinspector.has_table("tools"):
50
-
raiseRuntimeError(
51
-
"Cannot proceed: a2a_agents table exists but tools table is missing. ""This migration adds a FK from a2a_agents.tool_id to tools.id. ""Please verify your database schema."
52
-
)
50
+
raiseRuntimeError("Cannot proceed: a2a_agents table exists but tools table is missing. This migration adds a FK from a2a_agents.tool_id to tools.id. Please verify your database schema.")
# If column exists but FK doesn't, check for orphaned references that would block FK creation
65
63
ifnotneed_columnandneed_fk:
66
64
# Use COUNT for efficiency, then fetch limited sample for error message
67
-
orphan_count=bind.execute(sa.text("SELECT COUNT(*) FROM a2a_agents WHERE tool_id IS NOT NULL ""AND tool_id NOT IN (SELECT id FROM tools)")).scalar() or0
65
+
orphan_count=bind.execute(sa.text("SELECT COUNT(*) FROM a2a_agents WHERE tool_id IS NOT NULL AND tool_id NOT IN (SELECT id FROM tools)")).scalar() or0
68
66
iforphan_count>0:
69
67
# Fetch limited sample for error details
70
-
sample=bind.execute(sa.text("SELECT id, tool_id FROM a2a_agents WHERE tool_id IS NOT NULL ""AND tool_id NOT IN (SELECT id FROM tools) LIMIT 10")).fetchall()
68
+
sample=bind.execute(sa.text("SELECT id, tool_id FROM a2a_agents WHERE tool_id IS NOT NULL AND tool_id NOT IN (SELECT id FROM tools) LIMIT 10")).fetchall()
print(f" ✓ Loaded config snapshot from migration_metadata (revision={revision})")
362
362
else:
363
-
logger.warning("No config snapshot found in migration_metadata. ""Falling back to live settings — downgrade correctness depends on env vars matching upgrade time.")
363
+
logger.warning("No config snapshot found in migration_metadata. Falling back to live settings — downgrade correctness depends on env vars matching upgrade time.")
if getattr(settings, "experimental_rust_a2a_runtime_enabled", False):
1334
-
logger.warning(
1335
-
"EXPERIMENTAL_RUST_A2A_RUNTIME_ENABLED=true is DEPRECATED. " "The Rust A2A runtime is removed in the next release; " "Python dispatcher is the only path. This flag is now ignored."
1336
-
)
1334
+
logger.warning("EXPERIMENTAL_RUST_A2A_RUNTIME_ENABLED=true is DEPRECATED. The Rust A2A runtime is removed in the next release; Python dispatcher is the only path. This flag is now ignored.")
1337
1335
1338
1336
1339
1337
@asynccontextmanager
@@ -4169,6 +4167,7 @@ async def create_server(
4169
4167
team_id = team_id or token_team_id
4170
4168
4171
4169
logger.debug(f"User {SecurityValidator.sanitize_log_message(user_email)} is creating a new server for team {team_id}")
4170
+
# First-Party
4172
4171
from mcpgateway.services.caller_context import CallerContext # noqa: E402 pylint: disable=import-outside-toplevel
0 commit comments