Skip to content

Commit 8f55ecf

Browse files
authored
refactor: use core proto ShadowLinkTaskStatus in console and dataplane APIs (#2054)
* refactor: use core proto ShadowLinkTaskStatus in console and dataplane APIs Remove duplicate TaskState enum and ShadowLinkTaskStatus message from console/v1alpha1 and dataplane/v1alpha3 protos. Both now reference core.admin.v2.ShadowLinkTaskStatus. Update buf.build/redpandadata/core to latest SHA and regenerate protos. Update frontend imports to use core proto types and adjust field name from shardId to shard. * fix: exclude imported proto breaking changes from CI validation Configure buf breaking change detection to ignore changes in external dependencies (buf.build/redpandadata/core) using --exclude-imports flag in CI workflow. Add secret.proto to ignore list and enable ignore_unstable_packages to handle dependency version changes. * chore: regenerate OpenAPI specs from updated proto definitions * fix: update proto import paths for ACL and TLS types Update import paths after proto dependency reorganization: - ACL types moved from redpanda/core/common/acl_pb to v1/acl_pb - TLS types moved from shadow_link_pb to common/v1/tls_pb Affects shadowlink creation, editing, and detail views. * docs: regenned docs after rebase * revert: remove --exclude-imports flag from buf CI validation Remove the --exclude-imports flag from buf breaking change detection to properly validate all proto changes including imported dependencies. Also remove secret.proto from ignore list and ignore_unstable_packages setting from buf.yaml. This reverts the changes made in commits: - 4c25c2a: fix: exclude imported proto breaking changes from CI validation - ec4e442: fix: update proto import paths for ACL and TLS types (partial) * ci: buf add label check on breaking boolean * feat(proto): add topic_id field to shadow topic responses Add topic_id as field 2 in ShadowTopic and GetShadowTopicResponse messages to support topic identification beyond name. Regenerated backend Go, frontend TypeScript, and OpenAPI specs.
1 parent aae08c6 commit 8f55ecf

File tree

29 files changed

+1022
-1445
lines changed

29 files changed

+1022
-1445
lines changed

.github/workflows/buf.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,8 @@ jobs:
4949
with:
5050
lint: true
5151
format: true
52-
breaking: true
53-
push: false # Only validate, don't push to registry
54-
# Compare against the default branch so the whole PR is checked
52+
breaking: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'Buf Skip Breaking') }}
53+
push: false
5554
breaking_against: https://github.com/redpanda-data/console.git#branch=master
5655

5756
# ===========================================================================

backend/pkg/protogen/redpanda/api/console/v1alpha1/shadowlink.pb.go

Lines changed: 236 additions & 409 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/pkg/protogen/redpanda/api/dataplane/v1alpha3/shadowlink.pb.go

Lines changed: 331 additions & 485 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

buf.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ deps:
55
commit: 52f32327d4b045a79293a6ad4e7e1236
66
digest: b5:cbabc98d4b7b7b0447c9b15f68eeb8a7a44ef8516cb386ac5f66e7fd4062cd6723ed3f452ad8c384b851f79e33d26e7f8a94e2b807282b3def1cd966c7eace97
77
- name: buf.build/googleapis/googleapis
8-
commit: 72c8614f3bd0466ea67931ef2c43d608
9-
digest: b5:13efeea24e633fd45327390bdee941207a8727e96cf01affb84c1e4100fd8f48a42bbd508df11930cd2884629bafad685df1ac3111bc78cdaefcd38c9371c6b1
8+
commit: 004180b77378443887d3b55cabc00384
9+
digest: b5:e8f475fe3330f31f5fd86ac689093bcd274e19611a09db91f41d637cb9197881ce89882b94d13a58738e53c91c6e4bae7dc1feba85f590164c975a89e25115dc
1010
- name: buf.build/grpc-ecosystem/grpc-gateway
1111
commit: a48fcebcf8f140dd9d09359b9bb185a4
1212
digest: b5:330af8a71b579ab96c4f3ee26929d1a68a5a9e986c7cfe0a898591fc514216bb6e723dc04c74d90fdee3f3f14f9100a54b4f079eb273e6e7213f0d5baca36ff8
1313
- name: buf.build/redpandadata/common
14-
commit: 9feeb258823648009d54c7c2b8a22524
15-
digest: b5:669904f69cff7bf106d81dd30f417dcc64f511da31db1abff2ace9fc4530580ce8da68eb8f5863f6c36d6bb6d9209a6cc61239144f968eae9bbe249440111762
14+
commit: bb850a94466341c69a738988c0be5a4b
15+
digest: b5:d566ba6746a874a5709970e7f8569584008447d655c556676aabd3430111bbbc0a303dde11d99a1955ee27ac4748bcf7c972503a66db4ef850eb55f239f851ac
1616
- name: buf.build/redpandadata/core
17-
commit: e0f79c48b9f04c029d710985687bc1e5
18-
digest: b5:9f8ccc94057f489f4df2c8a12d0fbcf66d15ea9d891df90eb5baa8b7f299a9071f2d844d0e18e65b609ae827c79833900c341fa7afaee4be33da0d25165923f2
17+
commit: 05aa34b3829a4d5a801d9487623a7c76
18+
digest: b5:ca0d5205224273e79678fb4b46bea0bedd25574e148325947b2a0af7893d595dbcf0756ac35be7f445e313de67469ed61f5fe3a2cf5eeca167fe5192b40dcb7a

