eschutho commented on code in PR #44280:
URL: https://github.com/apache/superset/pull/44280#discussion_r4261210934
##########
superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/constants.ts:
##########
@@ -90,6 +96,12 @@ export const FORM_FIELD_MAP = {
warehouse: validatedInputField,
role: validatedInputField,
account: validatedInputField,
+ aws_access_key_id: validatedInputField,
+ aws_secret_access_key: validatedInputField,
Review Comment:
Fixed in d60365e428. The secret now has a dedicated
`awsSecretAccessKeyField` (in `CommonParameters.tsx`, mapped here in
`constants.ts`) that always renders the masked password input with the
show/hide toggle. It is masked in **both add and edit mode**: the earlier
version passed `visibilityToggle={!isEditMode}`, and because
`LabeledErrorBoundInput` only masks when `visibilityToggle` is set (or the
field is literally named `password`), edit mode fell back to a plaintext input.
The special case was also removed from the generic `validatedInputField`.
Covered by `AwsSecretAccessKeyField.test.tsx` (asserts `type="password"` in add
and edit mode).
##########
superset/db_engine_specs/athena.py:
##########
@@ -190,3 +258,97 @@ def get_schema_from_engine_params(
awsathena+rest://athena.{region_name}.amazonaws.com:443/{schema_name}?catalog_name={catalog_name}&s3_staging_dir={s3_staging_dir}
"""
return sqlalchemy_uri.database
+
+ @classmethod
+ def build_sqlalchemy_uri(
+ cls,
+ parameters: AthenaParametersType,
+ encrypted_extra: Optional[ # pylint: disable=unused-argument
+ dict[str, Any]
+ ] = None,
+ ) -> str:
+ query: dict[str, str] = {"s3_staging_dir":
parameters["s3_staging_dir"]}
Review Comment:
Fixed in d60365e428. Every URI query parameter that is not its own form
field (`catalog_name`, plus `role_arn`, `endpoint_url` and anything else) now
round-trips through the standard `query` ("Additional Parameters") parameter:
`get_parameters_from_uri` collects them and `build_sqlalchemy_uri` writes them
back, with the S3 location / work group fields taking precedence over duplicate
keys. Nothing is silently dropped on re-save, and these params are visible and
editable in the form. Covered by
`test_parameters_round_trip_preserves_extra_query_params` and
`test_parameters_round_trip_form_fields_win_over_query`.
--
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]