Skip to content

Commit 085867e

Browse files
committed
revert(mcp): drop RF clamp from MCP inspector
Scope back to the user-visible topic-create paths only. The MCP inspector's "create new topic" flow is out of scope for this PR.
1 parent d159b10 commit 085867e

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

frontend/src/components/pages/mcp-servers/details/remote-mcp-inspector-tab.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ import {
3636
} from 'protogen/redpanda/api/dataplane/v1/topic_pb';
3737
import { MCPServer_State, MCPServer_Tool_ComponentType } from 'protogen/redpanda/api/dataplane/v1alpha3/mcp_pb';
3838
import { useEffect, useRef, useState } from 'react';
39-
import { useGetKafkaInfoQuery } from 'react-query/api/cluster-status';
4039
import {
4140
type MCPStreamProgress,
4241
useGetMCPServerQuery,
@@ -202,13 +201,6 @@ export const RemoteMCPInspectorTab = () => {
202201
hideInternalTopics: true,
203202
});
204203
const { mutateAsync: createTopic } = useCreateTopicMutation();
205-
// Clamp RF to broker count so single-broker clusters (e.g. local-byoc) don't
206-
// fail CreateTopic with "not enough replicas". Fall back to the default if
207-
// the KafkaInfo query hasn't resolved yet.
208-
const { data: kafkaInfo } = useGetKafkaInfoQuery();
209-
const brokersOnline = kafkaInfo?.brokersOnline ?? 0;
210-
const effectiveReplicationFactor =
211-
brokersOnline > 0 ? Math.min(DEFAULT_TOPIC_REPLICATION_FACTOR, brokersOnline) : DEFAULT_TOPIC_REPLICATION_FACTOR;
212204

213205
useEffect(() => {
214206
if (!selectedTool && mcpServerTools?.tools && mcpServerTools.tools.length === 1) {
@@ -572,7 +564,7 @@ export const RemoteMCPInspectorTab = () => {
572564
topic: create(CreateTopicRequest_TopicSchema, {
573565
name: newTopicName,
574566
partitionCount: DEFAULT_TOPIC_PARTITION_COUNT,
575-
replicationFactor: effectiveReplicationFactor,
567+
replicationFactor: DEFAULT_TOPIC_REPLICATION_FACTOR,
576568
configs: [
577569
create(CreateTopicRequest_Topic_ConfigSchema, {
578570
name: 'cleanup.policy',

0 commit comments

Comments
 (0)