Skip to content

[ML][AI Connector] Ensures form fields persist when validation fails - #230321

Merged
alvarezmelissa87 merged 4 commits into
elastic:mainfrom
alvarezmelissa87:ai-connector-validation-fix
Aug 8, 2025
Merged

alvarezmelissa87 merged 4 commits into
elastic:mainfrom
alvarezmelissa87:ai-connector-validation-fix

Conversation

@alvarezmelissa87

@alvarezmelissa87 alvarezmelissa87 commented Aug 1, 2025 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #218809
This is also an issue in 8.18, 8.19, 9.0, and 9.1.
Needs to be backported for

This PR ensures that the validation of the required provider fields does not alter the list of required fields, thus causing duplication of fields in the form.

Before:

validationBug.mp4

After:

AIConnectorValidationFix.mov

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

@alvarezmelissa87 alvarezmelissa87 self-assigned this Aug 1, 2025
@alvarezmelissa87
alvarezmelissa87 requested a review from a team as a code owner August 1, 2025 22:28
@alvarezmelissa87 alvarezmelissa87 added release_note:fix :ml backport:version Backport to applied version labels Feature:Inference UI ML Inference endpoints UI and AI connector v9.2.0 labels Aug 1, 2025
@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/ml-ui (:ml)

@alvarezmelissa87

Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@alvarezmelissa87

Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@qn895 qn895 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes LGTM

@alvarezmelissa87 alvarezmelissa87 added backport pending backport:skip This PR does not require backporting and removed backport:version Backport to applied version labels labels Aug 5, 2025

@Samiul-TheSoccerFan Samiul-TheSoccerFan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is neat, the solution was right here all along.

@alvarezmelissa87

Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
indexManagement 681.6KB 681.6KB +54.0B
searchInferenceEndpoints 98.7KB 98.8KB +60.0B
searchPlayground 221.6KB 221.9KB +232.0B
securitySolution 10.3MB 10.3MB +223.0B
stackConnectors 620.0KB 620.0KB +58.0B
total +627.0B

History

cc @alvarezmelissa87

@darnautov darnautov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alvarezmelissa87 alvarezmelissa87 added v8.19.2 backport:version Backport to applied version labels v9.1.2 and removed backport:skip This PR does not require backporting labels Aug 8, 2025
@alvarezmelissa87
alvarezmelissa87 merged commit 6f8e44d into elastic:main Aug 8, 2025
@alvarezmelissa87
alvarezmelissa87 deleted the ai-connector-validation-fix branch August 8, 2025 16:21
@kibanamachine

Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.19, 9.1

https://github.com/elastic/kibana/actions/runs/16835303431

@kibanamachine

Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
❌ 8.19 Backport failed because of merge conflicts
❌ 9.1 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 230321

Questions ?

Please refer to the Backport tool documentation

@alvarezmelissa87

Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
✅ 9.1
✅ 8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

alvarezmelissa87 added a commit to alvarezmelissa87/kibana that referenced this pull request Aug 8, 2025
…lastic#230321)

## Summary

Fixes elastic#218809
This is also an issue in 8.18, 8.19, 9.0, and 9.1.
Needs to be backported for
- [ ] 8.18.6 (after Aug 12)
- [ ] 8.19.2 (after Aug 7)
- [ ] 9.0.6 (after Aug 12)
- [ ] 9.1.2 (after Aug 7)

This PR ensures that the validation of the required provider fields does
not alter the list of required fields, thus causing duplication of
fields in the form.

Before:

https://github.com/user-attachments/assets/26d2b14d-abb8-40a4-8791-981d2e289ce6

After:

https://github.com/user-attachments/assets/bca4260d-11a2-452e-954f-dd559a5f52c6

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit 6f8e44d)

