diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2063d122f..a4e59949a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,7 +101,7 @@ jobs: run: | cd ${GITHUB_WORKSPACE}/build echo Run ctest -V -L DFLY - GLOG_logtostderr=1 GLOG_vmodule=rdb_load=1,rdb_save=1,snapshot=1 ctest -V -L DFLY + GLOG_alsologtostderr=1 GLOG_vmodule=rdb_load=1,rdb_save=1,snapshot=1 ctest -V -L DFLY echo "Running tests with --force_epoll" @@ -114,7 +114,7 @@ jobs: EOF gdb -ix ./init.gdb --batch -ex r --args ./dragonfly_test --force_epoll - FLAGS_force_epoll=true ctest -V -L DFLY + FLAGS_force_epoll=true GLOG_vmodule=rdb_load=1,rdb_save=1,snapshot=1 ctest -V -L DFLY echo "Finished running tests with --force_epoll" @@ -128,6 +128,12 @@ jobs: ./multi_test --multi_exec_mode=1 ./multi_test --multi_exec_mode=3 # GLOG_logtostderr=1 GLOG_vmodule=transaction=1,engine_shard_set=1 CTEST_OUTPUT_ON_FAILURE=1 ninja server/test + - name: Upload logs on failure + if: failure() + uses: actions/upload-artifact@v3 + with: + name: unit_logs + path: /tmp/*INFO* - name: Run regression tests if: matrix.container == 'ubuntu-dev:20' uses: ./.github/actions/regression-tests diff --git a/src/server/rdb_load.cc b/src/server/rdb_load.cc index a85a1d25a..510ce7e81 100644 --- a/src/server/rdb_load.cc +++ b/src/server/rdb_load.cc @@ -2134,9 +2134,10 @@ error_code RdbLoaderBase::EnsureReadInternal(size_t min_sz) { } io::Result res = src_->ReadAtLeast(out_buf, min_sz); - if (!res) + if (!res) { + VLOG(1) << "Error reading from source: " << res.error() << " " << min_sz << " bytes"; return res.error(); - + } if (*res < min_sz) return RdbError(errc::rdb_file_corrupted); diff --git a/tools/packaging/Dockerfile.alpine-dev b/tools/packaging/Dockerfile.alpine-dev index 24d2af9d1..183c4c54c 100644 --- a/tools/packaging/Dockerfile.alpine-dev +++ b/tools/packaging/Dockerfile.alpine-dev @@ -19,15 +19,15 @@ WORKDIR /build COPY . ./ -RUN make HELIO_RELEASE=y release +RUN make release -RUN build-opt/dragonfly --version +RUN build-release/dragonfly --version FROM alpine:3 COPY tools/docker/entrypoint.sh /usr/local/bin/entrypoint.sh COPY tools/docker/healthcheck.sh /usr/local/bin/healthcheck.sh -COPY --from=builder /build/build-opt/dragonfly /usr/local/bin/ +COPY --from=builder /build/build-release/dragonfly /usr/local/bin/ RUN apk --no-cache add libgcc libstdc++ \ su-exec netcat-openbsd boost-context && ldd /usr/local/bin/dragonfly diff --git a/tools/packaging/Dockerfile.alpine-prod.wip b/tools/packaging/Dockerfile.alpine-prod.wip deleted file mode 100644 index 43508b1ba..000000000 --- a/tools/packaging/Dockerfile.alpine-prod.wip +++ /dev/null @@ -1,35 +0,0 @@ -# syntax=docker/dockerfile:1 -FROM ghcr.io/romange/alpine-dev as builder - -WORKDIR /build -COPY src/ ./src/ -COPY helio/ ./helio/ -COPY patches/ ./patches/ -COPY CMakeLists.txt ./ -RUN ./helio/blaze.sh -release -DBoost_USE_STATIC_LIBS=ON - -WORKDIR build-opt -RUN ninja dragonfly - -FROM alpine:latest - -RUN addgroup -S -g 1000 dfly && adduser -S -G dfly -u 999 dfly -RUN apk --no-cache add libgcc libstdc++ libunwind boost-context \ - 'su-exec>=0.2' netcat-openbsd openssl - -RUN mkdir /data && chown dfly:dfly /data -VOLUME /data -WORKDIR /data -COPY tools/docker/entrypoint.sh /usr/local/bin/entrypoint.sh -COPY tools/docker/healthcheck.sh /usr/local/bin/healthcheck.sh -COPY --from=builder /build/build-opt/dragonfly /usr/local/bin/ -RUN dragonfly -version - -HEALTHCHECK CMD /usr/local/bin/healthcheck.sh -ENTRYPOINT ["entrypoint.sh"] - -EXPOSE 6380 - -USER dfly - -CMD ["dragonfly", "--logtostderr"] diff --git a/tools/packaging/Dockerfile.ubuntu-dev b/tools/packaging/Dockerfile.ubuntu-dev index f432c8e8b..d6512139b 100644 --- a/tools/packaging/Dockerfile.ubuntu-dev +++ b/tools/packaging/Dockerfile.ubuntu-dev @@ -5,9 +5,9 @@ WORKDIR /build COPY . ./ -RUN make HELIO_RELEASE=y release +RUN make release -RUN build-opt/dragonfly --version +RUN build-release/dragonfly --version RUN curl -O https://raw.githubusercontent.com/ncopa/su-exec/212b75144bbc06722fbd7661f651390dc47a43d1/su-exec.c && \ gcc -Wall -O2 su-exec.c -o su-exec @@ -28,7 +28,7 @@ WORKDIR /data COPY tools/docker/entrypoint.sh /usr/local/bin/entrypoint.sh COPY tools/docker/healthcheck.sh /usr/local/bin/healthcheck.sh COPY --from=builder /build/su-exec /usr/local/bin/ -COPY --from=builder /build/build-opt/dragonfly /usr/local/bin/ +COPY --from=builder /build/build-release/dragonfly /usr/local/bin/ HEALTHCHECK CMD /usr/local/bin/healthcheck.sh ENTRYPOINT ["entrypoint.sh"]