bito-code-review[bot] commented on PR #44000:
URL: https://github.com/apache/superset/pull/44000#issuecomment-5586568598
<!-- Bito Reply -->
The flagged issue is correct. When updating a database, the comparison logic
for `ssh_tunnel` was incorrectly handling masked credentials in full payloads,
causing unchanged tunnels to be treated as changed and preventing offline
metadata updates.
To resolve this, the comparison logic for `ssh_tunnel` should be updated to
properly unmask and compare the fields, ensuring that unchanged tunnels do not
trigger a connection validation failure. The implementation in the PR correctly
addresses this by using `unmask_password_info` to normalize the incoming tunnel
configuration against the existing one before comparison.
**superset/commands/database/update.py**
```
elif key == "ssh_tunnel" and original is not None and incoming is not None:
incoming = unmask_password_info(incoming.copy(), original)
incoming = {
field: incoming.get(field) for field in
original.export_fields
}
original = {
field: getattr(original, field) for field in
original.export_fields
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]