From 667534202dc253590c59223d7d689e6de934b622 Mon Sep 17 00:00:00 2001 From: madschemas <155993105+MadSchemas@users.noreply.github.com> Date: Fri, 16 Feb 2024 17:50:22 +0300 Subject: [PATCH] Print more cluster logs --- .github/workflows/test.yml | 166 +------------------------------------ appveyor.yml | 43 ---------- cpp_src/cluster/logger.cc | 2 +- 3 files changed, 2 insertions(+), 209 deletions(-) delete mode 100644 appveyor.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fcda06f35..66b54f802 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,44 +2,10 @@ name: build on: push jobs: - build-windows-latest: - runs-on: windows-latest - strategy: - matrix: - compiler: ["Visual Studio 17 2022"] - fail-fast: false - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - name: Build Reindexer - run: | - mkdir build && cd build - cmake -G "${{matrix.compiler}}" .. - cmake --build . --config Release - cmake --build . --config Release --target face - cmake --build . --config Release --target swagger - - build-windows-2019: - runs-on: windows-2019 - strategy: - matrix: - compiler: ["Visual Studio 16 2019", "MinGW Makefiles"] - fail-fast: false - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - name: Build Reindexer - run: | - mkdir build && cd build - cmake -G "${{matrix.compiler}}" .. - cmake --build . --config Release - cmake --build . --config Release --target face - cmake --build . --config Release --target swagger - build: strategy: matrix: - os: [ubuntu-20.04, ubuntu-22.04, macos-latest] + os: [macos-latest] include: - os: ubuntu-latest sanitizer: ASAN @@ -100,133 +66,3 @@ jobs: path: artifacts.tar if-no-files-found: error - test: - strategy: - matrix: - os: [ubuntu-20.04, ubuntu-22.04, macos-latest] - test: ['C++', 'GO'] - include: - - os: ubuntu-latest - sanitizer: ASAN - cc: gcc-10 - cxx: g++-10 - test: 'C++' - - os: ubuntu-latest - sanitizer: ASAN - test: 'GO' -# - os: ubuntu-latest -# sanitizer: TSAN -# cc: gcc-10 -# cxx: g++-10 -# test: 'C++' - - os: ubuntu-latest - sanitizer: TSAN - test: 'GO' - fail-fast: false - runs-on: ${{matrix.os}} - needs: build - if: always() - env: - CC: ${{matrix.cc}} - CXX: ${{matrix.cxx}} - TEST: ${{matrix.test}} - SANITIZER: ${{matrix.sanitizer}} - steps: - - name: Checkout repository - if: ${{ matrix.os != 'macos-latest' || matrix.test == 'GO' }} - uses: actions/checkout@v3 - - name: Download ${{matrix.os}}${{matrix.sanitizer}} Artifacts - if: ${{ matrix.os != 'macos-latest' || matrix.test == 'GO' }} - uses: actions/download-artifact@v3 - with: - name: ${{matrix.os}}${{matrix.sanitizer}} - - name: 'Untar Artifacts' - if: ${{ matrix.os != 'macos-latest' || matrix.test == 'GO' }} - run: tar -xvf artifacts.tar - - name: Prepare Environment - if: ${{ matrix.os != 'macos-latest' || matrix.test == 'GO' }} - env: - OS: ${{matrix.os}} - run: | - if [[ $OS == ubuntu* ]]; then - sudo ./dependencies.sh - else - ./dependencies.sh - fi - if [[ $TEST == 'GO' ]]; then - go mod download - elif [[ $OS == ubuntu* ]]; then - ./.github/workflows/install_gtest_parallel.sh - fi - - name: Tests - if: ${{ matrix.os != 'macos-latest' || matrix.test == 'GO' }} - run: | - if [[ $TEST == 'GO' ]]; then - if [[ $SANITIZER == 'ASAN' ]]; then - export REINDEXER_GH_CI_ASAN=true - fi - if [[ -z "$SANITIZER" ]]; then - go test -timeout 15m ./test/... -bench . -benchmem -benchtime 100ms -seedcount 50000 - else - go test -timeout 35m ./test/... -bench . -benchmem -benchtime 100ms -seedcount 50000 - fi - else - cd build - ctest --verbose - fi - - test-pyreindexer: - strategy: - matrix: - os: [ubuntu-20.04, ubuntu-22.04] - fail-fast: false - runs-on: ${{matrix.os}} - needs: build - if: always() - env: - OS: ${{matrix.os}} - steps: - - name: Download ${{matrix.os}} Artifacts - uses: actions/download-artifact@v3 - with: - name: ${{matrix.os}} - - name: 'Untar Artifacts' - run: tar -xvf artifacts.tar - - name: Prepare Environment - run: | - if [[ $OS == ubuntu* ]]; then - sudo ./dependencies.sh - python3 -m pip install setuptools - else - ./dependencies.sh - fi - - name: Install Reindexer - run: | - cd build - if [[ $OS == ubuntu* ]]; then - sudo dpkg -i reindexer-4-dev*.deb - sudo apt-get install -f - sudo dpkg -i reindexer-4-server*.deb - sudo apt-get install -f - else - for f in reindexer-*.tar.gz; do tar -xvzf "$f"; done - cp -R ./usr/local/include/reindexer /usr/local/include/reindexer - cp -R ./usr/local/lib/reindexer /usr/local/lib/reindexer - cp ./usr/local/lib/libreindexer.a /usr/local/lib/libreindexer.a - cp ./usr/local/lib/libreindexer_server_library.a /usr/local/lib/libreindexer_server_library.a - cp ./usr/local/lib/libreindexer_server_resources.a /usr/local/lib/libreindexer_server_resources.a - cp ./usr/local/lib/pkgconfig/libreindexer.pc /usr/local/lib/pkgconfig/libreindexer.pc - cp ./usr/local/lib/pkgconfig/libreindexer_server.pc /usr/local/lib/pkgconfig/libreindexer_server.pc - cp ./usr/local/bin/reindexer_server /usr/local/bin/reindexer_server - cp ./usr/local/etc/reindexer.conf.pkg /usr/local/etc/reindexer.conf.pkg - fi - - name: Clone PyReindexer - uses: actions/checkout@v3 - with: - repository: restream/reindexer-py - - name: Install PyReindexer - run: sudo python3 setup.py install - - name: Test PyReindexer - run: | - cd pyreindexer - ../.github/workflows/test.sh diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index ccfdc8f33..000000000 --- a/appveyor.yml +++ /dev/null @@ -1,43 +0,0 @@ -version: '{build}' - -# Uncomment this to enable the fast build environment if your account does not -# support it automatically: -image: Visual Studio 2019 - -environment: - matrix: - - BUILD_TYPE: Release - COMPILER: MinGW-w64 - PLATFORM: x64 - TOOLCHAIN: x86_64-8.1.0-posix-seh-rt_v6-rev0 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - - - BUILD_TYPE: Release - COMPILER: MinGW - PLATFORM: Win32 - TOOLCHAIN: i686-8.1.0-posix-dwarf-rt_v6-rev0 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - -build_script: - - git describe --tags - - mkdir build - - cd build - - if [%COMPILER%]==[MinGW] set PATH=C:\MinGW-w64\%TOOLCHAIN%\mingw32\bin;%PATH:C:\Program Files\Git\usr\bin;=% - - if [%COMPILER%]==[MinGW-w64] set PATH=C:\MinGW-w64\%TOOLCHAIN%\mingw64\bin;%PATH:C:\Program Files\Git\usr\bin;=% - - if [%COMPILER%]==[MinGW] cmake -G "MinGW Makefiles" -DCMAKE_PREFIX_PATH=C:\mingw-w64\%TOOLCHAIN% -DCMAKE_CXX_STANDARD=17 -DCMAKE_BUILD_TYPE=%BUILD_TYPE% .. - - if [%COMPILER%]==[MinGW-w64] cmake -G "MinGW Makefiles" -DCMAKE_PREFIX_PATH=C:\mingw-w64\%TOOLCHAIN% -DCMAKE_CXX_STANDARD=17 -DCMAKE_BUILD_TYPE=%BUILD_TYPE% .. - - - cmake --build . --config %BUILD_TYPE% - - cmake --build . --config %BUILD_TYPE% --target face - - cmake --build . --config %BUILD_TYPE% --target swagger - - cpack - -artifacts: - - path: build/*.exe - name: reindexer_server - - -#test_script: - -on_success: -#- cd C:\ diff --git a/cpp_src/cluster/logger.cc b/cpp_src/cluster/logger.cc index 86e370518..a1ffd1d8c 100644 --- a/cpp_src/cluster/logger.cc +++ b/cpp_src/cluster/logger.cc @@ -4,7 +4,7 @@ namespace reindexer { namespace cluster { -void Logger::print(LogLevel l, std::string& str) const { logPrint(l, &str[0]); } +void Logger::print(LogLevel l, std::string& str) const { str.append("\n"); std::cout << str; } ///logPrint(l, &str[0]); } } // namespace cluster } // namespace reindexer