buf.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ deps:
99
- buf.build/googleapis/googleapis
1010
- buf.build/grpc-ecosystem/grpc-gateway:v2.24.0
1111
- buf.build/redpandadata/common
12-
- buf.build/redpandadata/core:e0f79c48b9f04c029d710985687bc1e5
12+
- buf.build/redpandadata/core:05aa34b3829a4d5a801d9487623a7c76
1313
lint:
1414
use:
1515
- STANDARD
@@ -30,3 +30,4 @@ breaking:
3030
- proto/redpanda/api/dataplane/v1alpha1
3131
- proto/redpanda/api/dataplane/v1alpha3
3232
- proto/redpanda/api/dataplane/v1/mcp.proto
33+

frontend/src/components/pages/shadowlinks/create/configuration/acls-step.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
import { zodResolver } from '@hookform/resolvers/zod';
1313
import { Form } from 'components/redpanda-ui/components/form';
14-
import { ACLOperation, ACLPattern, ACLPermissionType, ACLResource } from 'protogen/redpanda/core/common/acl_pb';
14+
import { ACLOperation, ACLPattern, ACLPermissionType, ACLResource } from 'protogen/redpanda/core/common/v1/acl_pb';
1515
import { useForm } from 'react-hook-form';
1616
import { fireEvent, render, screen, waitFor, within } from 'test-utils';
1717

frontend/src/components/pages/shadowlinks/create/configuration/acls-step.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import {
3030
} from 'components/redpanda-ui/components/select';
3131
import { Tabs, TabsContent, TabsList, TabsTrigger } from 'components/redpanda-ui/components/tabs';
3232
import { ChevronDown, Info, X } from 'lucide-react';
33-
import { ACLOperation, ACLPattern, ACLPermissionType, ACLResource } from 'protogen/redpanda/core/common/acl_pb';
33+
import { ACLOperation, ACLPattern, ACLPermissionType, ACLResource } from 'protogen/redpanda/core/common/v1/acl_pb';
3434
import { useState } from 'react';
3535
import { useFieldArray, useFormContext, useWatch } from 'react-hook-form';
3636

frontend/src/components/pages/shadowlinks/create/model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111

1212
import { FilterType, PatternType, ScramMechanism } from 'protogen/redpanda/core/admin/v2/shadow_link_pb';
13-
import { ACLOperation, ACLPattern, ACLPermissionType, ACLResource } from 'protogen/redpanda/core/common/acl_pb';
13+
import { ACLOperation, ACLPattern, ACLPermissionType, ACLResource } from 'protogen/redpanda/core/common/v1/acl_pb';
1414
import { z } from 'zod';
1515

1616
// TLS mode: either file paths or PEM content

frontend/src/components/pages/shadowlinks/create/shadowlink-create-page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ import {
3232
ShadowLinkClientOptionsSchema,
3333
ShadowLinkConfigurationsSchema,
3434
ShadowLinkSchema,
35-
TLSSettingsSchema,
3635
TopicMetadataSyncOptionsSchema,
3736
} from 'protogen/redpanda/core/admin/v2/shadow_link_pb';
37+
import { TLSSettingsSchema } from 'protogen/redpanda/core/common/v1/tls_pb';
3838
import { useEffect } from 'react';
3939
import { useForm } from 'react-hook-form';
4040
import { useNavigate } from 'react-router-dom';
@@ -49,7 +49,7 @@ import {
4949
ACLPattern,
5050
ACLPermissionType,
5151
ACLResource,
52-
} from '../../../../protogen/redpanda/core/common/acl_pb';
52+
} from '../../../../protogen/redpanda/core/common/v1/acl_pb';
5353
import { useCreateShadowLinkMutation } from '../../../../react-query/api/shadowlink';
5454
import { buildTLSSettings } from '../edit/shadowlink-edit-utils';
5555

frontend/src/components/pages/shadowlinks/details/config/tls-certificates-config.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111

1212
import { Text } from 'components/redpanda-ui/components/typography';
13-
import type { TLSSettings } from 'protogen/redpanda/core/admin/v2/shadow_link_pb';
13+
import type { TLSSettings } from 'protogen/redpanda/core/common/v1/tls_pb';
1414
import type React from 'react';
1515

1616
const ConfigField = ({ label, value, testId }: { label: string; value: React.ReactNode; testId?: string }) => (

0 commit comments

Comments
 (0)