XComp commented on code in PR #23970: URL: https://github.com/apache/flink/pull/23970#discussion_r1446269230
########## .github/workflows/template.pre-compile-checks.yml: ########## @@ -0,0 +1,109 @@ +# 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 workflow collects all checks that do not require compilation and are, therefore, +# JDK independent. + +name: "Pre-compile Checks" + +on: + workflow_dispatch: + inputs: + jdk_version: + description: "The JDK version that shall be used as a default within the Flink CI Docker container." + default: "8" + type: choice + options: ["8", "11", "17"] + branch: + description: "The branch the source code analysis should run on." + default: "master" + type: string + + workflow_call: + inputs: + jdk_version: + description: "The JDK version that shall be used as a default within the Flink CI Docker container." + default: 8 + type: number + branch: + description: "The branch the source code analysis should run on." + default: "master" + type: string + +permissions: read-all + +# This workflow should only contain steps that do not require the compilation of Flink (and therefore, are +# independent of the used JDK) +jobs: + qa: + name: "Basic QA" + runs-on: ubuntu-latest + container: + image: chesnay/flink-ci:java_8_11_17_21_maven_386 + options: --init + + steps: + - name: "Flink Checkout" + uses: actions/checkout@v3 + with: + ref: ${{ inputs.branch }} + persist-credentials: false + + - name: "Set JDK version to Java ${{ inputs.jdk_version }}" + uses: "./.github/actions/set_java_in_container" + with: + jdk_version: ${{ inputs.jdk_version }} + + - name: "Checkstyle" + uses: "./.github/actions/run_mvn" + with: + maven-parameters: "checkstyle:check -T1C" + + - name: "Spotless" + if: (success() || failure()) + uses: "./.github/actions/run_mvn" + with: + maven-parameters: "spotless:check -T1C" + + - name: "License Headers" + if: (success() || failure()) + uses: "./.github/actions/run_mvn" + with: + maven-parameters: "org.apache.rat:apache-rat-plugin:check -N" + + docs-404-check: + name: "Docs 404 Check" + runs-on: ubuntu-latest + container: + image: chesnay/flink-ci:java_8_11_17_21_maven_386 + steps: + - name: "Checks out Flink" + uses: actions/checkout@v3 + with: + ref: ${{ inputs.branch }} + persist-credentials: false + + - name: "Mark GHA checkout as a safe directory (workaround for https://github.com/actions/checkout/issues/1169)" + run: git config --system --add safe.directory $GITHUB_WORKSPACE + shell: bash + + - name: "Check if PR contains docs change" + run: | + source ./tools/azure-pipelines/build_properties.sh Review Comment: tbh that was running right from the start when I picked up the work from you :innocent: I haven't looked into it, yet. But skimming over it, you seem to be right: The function `github_num_commits` seems to rely on Azure Pipeline env variables which makes the check always succeed (see [sample run](https://github.com/XComp/flink/actions/runs/7461657259/job/20303196275#step:5:15)). This results in always building the docs. Good catch! :+1: -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org