SR Context: Subject List, Edit Mode, and Edit Compatibility#2308
SR Context: Subject List, Edit Mode, and Edit Compatibility#2308r-vasquez merged 7 commits intofe/sr-context-supportfrom
Conversation
These include changes for managing context
This is now possible with the latest sr client version.
Now part of our hook so we can query it easily in our pages.
The FE can benefit from the enhanced response when viewing the list of contexts available within the Schema Registry
Add context-aware subject filtering to the schema registry list page. Subjects are grouped by their SR context (default, named, or all) and users can switch contexts via a new dropdown selector. - Add context utils for parsing qualified subject names and deriving context metadata - Add SchemaContextSelector combobox component - Integrate context selector into schema list page - Query SR contexts API for mode/compatibility - Add unit and component tests
Now you can use the edit-mode page to edit a context-level SR mode. This includes: - Ability to reset to default (global mode) - OnClose takes you to the list on the same context you were on. - Page when trying to access the page for a context without configuring context parsing first. - Tests.
Now you can use the edit-compatibility page to edit a context-level SR compat. This includes: - Ability to reset to default (global compat) - OnClose takes you to the list on the same context you were on. - Page when trying to access the page for a context without configuring subject parsing. - Tests.
c-julin
left a comment
There was a problem hiding this comment.
I would also recommend adding integration tests on pkg/api should be fairly straightforward i think theres a way to run it against a nightly image
| ); | ||
| } | ||
|
|
||
| function ContextsNotSupportedPage() { |
There was a problem hiding this comment.
This function appears twice, could it not be reused?
| @@ -11,15 +11,17 @@ | |||
|
|
|||
| import { Box, CodeBlock, Flex, Grid, GridItem, RadioGroup, Text, useToast } from '@redpanda-data/ui'; | |||
There was a problem hiding this comment.
iirc Blair mentioned using sonner in one of our threads not sure if thats something you're addressing later?
There was a problem hiding this comment.
Yes, I'm trying to finish the new feature first, then I'll migrate the components to the new UI. Sometimes is easy and I'll do it as I go, but other times involves additional code and testing that I can't afford right now given the time constraint.
| }); | ||
|
|
||
| test('empty string is a named context', () => { | ||
| expect(isNamedContext('')).toBe(true); |
There was a problem hiding this comment.
Good catch, I was using empty as the equivalent of default, but this logic was flawed so I changed that behavior for the __default__ ID. I will change this function to treat empty values as nonNamedContexts
This is the first PR that goes to the integration branch, is best reviewed commit by commit. It includes support of SR Context in the following pages
Subject List

Edit Mode

Edit Compatibility

It also includes handling of the feature being configured or not, meaning that if the user doesn't set the
schema_registry_enable_qualified_subjectscluster property, it will see the normal Schema Registry pages.