Commit f5c2c10
authored
fix(model-registry): surface K8s name validation errors on MCP deploy name field (opendatahub-io#7192)
* fix(model-registry): surface K8s name validation errors on the deployment name field
The K8sNameDescriptionField component silently disabled the submit
button when the auto-generated resource name was empty (symbols-only
input) or exceeded the 253-character limit, with no visible feedback.
- Show inline error when the display name produces an empty resource
name (e.g. only special characters entered).
- Surface invalidLength and invalidCharacters errors directly below the
name field when the "Edit resource name" section is collapsed.
- Add red validation border on the name input when errors are present.
- Extract duplicated validation message strings into shared constants
in utils.ts (DRY).
Made-with: Cursor
* fix(model-registry): use dashboard K8s name utilities in MCP deploy modal to reject invalid names
* fix(model-registry): fix prettier formatting in ResourceNameField and McpDeployModal
Made-with: Cursor
* fix(model-registry): select project in deploy modal Cypress tests
The namespace selector resolves an extension-provided project dropdown
in CI (Module Federation), so it does not auto-select. Manually select
the project before asserting the deploy button enables.
Made-with: Cursor
* fix(model-registry): use display name 'Test Project' for project selector in tests
Made-with: Cursor
* fix(model-registry): align selectProject with mcpCatalog page object pattern
Made-with: Cursor
* fix(model-registry): unwrap assembleModArchBody data wrapper in deploy modal test assertions
Made-with: Cursor
* Remove alias and export value from utils1 parent cc83365 commit f5c2c10
6 files changed
Lines changed: 170 additions & 34 deletions
File tree
- packages
- cypress/cypress
- pages
- tests/mocked/mcpCatalog
- model-registry/upstream/frontend/src
- concepts/k8s/K8sNameDescriptionField
- odh/components
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
181 | 198 | | |
182 | 199 | | |
183 | 200 | | |
| |||
Lines changed: 50 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
490 | 540 | | |
Lines changed: 31 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
| |||
60 | 66 | | |
61 | 67 | | |
62 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
63 | 76 | | |
64 | 77 | | |
65 | 78 | | |
| |||
69 | 82 | | |
70 | 83 | | |
71 | 84 | | |
| 85 | + | |
72 | 86 | | |
73 | 87 | | |
74 | 88 | | |
| |||
91 | 105 | | |
92 | 106 | | |
93 | 107 | | |
94 | | - | |
| 108 | + | |
95 | 109 | | |
96 | 110 | | |
97 | 111 | | |
98 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
99 | 117 | | |
100 | 118 | | |
101 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
102 | 130 | | |
103 | 131 | | |
104 | 132 | | |
| |||
Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
72 | | - | |
| 73 | + | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 77 | + | |
80 | 78 | | |
81 | 79 | | |
82 | 80 | | |
| |||
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
8 | 14 | | |
9 | 15 | | |
10 | 16 | | |
| |||
Lines changed: 62 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
| |||
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
55 | 95 | | |
56 | 96 | | |
57 | 97 | | |
| |||
84 | 124 | | |
85 | 125 | | |
86 | 126 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | 127 | | |
91 | | - | |
| 128 | + | |
92 | 129 | | |
93 | 130 | | |
94 | 131 | | |
| |||
106 | 143 | | |
107 | 144 | | |
108 | 145 | | |
109 | | - | |
| 146 | + | |
110 | 147 | | |
111 | 148 | | |
112 | 149 | | |
113 | 150 | | |
114 | 151 | | |
115 | 152 | | |
116 | 153 | | |
117 | | - | |
118 | | - | |
| 154 | + | |
| 155 | + | |
119 | 156 | | |
120 | 157 | | |
121 | 158 | | |
| |||
135 | 172 | | |
136 | 173 | | |
137 | 174 | | |
138 | | - | |
139 | | - | |
| 175 | + | |
| 176 | + | |
140 | 177 | | |
141 | 178 | | |
142 | 179 | | |
| |||
146 | 183 | | |
147 | 184 | | |
148 | 185 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
153 | 190 | | |
154 | 191 | | |
155 | 192 | | |
| |||
0 commit comments