- Treat any non-empty validation object as blocking in the save guard;
the previous check missed object-shaped returns like
the duplicate database_name error and let the save proceed
- Forward ssh_tunnel into build_db_for_connection_test so tunnel-only
databases are reached through the tunnel during validation instead of
being pinged directly, mirroring the existing test_connection flow
- Honor explicit parameters.ssh === False as authoritative; a stale
ssh_tunnel payload no longer keeps SSH validation on after the user
toggles the tunnel off
- Emit both and as missing credentials so the
active SSH login pane always surfaces the field error (the backend
doesn't know which method the user picked)
- Drop private_key implies private_key_password check; the schema permits
unencrypted private keys and the prior check rejected valid SSH configs
- Surface SSH feature-flag and missing-port errors as field-level
SupersetError entries instead of raising 400s, so blur-driven validation
shows field hints rather than hard toasts
- Return null from both stale paths in useDatabaseValidation so callers
can distinguish discarded responses from real outcomes and skip caching
- Add isValidating to LabeledErrorBoundInputProps so the prop typechecks
explicitly instead of via the [x: string]: any index signature
Three correctness fixes to ValidateDatabaseParametersCommand:
1. Bypass engines (bigquery, datastore, snowflake) now also surface
database_name uniqueness errors and SSH tunnel field errors during
progressive validation, instead of silently passing.
2. The SSH feature-flag and database-port guards now fire when the UI
marks parameters.ssh, not just when the ssh_tunnel payload is
non-empty — the form sends an empty tunnel object in early stages.
3. The "parameters are missing" message for SSH tunnel fields now
interpolates the %(missing)s placeholder via gettext, so the
response surfaces the actual missing fields instead of the literal
token.
Adds unit tests for each branch and removes the now-unused
_validate_database_name helper.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds unit tests for the duplicate-database-name check (create + update
paths, plus the bypass-engine path), the SSH tunnel feature-flag and
db-port guards, and the SSH tunnel field-level error collection
(missing required fields, missing credentials, private key without
password). Brings patch coverage on commands/database/validate.py up
from ~44%.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>