IGNITE-28940 Choose the marshaller by transport, not by message class… #18270
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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: Code Style, Abandoned Tests, Javadocs | |
| # pull_request (NOT pull_request_target): these jobs execute untrusted PR code, so they must stay on | |
| # the unprivileged fork-scoped token. Cost: PRs that conflict with the base branch are not checked. | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| - 'ignite-[0-9].[0-9]+.[0-9]+*' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| check-java: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| java: [ '17' ] | |
| name: Check java code on JDK ${{ matrix.java }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Setup java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.java }} | |
| cache: 'maven' | |
| - name: Install prerequisites | |
| run: | | |
| sudo apt-get update && sudo apt-get install libnuma-dev | |
| - name: Set MAVEN_OPTS | |
| if: ${{ matrix.java == '17' }} | |
| run: | | |
| { | |
| echo 'MAVEN_OPTS<<EOF' | |
| echo '--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED' | |
| echo '--add-exports=java.base/sun.nio.ch=ALL-UNNAMED' | |
| echo '--add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED' | |
| echo '--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED' | |
| echo '--add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED' | |
| echo '--add-opens=java.base/jdk.internal.access=ALL-UNNAMED' | |
| echo '--add-opens=java.base/jdk.internal.loader=ALL-UNNAMED' | |
| echo '--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED' | |
| echo '--add-opens=java.base/sun.net.util=ALL-UNNAMED' | |
| echo '--add-opens=java.base/sun.nio.ch=ALL-UNNAMED' | |
| echo '--add-opens=java.base/sun.nio.fs=ALL-UNNAMED' | |
| echo '--add-opens=java.base/sun.util.calendar=ALL-UNNAMED' | |
| echo '--add-opens=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED' | |
| echo '--add-opens=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED' | |
| echo '--add-opens=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED' | |
| echo '--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED' | |
| echo '--add-opens=java.base/java.io=ALL-UNNAMED' | |
| echo '--add-opens=java.base/java.nio=ALL-UNNAMED' | |
| echo '--add-opens=java.base/java.net=ALL-UNNAMED' | |
| echo '--add-opens=java.base/java.util=ALL-UNNAMED' | |
| echo '--add-opens=java.base/java.util.concurrent=ALL-UNNAMED' | |
| echo '--add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED' | |
| echo '--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED' | |
| echo '--add-opens=java.base/java.lang=ALL-UNNAMED' | |
| echo '--add-opens=java.base/java.lang.invoke=ALL-UNNAMED' | |
| echo '--add-opens=java.base/java.math=ALL-UNNAMED' | |
| echo '--add-opens=java.sql/java.sql=ALL-UNNAMED' | |
| echo '--add-opens=java.base/java.lang.reflect=ALL-UNNAMED' | |
| echo '--add-opens=java.base/java.time=ALL-UNNAMED' | |
| echo '--add-opens=java.base/java.text=ALL-UNNAMED' | |
| echo '--add-opens=java.base/java.security=ALL-UNNAMED' | |
| echo '--add-opens=java.logging/java.util.logging=ALL-UNNAMED' | |
| echo '--add-opens=java.management/sun.management=ALL-UNNAMED' | |
| echo '--add-opens=java.desktop/java.awt.font=ALL-UNNAMED' | |
| echo '--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED' | |
| echo '--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED' | |
| echo '--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED' | |
| echo '-Djdk.tls.client.protocols=TLSv1.2' | |
| echo 'EOF' | |
| } >> $GITHUB_ENV | |
| - name: Run codestyle and licenses checks | |
| run: | | |
| set -o pipefail | |
| rc=0 | |
| ./mvnw test-compile -Pall-java,licenses,lgpl,checkstyle,examples,check-licenses -B -V -T 1C 2>&1 | tee mvn-codestyle.log || rc=$? | |
| if [ "$rc" -ne 0 ] && grep -q "COMPILATION ERROR" mvn-codestyle.log; then | |
| echo "::error title=Compilation failed::Java compilation failed - this is a compile error, not a checkstyle violation. The flood of 'cannot find symbol' for generated *Walker/*Serializer/*Factory classes is a cascade: javac drops annotation-processor output when compilation fails. Fix the real error(s) listed in the build log group below first." | |
| echo "::group::Likely root-cause compile errors (generated-class cascade filtered out)" | |
| awk ' | |
| /^\[ERROR\].*cannot find symbol/ { loc=$0; getline s; gsub(/^[[:space:]]*(\[ERROR\][[:space:]]*)?/, "", s); | |
| if (s !~ /(Walker|Serializer|Factory)([^A-Za-z]|$)/) print loc " -> " s; next } | |
| /^\[ERROR\].*\.java:\[[0-9]+,[0-9]+\]/ { | |
| if ($0 !~ /codegen\.idto|internal\.systemview/) print $0 } | |
| ' mvn-codestyle.log | sed -E 's#^.*/modules/#modules/#; s/^\[ERROR\] //' | sort -u | head -n 40 | |
| echo "::endgroup::" | |
| fi | |
| exit "$rc" | |
| - name: Run abandoned tests checks. | |
| # Reuse classes from the previous step; the differing profiles otherwise trigger a full reactor recompile. | |
| run : | | |
| ./mvnw test -Pcheck-test-suites,all-java -B -V -Dmaven.compiler.useIncrementalCompilation=false | |
| - name: Check javadocs. | |
| run : | | |
| ./mvnw -DskipTests install -pl modules/commons,modules/tools,modules/codegen,modules/core,modules/binary/api,modules/core,modules/binary/impl,modules/core,modules/unsafe,modules/thin-client/api,modules/thin-client/impl,modules/nio,modules/indexing -B -V && ./mvnw initialize -Pjavadoc -B -V | |
| - name: Documentation code snippets compilation check | |
| run: | | |
| ./mvnw compile -Pdocs -pl :code-snippets -am -B -V | |
| check-dotnet: | |
| name: Сheck .NET code | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '6.0.x' | |
| - name: Run checks | |
| run: | | |
| dotnet build modules/platforms/dotnet/Apache.Ignite.DotNetCore.sln | |
| check-ducktape: | |
| name: Check ducktape on ${{ matrix.cfg.toxenv }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| cfg: | |
| - { python: "3.8", toxenv: "py38" } | |
| - { python: "3.9", toxenv: "py39" } | |
| - { python: "3.9", toxenv: "codestyle" } | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.cfg.python}} | |
| - name: Install tox | |
| run: | | |
| pip install tox==3.27.1 | |
| - name: Run tests | |
| run: | | |
| cd modules/ducktests/tests | |
| tox -e ${{ matrix.cfg.toxenv }} |