Commit ee3afa7
authored
feat[UX-664]: add detailed schema compatibility error messages (#2031)
* feat: add detailed schema compatibility error messages
Parse and display structured error details from schema registry when
protobuf schema validation fails. Previously returned only boolean
compatibility status without explanation of why schemas are incompatible.
Backend changes:
- Add schemaRegValidationError struct with errorType and description
- Parse verbose compatibility messages from schema registry API
- Handle invalid JSON format returned by schema registry
Frontend changes:
- Update validation response types to include structured error object
- Display formatted compatibility errors with human-readable labels
- Hide error details section when no error information available
* test: add comprehensive schema registry compatibility error parser tests
- Document parser behavior with real Confluent/Redpanda response format
- Test handling of unquoted JSON keys in compatibility messages
- Verify regex transformation for invalid JSON structure
- Add edge case coverage for malformed messages
* refactor: improve schema registry compatibility error parser
- Replace string-based JSON fixing with regex approach for better accuracy
- Use regex pattern (\w+): to quote unquoted keys consistently
- Add structured logging for parse failures with original/fixed messages
- Make parseCompatibilityError a Service method for logger access
* test: update integration tests for schema registry compatibility
- Upgrade Redpanda test container from v23.3.18 to v25.2.10
- Add integration test for incompatible protobuf schema changes
- Verify error type and description extraction from compatibility response
- Test field type change detection (string to int32)
* feat(ui): add persistent error banner for schema validation failures
- Add dismissible alert banner that persists validation errors after modal close
- Update openValidationErrorsModal to support onClose callback
- Display error type and description in banner above action buttons
- Auto-clear banner on successful validation or schema creation
- Improve UX by keeping error visible while user fixes schema1 parent 1f5ff7d commit ee3afa7
File tree
7 files changed
+329
-107
lines changed- backend/pkg
- api
- console
- frontend/src
- components/pages/schemas
- state
7 files changed
+329
-107
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
Lines changed: 41 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
126 | 167 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
589 | 591 | | |
590 | 592 | | |
591 | 593 | | |
592 | | - | |
593 | | - | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
594 | 635 | | |
595 | 636 | | |
596 | 637 | | |
| |||
608 | 649 | | |
609 | 650 | | |
610 | 651 | | |
611 | | - | |
| 652 | + | |
612 | 653 | | |
613 | | - | |
| 654 | + | |
| 655 | + | |
614 | 656 | | |
615 | | - | |
| 657 | + | |
| 658 | + | |
616 | 659 | | |
617 | 660 | | |
618 | 661 | | |
619 | 662 | | |
620 | 663 | | |
621 | 664 | | |
622 | | - | |
| 665 | + | |
623 | 666 | | |
624 | 667 | | |
625 | 668 | | |
626 | 669 | | |
627 | 670 | | |
| 671 | + | |
| 672 | + | |
628 | 673 | | |
629 | 674 | | |
630 | 675 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
159 | 163 | | |
160 | 164 | | |
161 | 165 | | |
| |||
177 | 181 | | |
178 | 182 | | |
179 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
180 | 201 | | |
181 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
182 | 206 | | |
183 | 207 | | |
184 | 208 | | |
| |||
199 | 223 | | |
200 | 224 | | |
201 | 225 | | |
| 226 | + | |
202 | 227 | | |
203 | 228 | | |
204 | 229 | | |
205 | 230 | | |
| 231 | + | |
206 | 232 | | |
207 | 233 | | |
208 | 234 | | |
| |||
0 commit comments