From 889f17843614354fa3a2299a4164ee05892e96f2 Mon Sep 17 00:00:00 2001 From: Pierre Boutillier Date: Thu, 8 Jun 2023 23:33:10 +0200 Subject: [PATCH] Build: Resto is incompatible with cohttp-lwt.5.1.0 It leaks file descriptors on never ending streaming RPC --- .gitlab-ci.yml | 2 +- manifest/main.ml | 4 +++- opam/octez-smart-rollup-node.opam | 2 +- opam/tezos-rpc-http-client-unix.opam | 2 +- opam/tezos-rpc-http-server.opam | 1 + opam/tezt-performance-regression.opam | 2 +- opam/tezt-tezos.opam | 2 +- opam/virtual/octez-deps.opam | 2 +- scripts/version.sh | 2 +- src/lib_rpc_http/dune | 1 + 10 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 411be6b98238..77d6b2ed4853 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -35,7 +35,7 @@ variables: # /!\ CI_REGISTRY is overriden to use a private Docker registry mirror in AWS ECR # in GitLab namespaces `nomadic-labs` and `tezos` ## This value MUST be the same as `opam_repository_tag` in `scripts/version.sh` - build_deps_image_version: 205530c16047066997bf2b210542ceeef8fb96d1 + build_deps_image_version: 74aaa3a741443be2f5ee4d08e6b63898ec99f450 build_deps_image_name: "${CI_REGISTRY}/tezos/opam-repository" GIT_STRATEGY: fetch GIT_DEPTH: "1" diff --git a/manifest/main.ml b/manifest/main.ml index 06d9e72637c6..6b6b8c6e8ea3 100644 --- a/manifest/main.ml +++ b/manifest/main.ml @@ -99,7 +99,8 @@ let caqti_dynload = external_lib "caqti-dynload" V.True let cmdliner = external_lib "cmdliner" V.(at_least "1.1.0") -let cohttp_lwt_unix = external_lib "cohttp-lwt-unix" V.(at_least "4.0.0") +let cohttp_lwt_unix = + external_lib "cohttp-lwt-unix" V.(at_least "4.0.0" && different_from "5.1.0") let compiler_libs_common = external_lib "compiler-libs.common" V.True ~opam:"" @@ -3302,6 +3303,7 @@ let octez_rpc_http_server = [ octez_base |> open_ ~m:"TzPervasives"; octez_stdlib_unix |> open_; + cohttp_lwt_unix; resto_cohttp_server; resto_acl; octez_rpc; diff --git a/opam/octez-smart-rollup-node.opam b/opam/octez-smart-rollup-node.opam index 80114f0aa9e3..87ee9fe658b9 100644 --- a/opam/octez-smart-rollup-node.opam +++ b/opam/octez-smart-rollup-node.opam @@ -13,7 +13,7 @@ depends: [ "tezos-base" "tezos-stdlib-unix" "tezos-crypto" - "cohttp-lwt-unix" { >= "4.0.0" } + "cohttp-lwt-unix" { >= "4.0.0" & != "5.1.0" } "octez-node-config" "prometheus-app" { >= "1.2" } "octez-injector" diff --git a/opam/tezos-rpc-http-client-unix.opam b/opam/tezos-rpc-http-client-unix.opam index f4999936af61..e74420355ce1 100644 --- a/opam/tezos-rpc-http-client-unix.opam +++ b/opam/tezos-rpc-http-client-unix.opam @@ -12,7 +12,7 @@ depends: [ "ocaml" { >= "4.14" } "tezos-stdlib-unix" "tezos-base" - "cohttp-lwt-unix" { >= "4.0.0" } + "cohttp-lwt-unix" { >= "4.0.0" & != "5.1.0" } "resto-cohttp-client" { >= "1.0" } "tezos-rpc" "tezos-rpc-http-client" diff --git a/opam/tezos-rpc-http-server.opam b/opam/tezos-rpc-http-server.opam index 9a08bf0f2a28..6628a02636a7 100644 --- a/opam/tezos-rpc-http-server.opam +++ b/opam/tezos-rpc-http-server.opam @@ -12,6 +12,7 @@ depends: [ "ocaml" { >= "4.14" } "tezos-base" "tezos-stdlib-unix" + "cohttp-lwt-unix" { >= "4.0.0" & != "5.1.0" } "resto-cohttp-server" { >= "1.0" } "resto-acl" { >= "1.0" } "tezos-rpc" diff --git a/opam/tezt-performance-regression.opam b/opam/tezt-performance-regression.opam index 52afbb5ecb5d..f5ee8801f19b 100644 --- a/opam/tezt-performance-regression.opam +++ b/opam/tezt-performance-regression.opam @@ -12,7 +12,7 @@ depends: [ "ocaml" { >= "4.14" } "tezt" { >= "3.1.0" } "uri" { >= "3.1.0" } - "cohttp-lwt-unix" { >= "4.0.0" } + "cohttp-lwt-unix" { >= "4.0.0" & != "5.1.0" } ] build: [ ["rm" "-r" "vendors"] diff --git a/opam/tezt-tezos.opam b/opam/tezt-tezos.opam index ff74f320683e..4e8bfb322410 100644 --- a/opam/tezt-tezos.opam +++ b/opam/tezt-tezos.opam @@ -16,7 +16,7 @@ depends: [ "hex" { >= "1.3.0" } "tezos-crypto-dal" "tezos-base" - "cohttp-lwt-unix" { >= "4.0.0" } + "cohttp-lwt-unix" { >= "4.0.0" & != "5.1.0" } ] build: [ ["rm" "-r" "vendors"] diff --git a/opam/virtual/octez-deps.opam b/opam/virtual/octez-deps.opam index 600356c2c945..d0da9bd728eb 100644 --- a/opam/virtual/octez-deps.opam +++ b/opam/virtual/octez-deps.opam @@ -24,7 +24,7 @@ depends: [ "caqti-lwt" "class_group_vdf" { >= "0.0.4" } "cmdliner" { >= "1.1.0" } - "cohttp-lwt-unix" { >= "4.0.0" } + "cohttp-lwt-unix" { >= "4.0.0" & != "5.1.0" } "conf-libev" "conf-rust" "ctypes" { >= "0.18.0" } diff --git a/scripts/version.sh b/scripts/version.sh index effd441948c8..d03672981b62 100755 --- a/scripts/version.sh +++ b/scripts/version.sh @@ -25,7 +25,7 @@ export full_opam_repository_tag=0e89b5b0195c6f2597c95251896e1ef8b199c1d2 ## opam_repository is an additional, tezos-specific opam repository. ## This value MUST be the same as `build_deps_image_version` in `.gitlab-ci.yml` export opam_repository_url=https://gitlab.com/tezos/opam-repository -export opam_repository_tag="${OPAM_REPOSITORY_TAG:-205530c16047066997bf2b210542ceeef8fb96d1}" +export opam_repository_tag="${OPAM_REPOSITORY_TAG:-74aaa3a741443be2f5ee4d08e6b63898ec99f450}" export opam_repository_git="$opam_repository_url.git" export opam_repository="$opam_repository_git"\#"$opam_repository_tag" diff --git a/src/lib_rpc_http/dune b/src/lib_rpc_http/dune index e65dccf04097..1db6a874a13c 100644 --- a/src/lib_rpc_http/dune +++ b/src/lib_rpc_http/dune @@ -54,6 +54,7 @@ (libraries tezos-base tezos-stdlib-unix + cohttp-lwt-unix resto-cohttp-server resto-acl tezos-rpc -- GitLab