Copilot commented on code in PR #144: URL: https://github.com/apache/paimon-cpp/pull/144#discussion_r3548736915
########## .github/workflows/pre-commit.yaml: ########## @@ -0,0 +1,32 @@ +# 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. + +name: pre-commit + +on: + pull_request: + push: + branches: + - '**' + +jobs: + pre-commit: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/setup-python@v6 + - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 Review Comment: The `steps:` list items are not indented under `steps`, which makes this workflow invalid YAML and will prevent the workflow from running. ########## .github/workflows/license_check.yaml: ########## @@ -0,0 +1,55 @@ +# 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. + +name: License Check + +on: + pull_request: + push: + branches: + - main + +jobs: + rat-license-check: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + + - name: Download Apache Rat jar + run: | + wget https://repo1.maven.org/maven2/org/apache/rat/apache-rat/0.16.1/apache-rat-0.16.1.jar -O rat.jar + + - name: Run Apache Rat + run: | + java -jar rat.jar -E .github/.rat-excludes -d . > rat-report.txt + - name: Check for Unapproved Licenses + run: | + if grep "Files with unapproved licenses" rat-report.txt; then + echo "❌ Found files with unapproved licenses!" + cat rat-report.txt + exit 1 + else + echo "✅ All files have approved licenses." + cat rat-report.txt + fi Review Comment: The current grep condition will likely match even when there are zero unapproved files (the phrase "Files with unapproved licenses" is typically present in the report), causing the job to fail spuriously. It should only fail when the unapproved count is non-zero. ########## .github/workflows/build_docs.yaml: ########## @@ -0,0 +1,81 @@ +# 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. + +name: "Publish Docs" + +on: + push: + branches: + - main + paths: + - 'apidoc/**' + - 'docs/**' + - 'include/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + +permissions: + contents: write + +jobs: + docs: + runs-on: ubuntu-24.04 + + steps: + - uses: actions/[email protected] + with: + fetch-depth: 1 + + - uses: actions/setup-python@v6 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y doxygen + pip install -r docs/requirements.txt + + - name: Build API + run: | + cd ./apidoc + doxygen + cd - + + - name: Build Docs + run: | + cd docs + make html + mkdir -p /tmp/site + cp -r ./_build/html/* /tmp/site/ + touch /tmp/site/.nojekyll + cd - + + - name: Deploy to gh-pages + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + run: | + git config --global user.name 'GitHub Actions' + git config --global user.email '[email protected]' + + git checkout --orphan gh-pages-tmp + git rm --quiet -rf . + cp -r /tmp/site/. . Review Comment: `git checkout --orphan` leaves the working tree populated but the index empty; `git rm -rf .` can fail with "pathspec '.' did not match any files". Clearing both tracked and untracked files avoids intermittent deploy failures. ########## .github/workflows/build_docs.yaml: ########## @@ -0,0 +1,81 @@ +# 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. + +name: "Publish Docs" + +on: + push: + branches: + - main + paths: + - 'apidoc/**' + - 'docs/**' + - 'include/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + +permissions: + contents: write + +jobs: + docs: + runs-on: ubuntu-24.04 + + steps: + - uses: actions/[email protected] Review Comment: Other workflows pin `actions/checkout` by commit SHA, but this workflow uses a mutable tag. Pinning to a commit SHA improves supply-chain security and keeps CI behavior reproducible. ########## docs/source/basic_concepts.rst: ########## @@ -55,7 +55,7 @@ the corresponding snapshot. Data Files --------------------------- Data files are grouped by partitions. Currently, Paimon supports using parquet -(default), orc and lance as data file’s format. +(default) and orc as data file’s format. Review Comment: This sentence is grammatically awkward (singular "format" and "and"). Consider using "or" and plural "formats" for clarity. ########## .asf.yaml: ########## @@ -33,15 +35,31 @@ github: rebase: false protected_branches: main: + required_status_checks: + strict: true + contexts: + - pre-commit + - gcc-test + - rat-license-check + - test-with-sanitizer + - clang-release + - gcc-release + - clang-test + - gcc8-test Review Comment: `required_status_checks.contexts` must match the exact check names produced by GitHub Actions. With the current workflow/job naming, these are typically in the form "<workflow name> / <job id>" (e.g., "Gcc Test / gcc-test"). If the contexts don't match, branch protection will never be satisfied and merges will be blocked. -- 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]
