korbit-ai[bot] commented on code in PR #32048:
URL: https://github.com/apache/superset/pull/32048#discussion_r1970623277
##########
superset/commands/database/validate.py:
##########
@@ -96,7 +96,7 @@ def run(self) -> None:
server_cert=self._properties.get("server_cert", ""),
extra=self._properties.get("extra", "{}"),
impersonate_user=self._properties.get("impersonate_user", False),
- encrypted_extra=serialized_encrypted_extra,
+ encrypted_extra=json.dumps(encrypted_extra),
Review Comment:
### Double JSON Encoding of encrypted_extra <sub></sub>
<details>
<summary>Tell me more</summary>
###### What is the issue?
The `encrypted_extra` value is being double JSON encoded because
`encrypted_extra` is already a parsed JSON object from
`serialized_encrypted_extra`.
###### Why this matters
Double JSON encoding will cause issues when trying to decrypt or use the
encrypted_extra values later, as it will contain escaped quotes and require
double parsing.
###### Suggested change ∙ *Feature Preview*
Use the original serialized value instead of re-encoding:
```python
encrypted_extra=serialized_encrypted_extra
```
</details>
<sub>
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/8a11a32a-1737-4cf0-a336-6e00fbcf73c7?suggestedFixEnabled=true)
💬 Chat with Korbit by mentioning @korbit-ai.
</sub>
<!--- korbi internal id:4d4a4cdc-0681-4e4f-b5c9-3865192480fa -->
--
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]