Skip to content

fe/shadowlink: add read-only schema registry section#2564

Open
r-vasquez wants to merge 1 commit into
masterfrom
new-sr-in-sl-edit-view
Open

fe/shadowlink: add read-only schema registry section#2564
r-vasquez wants to merge 1 commit into
masterfrom
new-sr-in-sl-edit-view

Conversation

@r-vasquez

@r-vasquez r-vasquez commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

The details view only showed an Enabled/Disabled badge for _schemas topic shadowing. Schema Registry can now replicate over the source REST API, so add a read-only card for that mode and map the new options through both the dataplane and controlplane paths.

Supporting the controlplane case meant upgrading the redpandadata/cloud buf SDK, which also dropped the unused resource_group_id field from the ShadowLink, so remove it from the model too.

Examples:

Over API
image

_schemas topic
image

sync disabled
image

The details view only showed an Enabled/Disabled
badge for _schemas topic shadowing. Schema
Registry can now replicate over the source REST
API, so add a read-only card for that mode and
map the new options through both the dataplane and
controlplane paths.

Supporting the controlplane case meant upgrading
the redpandadata/cloud buf SDK, which also
dropped the unused resource_group_id field from
the ShadowLink, so remove it from the model too.
@r-vasquez
r-vasquez force-pushed the new-sr-in-sl-edit-view branch from 85f67d6 to 97763da Compare July 17, 2026 23:38
@github-actions

Copy link
Copy Markdown
Contributor

Clean — no registry drift, off-token colours, or ad-hoc classes

App: frontend · Scope: diff vs origin/master · Files: 11

Count
⚠️ Outdated registry components 0
🛠 Locally-modified components 0
❓ Unknown to registry 0
🎨 Off-token palette colours 0
🔢 Ad-hoc utility classes 0

Generated by lookout audit-changes.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds read-only UI support for Schema Registry shadowing via the source REST API (“Sync over API”) in the ShadowLink details view, and wires the new schema-registry sync-option shape through both dataplane and controlplane mappers/hooks (including removing the now-dropped resource_group_id field).

Changes:

  • Introduces a shared schema-registry sync-options mapper and extends the unified ShadowLink model to represent API-mode replication options.
  • Updates dataplane/controlplane mappers and edit-hook logic to correctly preserve and detect API-mode links (including embedded/controlplane cases).
  • Replaces the old “Enabled/Disabled” badge with a full read-only Schema Registry configuration card, plus adds mapper/UI test coverage.

Reviewed changes

Copilot reviewed 13 out of 15 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
frontend/yarn.lock Updates Buf-generated SDK dependency versions used by the frontend.
frontend/package.json Bumps @buf/redpandadata_cloud.connectrpc_query-es to a newer commit build.
frontend/bun.lock Lockfile updates reflecting the SDK bump.
frontend/bunfig.toml Temporarily excludes new Buf packages from the 72h minimum-release-age gate.
frontend/src/react-query/api/shadowlink.ts Ensures API-mode schema-registry links are detected correctly in embedded/controlplane edit flows.
frontend/src/react-query/api/shadowlink.test.tsx Adjusts tests for removed resourceGroupId and adds coverage for API-mode detection in embedded mode.
frontend/src/components/pages/shadowlinks/model.ts Extends unified model for Schema Registry API-mode options; removes resourceGroupId.
frontend/src/components/pages/shadowlinks/mappers/schema-registry.ts New shared mapper for schema-registry sync options (topic vs API) and TLS/duration helpers.
frontend/src/components/pages/shadowlinks/mappers/dataplane.ts Uses the shared schema-registry mapper and shared TLS mapper (deduplication).
frontend/src/components/pages/shadowlinks/mappers/dataplane.test.ts New tests validating dataplane mapping for Schema Registry topic/API modes.
frontend/src/components/pages/shadowlinks/mappers/controlplane.ts Uses the shared schema-registry mapper and removes resourceGroupId mapping.
frontend/src/components/pages/shadowlinks/mappers/controlplane.test.ts New tests validating controlplane mapping for Schema Registry topic/API modes.
frontend/src/components/pages/shadowlinks/details/config/configuration-shadowing.tsx Swaps the old Schema Registry enabled/disabled section for the new detailed card component.
frontend/src/components/pages/shadowlinks/details/config/configuration-schema-registry.tsx New read-only Schema Registry configuration card supporting Disabled/Topic/API modes.
frontend/src/components/pages/shadowlinks/details/config/configuration-schema-registry.test.tsx New UI tests for the Schema Registry configuration card rendering.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

return;
}

let tlsSettingsValue: UnifiedTLSSettings['tlsSettings'];
Comment on lines +14 to +19
import { ShadowLinkSchema } from 'protogen/redpanda/api/dataplane/v1/shadowlink_pb';
import {
type SchemaRegistrySyncOptionsSchema,
UnsupportedSchemaFeaturePolicy,
} from 'protogen/redpanda/core/admin/v2/shadow_link_pb';
import { describe, expect, test } from 'vitest';
Comment on lines +31 to +34
const UNSUPPORTED_FEATURE_POLICY_LABELS: Record<number, string> = {
[UnsupportedSchemaFeaturePolicy.FAIL]: 'Fail the sync',
[UnsupportedSchemaFeaturePolicy.REMOVE]: 'Remove unsupported features',
};
Comment on lines +281 to +285
<ConfigRow
label="Unsupported schema features:"
testId="sr-config-unsupported-features"
value={UNSUPPORTED_FEATURE_POLICY_LABELS[api.unsupportedSchemaFeaturePolicy] ?? 'Fail the sync'}
/>

expect(screen.getByTestId('sr-config-auth-type-value')).toHaveTextContent('HTTP Basic');
expect(screen.getByTestId('sr-config-auth-username-value')).toHaveTextContent('sr-replicator');
expect(screen.getByTestId('sr-config-auth-password-value')).toHaveTextContent('Last changed Jul 1, 2026 at 12:00');
Comment on lines +203 to +205
expect(screen.getByTestId('sr-config-max-request-rate-value')).toHaveTextContent('Cluster default');
expect(screen.getByTestId('sr-config-unsupported-features-value')).toHaveTextContent('Fail the sync');
});
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.

2 participants