sadpandajoe commented on code in PR #45068:
URL: https://github.com/apache/superset/pull/45068#discussion_r4426418871


##########
superset/commands/dataset/export.py:
##########
@@ -137,6 +173,11 @@ def _export(
                     )
                     payload["ssh_tunnel"] = 
mask_password_info(ssh_tunnel_payload)
 
+                if carried := _carried_secure_extra(
+                    model.database.masked_encrypted_extra
+                ):
+                    payload["masked_encrypted_extra"] = carried

Review Comment:
   This puts a partial Secure Extra (only `oauth2_client_info` / 
`embedded_credentials`) into every dashboard, chart and dataset bundle, but 
`import_database()` treats `masked_encrypted_extra` as the whole new 
`encrypted_extra`: `reveal_sensitive` only fills masks, it does not merge the 
stored blob. Take a Snowflake connection that has `auth_method: keypair` with 
`auth_params.privatekey_body` plus an `oauth2_client_info` block. Export a 
dashboard that uses it, then re-import with `overwrite` and `overwrite_all`: 
the connection's Secure Extra is replaced by just the OAuth2 block, the key 
pair is gone, and connection tests and background reports stop authenticating. 
Before this change these bundles carried no Secure Extra, so the stored one was 
left alone, and this happens with the fallback flag off too. Should the import 
keep stored blocks the bundle doesn't carry (or only apply this for a full 
database export)?



##########
superset/translations/messages.pot:
##########
@@ -146,7 +146,7 @@ msgstr ""
 msgid "\"%s\" is now the system default theme"
 msgstr ""
 
-#, no-python-format
+#, python-format

Review Comment:
   This regeneration flips `% calculation`, `% of parent` and `% of total` from 
`no-python-format` to `python-format`, and drops about 25 existing `#. 
do-not-translate` notes elsewhere in the file. These are literal labels, so a 
catalog tool will read `% c` / `% o` as format specifiers and can reject or 
mangle valid translations, and translators lose the don't-translate hints. 
Could the pot be regenerated so it only adds the new strings and keeps the 
existing flags and notes?



-- 
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]

Reply via email to