FrancescoCastaldi commented on code in PR #43695:
URL: https://github.com/apache/superset/pull/43695#discussion_r4401479034


##########
tests/unit_tests/db_engine_specs/test_ascend.py:
##########
@@ -0,0 +1,53 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+import pytest
+
+from superset.constants import TimeGrain
+from superset.db_engine_specs.ascend import AscendEngineSpec
+from superset.db_engine_specs.impala import ImpalaEngineSpec
+
+
+def test_ascend_properties() -> None:
+    assert AscendEngineSpec.engine == "ascend"
+    assert AscendEngineSpec.engine_name == "Ascend"
+    assert issubclass(AscendEngineSpec, ImpalaEngineSpec)
+
+
+def test_ascend_metadata() -> None:
+    metadata = AscendEngineSpec.metadata
+    assert "Ascend.io" in metadata["description"]

Review Comment:
   This URL substring check is contained within an isolated unit test fixture 
(`test_ascend.py`) that validates engine specification properties against mock 
connection strings. It does not handle untrusted user redirect URLs in 
production routing logic.



##########
superset/db_engine_specs/aurora.py:
##########
@@ -55,6 +79,34 @@ class AuroraPostgresDataAPI(PostgresEngineSpec):
         "region_name={region_name}"
     )
 
+    metadata = {
+        "description": (
+            "Amazon Aurora PostgreSQL via the Data API for serverless 
connectivity."
+        ),
+        "logo": "aws-aurora.jpg",
+        "homepage_url": "https://aws.amazon.com/rds/aurora/";,
+        "categories": [
+            DatabaseCategory.CLOUD_AWS,
+            DatabaseCategory.HOSTED_OPEN_SOURCE,
+        ],
+        "pypi_packages": ["sqlalchemy-aurora-data-api"],
+        "connection_string": (
+            
"postgresql+auroradataapi://{aws_access_id}:{aws_secret_access_key}@/"
+            "{database_name}?aurora_cluster_arn={aurora_cluster_arn}&"
+            "secret_arn={secret_arn}&region_name={region_name}"
+        ),
+        "parameters": {
+            "aws_access_id": "AWS Access Key ID",
+            "aws_secret_access_key": "AWS Secret Access Key",
+            "database_name": "Database name",
+            "aurora_cluster_arn": "Aurora cluster ARN",
+            "secret_arn": "Secrets Manager ARN for credentials",
+            "region_name": "AWS region (e.g., us-east-1)",
+        },
+        "docs_url": 
"https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/";,
+        "known_incompatibilities": AURORA_DATA_API_KNOWN_INCOMPATIBILITIES,
+    }

Review Comment:
   Acknowledged. `default_port: 5432` has been added to `AuroraPostgresDataAPI` 
engine spec metadata, satisfying `PostgresEngineSpec.build_sqlalchemy_uri` when 
port parameters are omitted.



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