Copilot commented on code in PR #7154: URL: https://github.com/apache/incubator-kie/pull/7154#discussion_r4237570785
########## .github/workflows/ci_java17_compat.yml: ########## @@ -0,0 +1,186 @@ +# +# 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: "CI :: Build (Java 17)" + +on: + pull_request: + types: [opened, synchronize, reopened] + branches: [main] + paths-ignore: + - 'LICENSE' + - '**/.gitignore' + - '**.md' + - '**.adoc' Review Comment: This workflow is intended to become a required Java 17 check, but a documentation-only PR matching `paths-ignore` creates no check run; GitHub then leaves a required check pending and blocks the merge. Trigger the workflow for every PR and perform path filtering inside it (with a successful no-op path), or avoid configuring this check as required. ########## .github/workflows/ci_java17_compat.yml: ########## @@ -0,0 +1,186 @@ +# +# 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: "CI :: Build (Java 17)" + +on: + pull_request: + types: [opened, synchronize, reopened] + branches: [main] + paths-ignore: + - 'LICENSE' + - '**/.gitignore' + - '**.md' + - '**.adoc' + - '*.txt' + - 'docsimg/**' + - '.ci/jenkins/**' + push: + branches: [main] + paths-ignore: + - 'LICENSE' + - '**/.gitignore' + - '**.md' + - '**.adoc' + - '*.txt' + - 'docsimg/**' + - '.ci/jenkins/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + + build: + name: 'Java 17' + runs-on: ubuntu-latest + + steps: + - name: 'SETUP :: Set paths for temporary files' + shell: bash + run: | + echo "CHANGED_FILES_FILE=${{ runner.temp }}/changed-files.txt" >> "$GITHUB_ENV" + echo "MAVEN_PL_AFFECTED_FILE=${{ runner.temp }}/maven-pl-affected.txt" >> "$GITHUB_ENV" + echo "MAVEN_PL_UPSTREAM_FILE=${{ runner.temp }}/maven-pl-upstream.txt" >> "$GITHUB_ENV" + echo "MAVEN_PL_CHANGED_FILE=${{ runner.temp }}/maven-pl-changed.txt" >> "$GITHUB_ENV" + echo "DEP_GRAPH_EXTRACTOR__OUTPUT_FILE=${{ runner.temp }}/dep-graph.tsv" >> "$GITHUB_ENV" + touch "${{ runner.temp }}/changed-files.txt" + touch "${{ runner.temp }}/maven-pl-affected.txt" + touch "${{ runner.temp }}/maven-pl-upstream.txt" + touch "${{ runner.temp }}/maven-pl-changed.txt" + + - name: 'SETUP :: Free disk space (Ubuntu)' + shell: bash + run: | + sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc + df -h + + - name: "SETUP :: Checkout to load local actions" + uses: actions/checkout@v7 + + - name: "SETUP :: Checkout @ Simulated squashed-merge if PR, else checkout current commit" + id: checkout_pr + uses: ./.github/actions/checkout-pr + with: + ref: ${{ github.base_ref }} + + - uses: actions/setup-java@v6 + name: 'SETUP :: Java 17' + with: + java-version: 17 + distribution: temurin + cache: maven + + - name: 'SETUP :: Install JBang' + shell: bash + run: | + curl -sL https://github.com/jbangdev/jbang/releases/download/v0.138.0/jbang-0.138.0.zip -o jbang.zip + echo "3c9fb9ac5823ae5ab9d136dec08b896e2a0f6f6b313689b21f43c511b7c34b85 jbang.zip" | sha256sum -c - + unzip -q jbang.zip + echo "${{ github.workspace }}/jbang-0.138.0/bin" >> $GITHUB_PATH + + - name: 'SETUP :: Block apache.snapshots Maven repository' + shell: bash + run: | + mkdir -p "$HOME/.m2" + cat > "$HOME/.m2/settings.xml" <<'EOF' + <settings xmlns="http://maven.apache.org/SETTINGS/1.2.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd"> + <mirrors> + <mirror> + <id>block-apache-snapshots</id> + <mirrorOf>apache.snapshots,apache-snapshot-repository</mirrorOf> + <url>https://repository.apache.org/snapshots/</url> + <blocked>true</blocked> + </mirror> + </mirrors> + </settings> + EOF + + - name: 'SETUP :: Collect changed files' + if: github.event_name == 'pull_request' + shell: bash + env: + BASE_REF: origin/${{ github.base_ref }} + run: | + git diff --name-only "${BASE_REF}...HEAD" > "$CHANGED_FILES_FILE" + echo "Changed files:" + cat "$CHANGED_FILES_FILE" + + - name: 'SETUP :: Compute build scopes' + if: github.event_name == 'pull_request' + shell: bash + run: | + jbang script/ci/CiComputeBuildScopes.java \ + "$CHANGED_FILES_FILE" \ + "$MAVEN_PL_UPSTREAM_FILE" \ + "$MAVEN_PL_AFFECTED_FILE" \ + "$MAVEN_PL_CHANGED_FILE" + + - name: "PR CHECK :: BUILD :: Upstream modules" + if: github.event_name == 'pull_request' + shell: bash + run: | + pl=$(paste -sd, "$MAVEN_PL_UPSTREAM_FILE") + [ -z "$pl" ] && echo "No upstream modules. Skipping." && exit 0 + mvn -T 1C --batch-mode --no-transfer-progress -fae -DskipTests -DskipITs -Denforcer.skip=true -Dcheckstyle.skip=true -Dformatter.skip=true -Darchunit.skip=true -Dsurefire.redirectTestOutputToFile=true -pl "$pl" install + + - name: "PR CHECK :: BUILD :: Changed and affected modules" + if: github.event_name == 'pull_request' + shell: bash + run: | + pl=$(paste -sd, "$MAVEN_PL_AFFECTED_FILE") + [ -z "$pl" ] && echo "No affected modules. Skipping." && exit 0 + mvn --batch-mode --no-transfer-progress -fae -Dsurefire.redirectTestOutputToFile=true -Dfull -Dreproducible -pl "$pl" install Review Comment: The PR description says the Java 17 workflow runs `mvn clean install` on every PR, but this command only installs the computed affected-module set (and does not run `clean`), so unaffected reactor modules are not validated. Either run the promised full build or update the PR description to state that PR validation is scoped. ########## .github/workflows/ci.yaml: ########## @@ -17,11 +17,11 @@ # under the License. # -name: 'CI :: Build' +name: 'CI :: Build (Java 21)' Review Comment: Renaming and splitting this check makes `docs/PR_CHECKS_AND_CI.md` inaccurate: it still documents `CI :: Build`, says one matrix runs Java 17 and 21, says closing a PR cancels that workflow, and does not mention the new compatibility workflow. Please update that CI reference so contributors can identify the actual checks and triggers. -- 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]
