This is an automated email from the ASF dual-hosted git repository.
jshao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/main by this push:
new b453b07d2 [#5540] Improvement(dev/release): Update the `LICENSE` file
to fix the wrong path problem (#5561)
b453b07d2 is described below
commit b453b07d21afe4ebef7ae2502a22b96de2404151
Author: Chun-Hao Liu <[email protected]>
AuthorDate: Wed Nov 13 19:35:00 2024 +0800
[#5540] Improvement(dev/release): Update the `LICENSE` file to fix the
wrong path problem (#5561)
### What changes were proposed in this pull request?
This script checks if all the files mentioned in the LICENSE file are
present in the project.
Besides highlighting the missing files, it will display possible
locations for any new files.
This script adds text like [NOT FOUND] --> "new/path/to/the/file" in the
end of the line where the file is missing.
With the output of this script, you can update the LICENSE file with the
correct file paths.
new file:
./dev/release/check-license.sh (script for checking the missing files)
modified:
./LICENSE (remove missing files or replace them with the newly found
files)
### Why are the changes needed?
Some code paths listed in LICENSE file are already outdated due to the
refactoring of the codes.
We need to update the path to reflect the actual one.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
```bash
./check-license.sh
```
This script adds [NOT FOUND] --> "new/path/to/the/file" in the end of
the line where the file is missing.

This script will show the following message if all checks pass:

---
LICENSE | 48 +++++++++++++++++------------------
dev/release/check-license.sh | 60 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 83 insertions(+), 25 deletions(-)
diff --git a/LICENSE b/LICENSE
index 8b3617a34..ed209aed9 100644
--- a/LICENSE
+++ b/LICENSE
@@ -219,7 +219,7 @@
./api/src/main/java/org/apache/gravitino/rel/expressions/transforms/Transform.java
./api/src/main/java/org/apache/gravitino/rel/expressions/Expression.java
./api/src/main/java/org/apache/gravitino/rel/expressions/NamedReference.java
-
./spark-connector/spark-connector/src/test/java/org/apache/gravitino/spark/connector/integration/test/util/SparkUtilIT.java
+
./spark-connector/spark-common/src/test/java/org/apache/gravitino/spark/connector/integration/test/util/SparkUtilIT.java
./dev/release/do-release.sh
./dev/release/release-build.sh
./dev/release/release-tag.sh
@@ -227,15 +227,15 @@
Apache Iceberg
./api/src/main/java/org/apache/gravitino/exceptions/RESTException.java
-
./catalogs/catalog-hive/src/main/java/org/apache/gravitino/catalog/hive/CachedClientPool.java
-
./catalogs/catalog-hive/src/main/java/org/apache/gravitino/catalog/hive/HiveClientPool.java
-
./catalogs/catalog-hive/src/main/java/org/apache/gravitino/catalog/hive/dyn/DynConstructors.java
-
./catalogs/catalog-hive/src/main/java/org/apache/gravitino/catalog/hive/dyn/DynFields.java
-
./catalogs/catalog-hive/src/main/java/org/apache/gravitino/catalog/hive/dyn/DynMethods.java
-
./catalogs/catalog-hive/src/test/java/org/apache/gravitino/catalog/hive/miniHMS/MiniHiveMetastore.java
-
./catalogs/catalog-hive/src/test/java/org/apache/gravitino/catalog/hive/miniHMS/MiniHiveMetastoreService.java
-
./catalogs/catalog-hive/src/test/java/org/apache/gravitino/catalog/hive/miniHMS/ScriptRunner.java
-
./catalogs/catalog-hive/src/test/java/org/apache/gravitino/catalog/hive/TestCachedClientPool.java
+
./catalogs/hive-metastore-common/src/main/java/org/apache/gravitino/hive/CachedClientPool.java
+
./catalogs/hive-metastore-common/src/main/java/org/apache/gravitino/hive/HiveClientPool.java
+
./catalogs/hive-metastore-common/src/main/java/org/apache/gravitino/hive/dyn/DynConstructors.java
+
./catalogs/hive-metastore-common/src/main/java/org/apache/gravitino/hive/dyn/DynFields.java
+
./catalogs/hive-metastore-common/src/main/java/org/apache/gravitino/hive/dyn/DynMethods.java
+
./catalogs/hive-metastore-common/src/test/java/org/apache/gravitino/hive/hms/MiniHiveMetastore.java
+
./catalogs/hive-metastore-common/src/test/java/org/apache/gravitino/hive/hms/MiniHiveMetastoreService.java
+
./catalogs/hive-metastore-common/src/test/java/org/apache/gravitino/hive/hms/ScriptRunner.java
+
./catalogs/hive-metastore-common/src/test/java/org/apache/gravitino/hive/TestCachedClientPool.java
./catalogs/catalog-lakehouse-iceberg/src/main/java/org/apache/gravitino/catalog/lakehouse/iceberg/converter/DescribeIcebergSortOrderVisitor.java
./catalogs/catalog-lakehouse-iceberg/src/main/java/org/apache/gravitino/catalog/lakehouse/iceberg/utils/IcebergTablePropertiesUtil.java
./clients/client-java/src/main/java/org/apache/gravitino/client/HTTPClient.java
@@ -255,7 +255,7 @@
./catalogs/catalog-lakehouse-paimon/src/main/java/org/apache/gravitino/catalog/lakehouse/paimon/utils/TypeUtils.java
Apache Hive
- ./catalogs/catalog-hive/src/test/resources/hive-schema-3.1.0.derby.sql
+
./catalogs/hive-metastore-common/src/test/resources/hive-schema-3.1.0.derby.sql
Apache Zeppelin
./integration-test-common/src/test/java/org/apache/gravitino/integration/test/util/CommandExecutor.java
@@ -273,8 +273,7 @@
./server-common/src/main/java/org/apache/gravitino/server/authentication/KerberosServerUtils.java
Apache Kafka
- ./integration-test/src/test/resources/run
- ./catalogs/catalog-kafka/src/test/resources/run
+ ./integration-test-common/docker-script/init/kafka/run
./core/src/main/java/org/apache/gravitino/utils/Bytes.java
Apache Submarine
@@ -287,24 +286,23 @@
Trino
./integration-test-common/src/test/java/org/apache/gravitino/integration/test/util/CloseableGroup.java
-
./trino-connector/src/main/java/org/apache/gravitino/trino/connector/catalog/hive/SortingColumn.java
+
./trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/catalog/hive/SortingColumn.java
Apache Arrow
./dev/ci/util_free_space.sh
+ Apache Ranger
+
./authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/reference/JsonDateSerializer.java
+
./authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/reference/RangerCommonEnums.java
+
./authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/reference/VList.java
+
./authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/reference/VXDataObject.java
+
./authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/reference/VXGroup.java
+
./authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/reference/VXGroupList.java
+
./authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/reference/VXUser.java
+
./authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/reference/VXUserList.java
+
This product bundles a third-party component under the
MIT License.
Kyligence/kylinpy
- ./clients/client-python/gravitino/utils/exceptions.py
./clients/client-python/gravitino/utils/http_client.py
-
- Apache Ranger
-
./security-admin/src/main/java/org/apache/ranger/defines/JsonDateSerializer.java
-
./security-admin/src/main/java/org/apache/ranger/defines/RangerCommonEnums.java
- ./security-admin/src/main/java/org/apache/ranger/view/VList.java
- ./security-admin/src/main/java/org/apache/ranger/view/VXDataObject.java
- ./security-admin/src/main/java/org/apache/ranger/view/VXGroup.java
- ./security-admin/src/main/java/org/apache/ranger/view/VXGroupList.java
- ./security-admin/src/main/java/org/apache/ranger/view/VXUser.java
- ./security-admin/src/main/java/org/apache/ranger/view/VXUserList.java
diff --git a/dev/release/check-license.sh b/dev/release/check-license.sh
new file mode 100755
index 000000000..34838fa1f
--- /dev/null
+++ b/dev/release/check-license.sh
@@ -0,0 +1,60 @@
+#!/usr/bin/env bash
+
+#
+# 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.
+#
+
+# This script checks if all the files mentioned in the LICENSE file are
present in the project.
+# Besides highlighting the missing files, it will display possible locations
for any new files.
+# It adds text like [NOT FOUND] --> "new/path/to/the/file" in the end of the
line where the file is missing.
+# With the output of this script, you can update the LICENSE file with the
correct file paths.
+
+FAILED=0
+
+PROJECT_ROOT=${1:-$(dirname $(dirname $(dirname $(readlink -f "$0"))))}
+LICENSE_FILE=$(cat "$PROJECT_ROOT"/LICENSE)
+
+cd "$PROJECT_ROOT" || exit 1
+
+while IFS= read -r line; do
+ echo -n "$line"
+
+ line=$(echo "$line" | xargs)
+ # check if the line is a file
+ if [[ "$line" == "./"* && "$line" == *"."* ]]; then
+ line=$(echo "$line" | cut -c 3-)
+
+ # check if the file does not exists
+ if [ ! -f "$line" ]; then
+ FAILED=1
+ echo -n -e " \033[0;31m[NOT FOUND]\033[0m --> "
+
+ file_name=$(basename "$line")
+ # scan for the file name in the project root excluding the '.gradle'
directory
+ # and print the new file path if found in the project
+ find . -type f -not -path '*/\.gradle/*' -name "$file_name" | tr -d '\n'
+ fi
+ fi
+ echo
+
+done <<< "$LICENSE_FILE"
+
+# check if any file is missing
+if [ $FAILED -ne 0 ]; then
+ echo -e "\033[0;31mSome files listed in the LICENSE file are missing.
\033[0m"
+ exit 1
+fi
+echo -e "\033[0;32mAll files listed in the LICENSE file are present. \033[0m"