Skip to content

Commit

Permalink
Update dependencies (pmem#95)
Browse files Browse the repository at this point in the history
* Set dependencies to working versions

and use dependencies from build context, instead
of downloading cachelib:develop during build step.

This makes sure that dependencies are always build
in proper versions.

* Fix CacheStats size
  • Loading branch information
igchor committed Aug 23, 2023
1 parent b99f2b3 commit ff44c3c
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 20 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-cachelib-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
- name: "checkout sources"
uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0

- name: Pull the image or rebuild and push it
Expand Down
2 changes: 1 addition & 1 deletion cachelib/allocator/CacheStats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ struct SizeVerify {};

void Stats::populateGlobalCacheStats(GlobalCacheStats& ret) const {
#ifndef SKIP_SIZE_VERIFY
SizeVerify<sizeof(Stats)> a = SizeVerify<16192>{};
SizeVerify<sizeof(Stats)> a = SizeVerify<16544>{};
std::ignore = a;
#endif
ret.numCacheGets = numCacheGets.get();
Expand Down
2 changes: 1 addition & 1 deletion cachelib/external/fbthrift
Submodule fbthrift updated 4897 files
2 changes: 1 addition & 1 deletion cachelib/external/fizz
Submodule fizz updated 123 files
2 changes: 1 addition & 1 deletion cachelib/external/folly
Submodule folly updated 349 files
2 changes: 1 addition & 1 deletion cachelib/external/wangle
Submodule wangle updated 44 files
+1 −1 build/deps/github_hashes/facebook/folly-rev.txt
+1 −1 build/deps/github_hashes/facebookincubator/fizz-rev.txt
+1 −0 build/fbcode_builder/CMake/FBThriftCppLibrary.cmake
+1 −0 build/fbcode_builder/CMake/FindGflags.cmake
+8 −10 build/fbcode_builder/getdeps.py
+0 −3 build/fbcode_builder/getdeps/cargo.py
+3 −3 build/fbcode_builder/getdeps/dyndeps.py
+0 −1 build/fbcode_builder/getdeps/manifest.py
+1 −0 build/fbcode_builder/getdeps/platform.py
+0 −17 build/fbcode_builder/manifests/OpenNSA
+13 −0 build/fbcode_builder/manifests/benchmark
+11 −0 build/fbcode_builder/manifests/blake3
+10 −0 build/fbcode_builder/manifests/date
+1 −0 build/fbcode_builder/manifests/eden
+0 −1 build/fbcode_builder/manifests/fboss
+1 −1 build/fbcode_builder/manifests/libsodium
+0 −3 build/fbcode_builder/manifests/sapling
+0 −39 build/fbcode_builder/manifests/traffixr
+33 −0 build/fbcode_builder/manifests/zstrong
+97 −0 build/fbcode_builder/patches/blake3_CMakeLists_txt.patch
+4 −4 wangle/acceptor/AcceptObserver.h
+86 −23 wangle/acceptor/Acceptor.cpp
+18 −5 wangle/acceptor/Acceptor.h
+5 −0 wangle/acceptor/AcceptorHandshakeManager.cpp
+7 −0 wangle/acceptor/AcceptorHandshakeManager.h
+30 −27 wangle/acceptor/ConnectionManager.cpp
+19 −13 wangle/acceptor/ConnectionManager.h
+25 −10 wangle/acceptor/FizzAcceptorHandshakeHelper.cpp
+29 −5 wangle/acceptor/FizzAcceptorHandshakeHelper.h
+3 −0 wangle/acceptor/FizzConfig.h
+3 −1 wangle/acceptor/ManagedConnection.cpp
+13 −0 wangle/acceptor/ManagedConnection.h
+16 −1 wangle/acceptor/ServerSocketConfig.h
+15 −1 wangle/acceptor/SharedSSLContextManager.h
+2 −2 wangle/acceptor/TransportInfo.cpp
+38 −23 wangle/acceptor/test/AcceptorTest.cpp
+124 −34 wangle/acceptor/test/ConnectionManagerTest.cpp
+27 −1 wangle/bootstrap/ServerBootstrap-inl.h
+7 −3 wangle/bootstrap/ServerBootstrap.h
+6 −0 wangle/client/ssl/test/ThreadSafeSSLSessionCacheTest.cpp
+31 −0 wangle/ssl/SNIConfig.h
+135 −44 wangle/ssl/SSLContextManager.cpp
+67 −6 wangle/ssl/SSLContextManager.h
+354 −155 wangle/ssl/test/SSLContextManagerTest.cpp
4 changes: 0 additions & 4 deletions contrib/build-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ case "$1" in
folly)
NAME=folly
SRCDIR=cachelib/external/$NAME
update_submodules=yes
cmake_custom_params="-DBUILD_SHARED_LIBS=ON"
if test "$build_tests" = "yes" ; then
cmake_custom_params="$cmake_custom_params -DBUILD_TESTS=ON"
Expand All @@ -209,7 +208,6 @@ case "$1" in
fizz)
NAME=fizz
SRCDIR=cachelib/external/$NAME/$NAME
update_submodules=yes
cmake_custom_params="-DBUILD_SHARED_LIBS=ON"
if test "$build_tests" = "yes" ; then
cmake_custom_params="$cmake_custom_params -DBUILD_TESTS=ON"
Expand All @@ -221,7 +219,6 @@ case "$1" in
wangle)
NAME=wangle
SRCDIR=cachelib/external/$NAME/$NAME
update_submodules=yes
cmake_custom_params="-DBUILD_SHARED_LIBS=ON"
if test "$build_tests" = "yes" ; then
cmake_custom_params="$cmake_custom_params -DBUILD_TESTS=ON"
Expand All @@ -233,7 +230,6 @@ case "$1" in
fbthrift)
NAME=fbthrift
SRCDIR=cachelib/external/$NAME
update_submodules=yes
cmake_custom_params="-DBUILD_SHARED_LIBS=ON"
;;

