Skip to content

Validate endpoint connection info without saving it first - #536

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

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

Conversation

@mihaelabalutoiu

@mihaelabalutoiu mihaelabalutoiu commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Previously, the endpoint validation API only worked on stored endpoints (/endpoints/{id}/actions), so we had to save an endpoint before we could check its connection info. Invalid endpoints were persisted when validation failed.

This PR implements the following:

  • Support validation bodies in key error messages:
    • allow format_keyerror_message to describe missing attributes of a validation request body.
  • Validate endpoint connection info without saving it first:
    • move the validation action to /endpoints/actions and validate the platform and connection_info given in the request body, so an endpoint can be checked before it is saved.
  • Updates the API reference, the policy docs and the unit tests.

Related PRs: coriolis-web python-coriolisclient

Allow `format_keyerror_message` to describe missing attributes of a
validation request body.

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
Move the validation action to `/endpoints/actions` and validate the
platform and connection info given in the request body, so an
endpoint can be checked before it is saved.

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
@mihaelabalutoiu
mihaelabalutoiu force-pushed the fix-endpoint-validate-and-save branch from a4ab0a4 to 2626c4b Compare October 1, 2026 09:47
@mihaelabalutoiu

Copy link
Copy Markdown
Member Author

Note: The integration tests fail with:

TypeError: EndpointManager.validate_connection() takes 2 positional arguments but 3 were given

This is expected: the integration tests install python-coriolisclient from its main branch, which still has the old validate_connection(endpoint) signature.
The CLI PR needs to be merged first, then the integration tests can be re-run.

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