# Conflicts:
#	x-pack/platform/packages/shared/kbn-inference-endpoint-ui-common/src/components/inference_service_form_fields.tsx
alvarezmelissa87 added a commit that referenced this pull request Aug 8, 2025
…fails (#230321) (#231197)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[ML][AI Connector] Ensure form fields persist when validation fails
(#230321)](#230321)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Melissa
Alvarez","email":"melissa.alvarez@elastic.co"},"sourceCommit":{"committedDate":"2025-08-08T16:21:40Z","message":"[ML][AI
Connector] Ensure form fields persist when validation fails
(#230321)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/218809\nThis is also an issue
in 8.18, 8.19, 9.0, and 9.1.\nNeeds to be backported for \n- [ ] 8.18.6
(after Aug 12) \n- [ ] 8.19.2 (after Aug 7)\n- [ ] 9.0.6 (after Aug
12)\n- [ ] 9.1.2 (after Aug 7)\n\nThis PR ensures that the validation of
the required provider fields does\nnot alter the list of required
fields, thus causing duplication of\nfields in the
form.\n\nBefore:\n\n\nhttps://github.com/user-attachments/assets/26d2b14d-abb8-40a4-8791-981d2e289ce6\n\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/bca4260d-11a2-452e-954f-dd559a5f52c6\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[ ] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"6f8e44d5fdfb2cfcfcbe79e0afa02fbe15263d9c","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","backport:version","Feature:Inference
UI","v9.2.0","v9.1.2","v8.19.2"],"title":"[ML][AI Connector] Ensure form
fields persist when validation
fails","number":230321,"url":"https://github.com/elastic/kibana/pull/230321","mergeCommit":{"message":"[ML][AI
Connector] Ensure form fields persist when validation fails
(#230321)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/218809\nThis is also an issue
in 8.18, 8.19, 9.0, and 9.1.\nNeeds to be backported for \n- [ ] 8.18.6
(after Aug 12) \n- [ ] 8.19.2 (after Aug 7)\n- [ ] 9.0.6 (after Aug
12)\n- [ ] 9.1.2 (after Aug 7)\n\nThis PR ensures that the validation of
the required provider fields does\nnot alter the list of required
fields, thus causing duplication of\nfields in the
form.\n\nBefore:\n\n\nhttps://github.com/user-attachments/assets/26d2b14d-abb8-40a4-8791-981d2e289ce6\n\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/bca4260d-11a2-452e-954f-dd559a5f52c6\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[ ] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"6f8e44d5fdfb2cfcfcbe79e0afa02fbe15263d9c"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230321","number":230321,"mergeCommit":{"message":"[ML][AI
Connector] Ensure form fields persist when validation fails
(#230321)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/218809\nThis is also an issue
in 8.18, 8.19, 9.0, and 9.1.\nNeeds to be backported for \n- [ ] 8.18.6
(after Aug 12) \n- [ ] 8.19.2 (after Aug 7)\n- [ ] 9.0.6 (after Aug
12)\n- [ ] 9.1.2 (after Aug 7)\n\nThis PR ensures that the validation of
the required provider fields does\nnot alter the list of required
fields, thus causing duplication of\nfields in the
form.\n\nBefore:\n\n\nhttps://github.com/user-attachments/assets/26d2b14d-abb8-40a4-8791-981d2e289ce6\n\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/bca4260d-11a2-452e-954f-dd559a5f52c6\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[ ] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"6f8e44d5fdfb2cfcfcbe79e0afa02fbe15263d9c"}},{"branch":"9.1","label":"v9.1.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
alvarezmelissa87 added a commit that referenced this pull request Aug 8, 2025
…ails (#230321) (#231196)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[ML][AI Connector] Ensure form fields persist when validation fails
(#230321)](#230321)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Melissa
Alvarez","email":"melissa.alvarez@elastic.co"},"sourceCommit":{"committedDate":"2025-08-08T16:21:40Z","message":"[ML][AI
Connector] Ensure form fields persist when validation fails
(#230321)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/218809\nThis is also an issue
in 8.18, 8.19, 9.0, and 9.1.\nNeeds to be backported for \n- [ ] 8.18.6
(after Aug 12) \n- [ ] 8.19.2 (after Aug 7)\n- [ ] 9.0.6 (after Aug
12)\n- [ ] 9.1.2 (after Aug 7)\n\nThis PR ensures that the validation of
the required provider fields does\nnot alter the list of required
fields, thus causing duplication of\nfields in the
form.\n\nBefore:\n\n\nhttps://github.com/user-attachments/assets/26d2b14d-abb8-40a4-8791-981d2e289ce6\n\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/bca4260d-11a2-452e-954f-dd559a5f52c6\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[ ] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"6f8e44d5fdfb2cfcfcbe79e0afa02fbe15263d9c","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","backport:version","Feature:Inference
UI","v9.2.0","v9.1.2","v8.19.2"],"title":"[ML][AI Connector] Ensure form
fields persist when validation
fails","number":230321,"url":"https://github.com/elastic/kibana/pull/230321","mergeCommit":{"message":"[ML][AI
Connector] Ensure form fields persist when validation fails
(#230321)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/218809\nThis is also an issue
in 8.18, 8.19, 9.0, and 9.1.\nNeeds to be backported for \n- [ ] 8.18.6
(after Aug 12) \n- [ ] 8.19.2 (after Aug 7)\n- [ ] 9.0.6 (after Aug
12)\n- [ ] 9.1.2 (after Aug 7)\n\nThis PR ensures that the validation of
the required provider fields does\nnot alter the list of required
fields, thus causing duplication of\nfields in the
form.\n\nBefore:\n\n\nhttps://github.com/user-attachments/assets/26d2b14d-abb8-40a4-8791-981d2e289ce6\n\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/bca4260d-11a2-452e-954f-dd559a5f52c6\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[ ] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"6f8e44d5fdfb2cfcfcbe79e0afa02fbe15263d9c"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230321","number":230321,"mergeCommit":{"message":"[ML][AI
Connector] Ensure form fields persist when validation fails
(#230321)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/218809\nThis is also an issue
in 8.18, 8.19, 9.0, and 9.1.\nNeeds to be backported for \n- [ ] 8.18.6
(after Aug 12) \n- [ ] 8.19.2 (after Aug 7)\n- [ ] 9.0.6 (after Aug
12)\n- [ ] 9.1.2 (after Aug 7)\n\nThis PR ensures that the validation of
the required provider fields does\nnot alter the list of required
fields, thus causing duplication of\nfields in the
form.\n\nBefore:\n\n\nhttps://github.com/user-attachments/assets/26d2b14d-abb8-40a4-8791-981d2e289ce6\n\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/bca4260d-11a2-452e-954f-dd559a5f52c6\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[ ] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"6f8e44d5fdfb2cfcfcbe79e0afa02fbe15263d9c"}},{"branch":"9.1","label":"v9.1.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
alvarezmelissa87 added a commit to alvarezmelissa87/kibana that referenced this pull request Aug 13, 2025
…lastic#230321)

## Summary

Fixes elastic#218809
This is also an issue in 8.18, 8.19, 9.0, and 9.1.
Needs to be backported for
- [ ] 8.18.6 (after Aug 12)
- [ ] 8.19.2 (after Aug 7)
- [ ] 9.0.6 (after Aug 12)
- [ ] 9.1.2 (after Aug 7)

This PR ensures that the validation of the required provider fields does
not alter the list of required fields, thus causing duplication of
fields in the form.

Before:

https://github.com/user-attachments/assets/26d2b14d-abb8-40a4-8791-981d2e289ce6

After:

https://github.com/user-attachments/assets/bca4260d-11a2-452e-954f-dd559a5f52c6

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit 6f8e44d)

# Conflicts:
#	x-pack/platform/packages/shared/kbn-inference-endpoint-ui-common/src/components/inference_service_form_fields.tsx
@alvarezmelissa87

Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
✅ 9.0
✅ 8.18

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

alvarezmelissa87 added a commit to alvarezmelissa87/kibana that referenced this pull request Aug 13, 2025
…lastic#230321)

## Summary

Fixes elastic#218809
This is also an issue in 8.18, 8.19, 9.0, and 9.1.
Needs to be backported for
- [ ] 8.18.6 (after Aug 12)
- [ ] 8.19.2 (after Aug 7)
- [ ] 9.0.6 (after Aug 12)
- [ ] 9.1.2 (after Aug 7)

This PR ensures that the validation of the required provider fields does
not alter the list of required fields, thus causing duplication of
fields in the form.

Before:

https://github.com/user-attachments/assets/26d2b14d-abb8-40a4-8791-981d2e289ce6

After:

https://github.com/user-attachments/assets/bca4260d-11a2-452e-954f-dd559a5f52c6

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit 6f8e44d)

# Conflicts:
#	x-pack/platform/packages/shared/kbn-inference-endpoint-ui-common/src/components/inference_service_form_fields.tsx
alvarezmelissa87 added a commit that referenced this pull request Aug 13, 2025
…ails (#230321) (#231707)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[ML][AI Connector] Ensure form fields persist when validation fails
(#230321)](#230321)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Melissa
Alvarez","email":"melissa.alvarez@elastic.co"},"sourceCommit":{"committedDate":"2025-08-08T16:21:40Z","message":"[ML][AI
Connector] Ensure form fields persist when validation fails
(#230321)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/218809\nThis is also an issue
in 8.18, 8.19, 9.0, and 9.1.\nNeeds to be backported for \n- [ ] 8.18.6
(after Aug 12) \n- [ ] 8.19.2 (after Aug 7)\n- [ ] 9.0.6 (after Aug
12)\n- [ ] 9.1.2 (after Aug 7)\n\nThis PR ensures that the validation of
the required provider fields does\nnot alter the list of required
fields, thus causing duplication of\nfields in the
form.\n\nBefore:\n\n\nhttps://github.com/user-attachments/assets/26d2b14d-abb8-40a4-8791-981d2e289ce6\n\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/bca4260d-11a2-452e-954f-dd559a5f52c6\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[ ] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"6f8e44d5fdfb2cfcfcbe79e0afa02fbe15263d9c","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","backport
pending",":ml","backport:version","Feature:Inference
UI","v9.2.0","v9.1.1","v8.19.1","v9.1.2","v8.19.2","v9.0.6","v8.18.6"],"title":"[ML][AI
Connector] Ensure form fields persist when validation
fails","number":230321,"url":"https://github.com/elastic/kibana/pull/230321","mergeCommit":{"message":"[ML][AI
Connector] Ensure form fields persist when validation fails
(#230321)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/218809\nThis is also an issue
in 8.18, 8.19, 9.0, and 9.1.\nNeeds to be backported for \n- [ ] 8.18.6
(after Aug 12) \n- [ ] 8.19.2 (after Aug 7)\n- [ ] 9.0.6 (after Aug
12)\n- [ ] 9.1.2 (after Aug 7)\n\nThis PR ensures that the validation of
the required provider fields does\nnot alter the list of required
fields, thus causing duplication of\nfields in the
form.\n\nBefore:\n\n\nhttps://github.com/user-attachments/assets/26d2b14d-abb8-40a4-8791-981d2e289ce6\n\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/bca4260d-11a2-452e-954f-dd559a5f52c6\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[ ] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"6f8e44d5fdfb2cfcfcbe79e0afa02fbe15263d9c"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230321","number":230321,"mergeCommit":{"message":"[ML][AI
Connector] Ensure form fields persist when validation fails
(#230321)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/218809\nThis is also an issue
in 8.18, 8.19, 9.0, and 9.1.\nNeeds to be backported for \n- [ ] 8.18.6
(after Aug 12) \n- [ ] 8.19.2 (after Aug 7)\n- [ ] 9.0.6 (after Aug
12)\n- [ ] 9.1.2 (after Aug 7)\n\nThis PR ensures that the validation of
the required provider fields does\nnot alter the list of required
fields, thus causing duplication of\nfields in the
form.\n\nBefore:\n\n\nhttps://github.com/user-attachments/assets/26d2b14d-abb8-40a4-8791-981d2e289ce6\n\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/bca4260d-11a2-452e-954f-dd559a5f52c6\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[ ] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"6f8e44d5fdfb2cfcfcbe79e0afa02fbe15263d9c"}},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/231196","number":231196,"state":"MERGED","mergeCommit":{"sha":"e58cbd7fd5d6c1675c59de562f9fe750486614b8","message":"[9.1]
[ML][AI Connector] Ensure form fields persist when validation fails
(#230321) (#231196)\n\n# Backport\n\nThis will backport the following
commits from `main` to `9.1`:\n- [[ML][AI Connector] Ensure form fields
persist when validation
fails\n(#230321)](https://github.com/elastic/kibana/pull/230321)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n"}},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/231197","number":231197,"state":"MERGED","mergeCommit":{"sha":"38047304838da5d02a3e30ea1e9da370f658171f","message":"[8.19]
[ML][AI Connector] Ensure form fields persist when validation fails
(#230321) (#231197)\n\n# Backport\n\nThis will backport the following
commits from `main` to `8.19`:\n- [[ML][AI Connector] Ensure form fields
persist when validation
fails\n(#230321)](https://github.com/elastic/kibana/pull/230321)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n"}},{"branch":"9.0","label":"v9.0.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
alvarezmelissa87 added a commit that referenced this pull request Aug 13, 2025
…fails (#230321) (#231708)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[ML][AI Connector] Ensure form fields persist when validation fails
(#230321)](#230321)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Melissa
Alvarez","email":"melissa.alvarez@elastic.co"},"sourceCommit":{"committedDate":"2025-08-08T16:21:40Z","message":"[ML][AI
Connector] Ensure form fields persist when validation fails
(#230321)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/218809\nThis is also an issue
in 8.18, 8.19, 9.0, and 9.1.\nNeeds to be backported for \n- [ ] 8.18.6
(after Aug 12) \n- [ ] 8.19.2 (after Aug 7)\n- [ ] 9.0.6 (after Aug
12)\n- [ ] 9.1.2 (after Aug 7)\n\nThis PR ensures that the validation of
the required provider fields does\nnot alter the list of required
fields, thus causing duplication of\nfields in the
form.\n\nBefore:\n\n\nhttps://github.com/user-attachments/assets/26d2b14d-abb8-40a4-8791-981d2e289ce6\n\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/bca4260d-11a2-452e-954f-dd559a5f52c6\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[ ] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"6f8e44d5fdfb2cfcfcbe79e0afa02fbe15263d9c","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","backport
pending",":ml","backport:version","Feature:Inference
UI","v9.2.0","v9.1.1","v8.19.1","v9.1.2","v8.19.2","v9.0.6","v8.18.6"],"title":"[ML][AI
Connector] Ensure form fields persist when validation
fails","number":230321,"url":"https://github.com/elastic/kibana/pull/230321","mergeCommit":{"message":"[ML][AI
Connector] Ensure form fields persist when validation fails
(#230321)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/218809\nThis is also an issue
in 8.18, 8.19, 9.0, and 9.1.\nNeeds to be backported for \n- [ ] 8.18.6
(after Aug 12) \n- [ ] 8.19.2 (after Aug 7)\n- [ ] 9.0.6 (after Aug
12)\n- [ ] 9.1.2 (after Aug 7)\n\nThis PR ensures that the validation of
the required provider fields does\nnot alter the list of required
fields, thus causing duplication of\nfields in the
form.\n\nBefore:\n\n\nhttps://github.com/user-attachments/assets/26d2b14d-abb8-40a4-8791-981d2e289ce6\n\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/bca4260d-11a2-452e-954f-dd559a5f52c6\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[ ] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"6f8e44d5fdfb2cfcfcbe79e0afa02fbe15263d9c"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230321","number":230321,"mergeCommit":{"message":"[ML][AI
Connector] Ensure form fields persist when validation fails
(#230321)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/218809\nThis is also an issue
in 8.18, 8.19, 9.0, and 9.1.\nNeeds to be backported for \n- [ ] 8.18.6
(after Aug 12) \n- [ ] 8.19.2 (after Aug 7)\n- [ ] 9.0.6 (after Aug
12)\n- [ ] 9.1.2 (after Aug 7)\n\nThis PR ensures that the validation of
the required provider fields does\nnot alter the list of required
fields, thus causing duplication of\nfields in the
form.\n\nBefore:\n\n\nhttps://github.com/user-attachments/assets/26d2b14d-abb8-40a4-8791-981d2e289ce6\n\n\nAfter:\n\n\nhttps://github.com/user-attachments/assets/bca4260d-11a2-452e-954f-dd559a5f52c6\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[ ] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"6f8e44d5fdfb2cfcfcbe79e0afa02fbe15263d9c"}},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/231196","number":231196,"state":"MERGED","mergeCommit":{"sha":"e58cbd7fd5d6c1675c59de562f9fe750486614b8","message":"[9.1]
[ML][AI Connector] Ensure form fields persist when validation fails
(#230321) (#231196)\n\n# Backport\n\nThis will backport the following
commits from `main` to `9.1`:\n- [[ML][AI Connector] Ensure form fields
persist when validation
fails\n(#230321)](https://github.com/elastic/kibana/pull/230321)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n"}},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/231197","number":231197,"state":"MERGED","mergeCommit":{"sha":"38047304838da5d02a3e30ea1e9da370f658171f","message":"[8.19]
[ML][AI Connector] Ensure form fields persist when validation fails
(#230321) (#231197)\n\n# Backport\n\nThis will backport the following
commits from `main` to `8.19`:\n- [[ML][AI Connector] Ensure form fields
persist when validation
fails\n(#230321)](https://github.com/elastic/kibana/pull/230321)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n"}},{"branch":"9.0","label":"v9.0.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
@peteharverson peteharverson changed the title [ML][AI Connector] Ensure form fields persist when validation fails [ML][AI Connector] Ensures form fields persist when validation fails Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[AI Connector] Form field disappears or shows in different order

6 participants