Copilot commented on code in PR #569: URL: https://github.com/apache/ranger/pull/569#discussion_r2114805056
########## kms/src/main/java/org/apache/hadoop/crypto/key/RangerKeyStoreProvider.java: ########## @@ -66,7 +66,7 @@ public class RangerKeyStoreProvider extends KeyProvider { private static final String CREDENTIAL_PATH = "ranger.ks.jpa.jdbc.credential.provider.path"; private static final String MK_CREDENTIAL_ALIAS = "ranger.ks.masterkey.credential.alias"; private static final String DB_CREDENTIAL_ALIAS = "ranger.ks.jpa.jdbc.credential.alias"; - private static final String DB_PASSWORD = "ranger.ks.jpa.jdbc.password"; + public static final String DB_PASSWORD = "ranger.ks.jpa.jdbc.password"; Review Comment: Changing DB_PASSWORD from private to public can affect the module's API. Please ensure this change is intentional and that the reasoning is clearly documented. ########## liquibase-database-upgrade/changelogs/kms/db/test_3.x/kms_rename_col_zdu.xml: ########## @@ -0,0 +1,56 @@ +<!-- + 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. +--> +<databaseChangeLog + xmlns="http://www.liquibase.org/xml/ns/dbchangelog" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" + xmlns:pro="http://www.liquibase.org/xml/ns/pro" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog + http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd + http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd + http://www.liquibase.org/xml/ns/pro http://www.liquibase.org/xml/ns/pro/liquibase-pro-latest.xsd"> + <changeSet id="5a" author="fateh"> + <addColumn tableName="ranger_keystore"> + <column name="kms_encoded_value" + type="varchar(2048)"/> + </addColumn> + <!-- <rollback>--> + <!-- <!– Drop constraints/indexes that reference the new column (if any)--> + <!--<sql>ALTER TABLE ranger_keystore DROP CONSTRAINT constraint_name;</sql> –>--> + <!-- <!– Drop the old column –>--> + <!-- <dropColumn tableName="ranger_keystore"></dropColumn>--> + <!-- </rollback>--> Review Comment: [nitpick] There is a block of commented-out rollback code in the changeset. Consider either removing it if not needed or implementing proper rollback logic and documenting its purpose. ```suggestion <rollback> <!-- Drop constraints/indexes that reference the new column (if any) --> <sql>ALTER TABLE ranger_keystore DROP CONSTRAINT IF EXISTS constraint_name;</sql> <!-- Drop the added column --> <dropColumn tableName="ranger_keystore" columnName="kms_encoded_value"/> </rollback> ``` -- 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: dev-unsubscr...@ranger.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org