Expand Down
2 changes: 1 addition & 1 deletion docker/images/build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ echo "Build a Docker image tagged with: ${CONTAINER_REG}:${TAG}"
docker build -t ${CONTAINER_REG}:${TAG} \
--build-arg http_proxy=$http_proxy \
--build-arg https_proxy=$https_proxy \
-f ${OS}-${OS_VER}.Dockerfile .
-f ${OS}-${OS_VER}.Dockerfile ../.. # need access to contrib and submodules
9 changes: 5 additions & 4 deletions docker/images/centos-8streams.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ RUN dnf -y install gcc-toolset-12
RUN echo "source /opt/rh/gcc-toolset-12/enable" >> /etc/bashrc
SHELL ["/bin/bash", "--login", "-c"]

COPY ./install-cachelib-deps.sh ./install-cachelib-deps.sh
RUN ./install-cachelib-deps.sh
COPY ./contrib ./contrib
COPY ./docker ./docker
COPY ./cachelib/external ./cachelib/external

COPY ./install-dsa-deps.sh ./install-dsa-deps.sh
RUN ./install-dsa-deps.sh
RUN ./docker/images/install-cachelib-deps.sh
RUN ./docker/images/install-dsa-deps.sh
8 changes: 3 additions & 5 deletions docker/images/install-cachelib-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2022, Intel Corporation

git clone -b develop https://github.com/intel/CacheLib CacheLib

./CacheLib/contrib/prerequisites-centos8.sh
echo 'Defaults env_keep += "HTTPS_PROXY https_proxy HTTP_PROXY http_proxy NO_PROXY no_proxy"' >> /etc/sudoers
./contrib/prerequisites-centos8.sh

for pkg in zstd googleflags googlelog googletest sparsemap fmt folly fizz wangle fbthrift ;
do
sudo ./CacheLib/contrib/build-package.sh -j -I /opt/ "$pkg"
sudo ./contrib/build-package.sh -j -I /opt/ "$pkg"
done

rm -rf CacheLib
2 changes: 1 addition & 1 deletion docker/images/install-dsa-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rm -rf idxd-config
# Install DML Library
git clone --recursive https://github.com/intel/DML.git
cd DML
git checkout e44443c24d53552b248b9869b1b16f89cd970f52
git checkout v1.1.0
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
Expand Down

0 comments on commit ff44c3c

Please sign in to comment.