Skip to content

Fix endpoint Validate and Save persisting invalid values - #943

Open
mihaelabalutoiu wants to merge 4 commits into
cloudbase:mainfrom
mihaelabalutoiu:fix-endpoint-validate-and-save
Open

mihaelabalutoiu wants to merge 4 commits into
cloudbase:mainfrom
mihaelabalutoiu:fix-endpoint-validate-and-save

Conversation

@mihaelabalutoiu

@mihaelabalutoiu mihaelabalutoiu commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Previously, the Validate and Save button saved the endpoint without waiting for validation, so invalid values were kept, and a later attempt could show the error of the previous values.

This PR implements the following:

  • Validate the proposed endpoint connection info:
    • add EndpointSource.validateConnectionInfo, which sends the form's platform, connection_info and mapped_regions to the new validate-connection-info action on /endpoints/actions.
  • Save endpoints only after they pass validation:
    • create or update the endpoint only if validation passes. When validation fails, nothing is saved and the stored endpoint is unchanged.
  • Fix endpoint Validate and Save persisting invalid values:
    • the modal keeps the user's values, ignores repeated submits, shows "Saving ..." while saving and closes only after the endpoint is saved.
  • Update the unit and Cypress tests.
  • Allow running the build workflow manually.

@mihaelabalutoiu
mihaelabalutoiu marked this pull request as draft September 28, 2026 12:56
Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
@mihaelabalutoiu
mihaelabalutoiu force-pushed the fix-endpoint-validate-and-save branch from 5adaffa to 2a117b1 Compare October 1, 2026 09:15
@mihaelabalutoiu
mihaelabalutoiu marked this pull request as ready for review October 1, 2026 09:21
@mihaelabalutoiu
mihaelabalutoiu marked this pull request as draft October 12, 2026 09:49
Add `EndpointSource.validateConnectionInfo`, which validates the
endpoint's platform and connection info through the
`validate-connection-info` action, so it can be checked before it is
saved.

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
Add `validateAndSave`, which validates the proposed values and only
creates or updates the endpoint if they are valid, so a failed
validation leaves nothing saved.

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
Validate the endpoint before saving it and keep the user's values
when the validation fails.

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
@mihaelabalutoiu
mihaelabalutoiu force-pushed the fix-endpoint-validate-and-save branch from 2a117b1 to 9391763 Compare October 12, 2026 11:11
@mihaelabalutoiu
mihaelabalutoiu marked this pull request as ready for review October 13, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant