diff --git a/.dockerignore b/.dockerignore index d56f0ecb9..880ed50cd 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,19 @@ +# +# Copyright (c) 2024 Snowflake Computing Inc. +# +# Licensed 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. +# + polaris-service/logs polaris-service/build polaris-core/build diff --git a/.github/ISSUE_TEMPLATE/1-bug_report.yml b/.github/ISSUE_TEMPLATE/1-bug_report.yml index 27162ba41..f7491b37e 100644 --- a/.github/ISSUE_TEMPLATE/1-bug_report.yml +++ b/.github/ISSUE_TEMPLATE/1-bug_report.yml @@ -1,3 +1,19 @@ +# +# Copyright (c) 2024 Snowflake Computing Inc. +# +# Licensed 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. +# + name: Bug report description: Create a report to help us improve. title: "[BUG]" diff --git a/.github/ISSUE_TEMPLATE/2-feature_request.yml b/.github/ISSUE_TEMPLATE/2-feature_request.yml index 236fc1c30..6ef8fc8b6 100644 --- a/.github/ISSUE_TEMPLATE/2-feature_request.yml +++ b/.github/ISSUE_TEMPLATE/2-feature_request.yml @@ -1,3 +1,19 @@ +# +# Copyright (c) 2024 Snowflake Computing Inc. +# +# Licensed 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. +# + name: Feature request description: Suggest an idea for this project title: "[FEATURE REQUEST]" diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 3ba13e0ce..a511c5abe 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1 +1,17 @@ +# +# Copyright (c) 2024 Snowflake Computing Inc. +# +# Licensed 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. +# + blank_issues_enabled: false diff --git a/.gitignore b/.gitignore index 059087801..0817cfd27 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,19 @@ +# +# Copyright (c) 2024 Snowflake Computing Inc. +# +# Licensed 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. +# + regtests/derby.log regtests/metastore_db regtests/output/ diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore index e866efcbd..919417f58 100644 --- a/.openapi-generator-ignore +++ b/.openapi-generator-ignore @@ -1,3 +1,19 @@ +# +# Copyright (c) 2024 Snowflake Computing Inc. +# +# Licensed 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. +# + src/main/webapp/** build.gradle pom.xml diff --git a/build.gradle.kts b/build.gradle.kts index c0f3179f3..92a526ba6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,6 +14,8 @@ * limitations under the License. */ +import org.nosphere.apache.rat.RatTask + buildscript { repositories { maven { url = java.net.URI("https://plugins.gradle.org/m2/") } } dependencies { @@ -25,6 +27,7 @@ plugins { id("idea") id("eclipse") id("polaris-root") + alias(libs.plugins.rat) } val projectName = rootProject.file("ide-name.txt").readText().trim() @@ -53,3 +56,48 @@ if (System.getProperty("idea.sync.active").toBoolean()) { } eclipse { project { name = ideName } } + +tasks.named("rat").configure { + // These are Gradle file pattern syntax + excludes.add("**/build/**") + + excludes.add("docs/CNAME") + excludes.add("docs/index.html") + + excludes.add("LICENSE") + excludes.add("NOTICE") + + excludes.add("ide-name.txt") + excludes.add("version.txt") + excludes.add(".git") + excludes.add(".gradle") + excludes.add(".idea") + excludes.add(".java-version") + excludes.add("**/.keep") + excludes.add("**/poetry.lock") + + excludes.add(".github/pull_request_template.md") + + excludes.add("spec/docs.yaml") + excludes.add("spec/index.yml") + + excludes.add("gradle/wrapper/gradle-wrapper*.jar*") + + excludes.add("polaris-service/src/**/banner.txt") + excludes.add("polaris-service/logs") + + excludes.add("regtests/**/py.typed") + excludes.add("regtests/**/*.ref") + excludes.add("regtests/client/python/.openapi-generator/**") + + excludes.add("**/*.ipynb") + excludes.add("**/*.iml") + excludes.add("**/*.iws") + + excludes.add("**/*.md") + + excludes.add("**/*.png") + excludes.add("**/*.svg") + + excludes.add("**/*.lock") +} diff --git a/gradle/gradlew-include.sh b/gradle/gradlew-include.sh index 19cb46059..663dd8721 100644 --- a/gradle/gradlew-include.sh +++ b/gradle/gradlew-include.sh @@ -1,3 +1,18 @@ +# +# Copyright (c) 2024 Snowflake Computing Inc. +# +# Licensed 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. + # Downloads the gradle-wrapper.jar if necessary and verifies its integrity. # Included from /.gradlew diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 59b690e17..2f0a774fa 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -66,5 +66,6 @@ threeten-extra = { module = "org.threeten:threeten-extra", version = "1.8.0" } [plugins] openapi-generator = { id = "org.openapi.generator", version = "7.6.0" } +rat = { id = "org.nosphere.apache.rat", version = "0.8.1" } spotless = { id = "com.diffplug.spotless", version = "6.25.0" } shadow = { id = "com.github.johnrengelman.shadow", version = "8.1.1" } diff --git a/k8/deployment.yaml b/k8/deployment.yaml index ea371fc04..a0bb0c33d 100644 --- a/k8/deployment.yaml +++ b/k8/deployment.yaml @@ -1,3 +1,19 @@ +# +# Copyright (c) 2024 Snowflake Computing Inc. +# +# Licensed 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. +# + apiVersion: v1 kind: Namespace metadata: diff --git a/regtests/.dockerignore b/regtests/.dockerignore index fbc79dce9..e7b264175 100644 --- a/regtests/.dockerignore +++ b/regtests/.dockerignore @@ -1,3 +1,19 @@ +# +# Copyright (c) 2024 Snowflake Computing Inc. +# +# Licensed 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. +# + .python-version .pytest_cache t_pyspark/src/spark-warehouse diff --git a/regtests/client/python/.openapi-generator-ignore b/regtests/client/python/.openapi-generator-ignore index 7484ee590..35e40783e 100644 --- a/regtests/client/python/.openapi-generator-ignore +++ b/regtests/client/python/.openapi-generator-ignore @@ -1,3 +1,19 @@ +# +# Copyright (c) 2024 Snowflake Computing Inc. +# +# Licensed 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. +# + # OpenAPI Generator Ignore # Generated by openapi-generator https://github.com/openapitools/openapi-generator diff --git a/regtests/client/python/cli/__init__.py b/regtests/client/python/cli/__init__.py index e69de29bb..09fbbafa9 100644 --- a/regtests/client/python/cli/__init__.py +++ b/regtests/client/python/cli/__init__.py @@ -0,0 +1,15 @@ +# +# Copyright (c) 2024 Snowflake Computing Inc. +# +# Licensed 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. +# diff --git a/regtests/client/python/cli/options/__init__.py b/regtests/client/python/cli/options/__init__.py index e69de29bb..09fbbafa9 100644 --- a/regtests/client/python/cli/options/__init__.py +++ b/regtests/client/python/cli/options/__init__.py @@ -0,0 +1,15 @@ +# +# Copyright (c) 2024 Snowflake Computing Inc. +# +# Licensed 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. +# diff --git a/regtests/client/python/requirements.txt b/regtests/client/python/requirements.txt index cc85509ec..c67073f8f 100644 --- a/regtests/client/python/requirements.txt +++ b/regtests/client/python/requirements.txt @@ -1,3 +1,19 @@ +# +# Copyright (c) 2024 Snowflake Computing Inc. +# +# Licensed 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. +# + python_dateutil >= 2.5.3 setuptools >= 21.0.0 urllib3 >= 1.25.3, < 2.1.0 diff --git a/regtests/client/python/setup.cfg b/regtests/client/python/setup.cfg index 11433ee87..b6e0f2221 100644 --- a/regtests/client/python/setup.cfg +++ b/regtests/client/python/setup.cfg @@ -1,2 +1,18 @@ +# +# Copyright (c) 2024 Snowflake Computing Inc. +# +# Licensed 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. +# + [flake8] max-line-length=99 diff --git a/regtests/client/python/test-requirements.txt b/regtests/client/python/test-requirements.txt index 8e6d8cb13..9bde6c7e9 100644 --- a/regtests/client/python/test-requirements.txt +++ b/regtests/client/python/test-requirements.txt @@ -1,3 +1,19 @@ +# +# Copyright (c) 2024 Snowflake Computing Inc. +# +# Licensed 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. +# + pytest~=7.1.3 pytest-cov>=2.8.1 pytest-randomly>=3.12.0 diff --git a/regtests/client/python/tox.ini b/regtests/client/python/tox.ini index 71bd9833c..db83b0f9f 100644 --- a/regtests/client/python/tox.ini +++ b/regtests/client/python/tox.ini @@ -1,3 +1,19 @@ +# +# Copyright (c) 2024 Snowflake Computing Inc. +# +# Licensed 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. +# + [tox] envlist = py3 diff --git a/server-templates/bodyParams.mustache b/server-templates/bodyParams.mustache index b6b8d354c..e121e0503 100644 --- a/server-templates/bodyParams.mustache +++ b/server-templates/bodyParams.mustache @@ -1,4 +1,19 @@ {{! + +Copyright (c) 2024 Snowflake Computing Inc. + +Licensed 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. + Note that this template is copied from https://github.com/OpenAPITools/openapi-generator/blob/783e68c7acbbdcbb2282d167d1644b069f12d486/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/bodyParams.mustache It is here to remove some unsupported swagger annotations }}{{#isBodyParam}}{{#useBeanValidation}}{{#required}} @NotNull{{/required}} @Valid{{/useBeanValidation}} {{{dataType}}} {{paramName}}{{/isBodyParam}} \ No newline at end of file diff --git a/server-templates/formParams.mustache b/server-templates/formParams.mustache index 187ea8a84..433978363 100644 --- a/server-templates/formParams.mustache +++ b/server-templates/formParams.mustache @@ -1,4 +1,19 @@ {{! + +Copyright (c) 2024 Snowflake Computing Inc. + +Licensed 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. + Note that this template is copied from https://github.com/OpenAPITools/openapi-generator/blob/783e68c7acbbdcbb2282d167d1644b069f12d486/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/bodyParams.mustache It is here to remove some unsupported swagger annotations }}{{#isFormParam}}{{^isFile}}@FormParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/server-templates/headerParams.mustache b/server-templates/headerParams.mustache index f062941d4..d61b82a14 100644 --- a/server-templates/headerParams.mustache +++ b/server-templates/headerParams.mustache @@ -1,4 +1,19 @@ {{! + +Copyright (c) 2024 Snowflake Computing Inc. + +Licensed 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. + Note that this template is copied from https://github.com/OpenAPITools/openapi-generator/blob/783e68c7acbbdcbb2282d167d1644b069f12d486/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/headerParams.mustache It is here to remove some unsupported swagger annotations }}{{#isHeaderParam}}@HeaderParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/server-templates/queryParams.mustache b/server-templates/queryParams.mustache index 3bcbe0368..5a1eb0053 100644 --- a/server-templates/queryParams.mustache +++ b/server-templates/queryParams.mustache @@ -1,4 +1,19 @@ {{! + +Copyright (c) 2024 Snowflake Computing Inc. + +Licensed 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. + Note that this template is copied from https://github.com/OpenAPITools/openapi-generator/blob/783e68c7acbbdcbb2282d167d1644b069f12d486/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/queryParams.mustache It is here to remove some unsupported swagger annotations }}{{#isQueryParam}}{{! diff --git a/spec/redocly.yaml b/spec/redocly.yaml index d410af6aa..427a36d10 100644 --- a/spec/redocly.yaml +++ b/spec/redocly.yaml @@ -1,3 +1,19 @@ +# +# Copyright (c) 2024 Snowflake Computing Inc. +# +# Licensed 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. +# + theme: openapi: theme: