Commit 1beb8b9
authored
fix(ui): Fix secrets component in batch prediction job creation page (#632)
# Description
This PR fixes a bug with the new UI changes introduced in PR #627,
whereby attempting to redeploy a batch job in a terminal state
(succeeded or failed) that does not have any user secrets configured
(`nil`) will cause the UI to crash. This PR fixes this bug by setting
the default value of the `secrets` field to be `[]` by default.
Another minor change in this PR is also made to remove the redundant
`textwrap` option (this is not recognised and does nothing) that had
been accidentally introduced in the same PR quoted above.
# Modifications
- `ui/src/pages/job/form/components/SecretsForm.js` - Removal of
`textwrap` option
- `ui/src/pages/version/components/forms/components/SecretsPanel.js` -
Removal of `textwrap` option
- `ui/src/services/job/Job.js` - Addition of steps to ensure the
`secrets` field gets intialised as `[]` by default
# Tests
<!-- Besides the existing / updated automated tests, what specific
scenarios should be tested? Consider the backward compatibility of the
changes, whether corner cases are covered, etc. Please describe the
tests and check the ones that have been completed. Eg:
- [x] Deploying new and existing standard models
- [ ] Deploying PyFunc models
-->
# Checklist
- [x] Added PR label
- [ ] Added unit test, integration, and/or e2e tests
- [x] Tested locally
- [ ] Updated documentation
- [ ] Update Swagger spec if the PR introduce API changes
- [ ] Regenerated Golang and Python client if the PR introduces API
changes
# Release Notes
<!--
Does this PR introduce a user-facing change?
If no, just write "NONE" in the release-note block below.
If yes, a release note is required. Enter your extended release note in
the block below.
If the PR requires additional action from users switching to the new
release, include the string "action required".
For more information about release notes, see kubernetes' guide here:
http://git.k8s.io/community/contributors/guide/release-notes.md
-->
```release-note
NONE
```1 parent f947226 commit 1beb8b9
File tree
3 files changed
+6
-2
lines changed- ui/src
- pages
- job/form/components
- version/components/forms/components
- services/job
3 files changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | 94 | | |
96 | 95 | | |
97 | 96 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| |||
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
91 | 97 | | |
92 | 98 | | |
93 | 99 | | |
0 commit comments