From 15cfeb4a1565be9057f3a2f7ea88a34dd7e96146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Mon, 25 Nov 2024 17:53:16 +0100 Subject: [PATCH 1/6] Manifest: Tezt-Cloud does not rely on Tezt-Tezos anymore --- dune-project | 1 + etherlink/tezt/lib/dune | 4 ++-- manifest/product_octez.ml | 5 +++-- opam/tezt-cloud.opam | 24 ++++++++++++++++++++++++ opam/tezt-etherlink.opam | 1 + opam/tezt-tests-cloud.opam | 1 + opam/tezt-tezos.opam | 3 +-- tezt/lib_cloud/dune | 4 ++-- tezt/tests/cloud/dune | 4 ++-- 9 files changed, 37 insertions(+), 10 deletions(-) create mode 100644 opam/tezt-cloud.opam diff --git a/dune-project b/dune-project index 1af5ad3cac21..37ebe1d56fe7 100644 --- a/dune-project +++ b/dune-project @@ -153,6 +153,7 @@ (package (name tezos-tree-encoding-test)(allow_empty)) (package (name tezos_internal_brassaia_tests)(allow_empty)) (package (name tezos_internal_irmin_tests)(allow_empty)) +(package (name tezt-cloud)) (package (name tezt-etherlink)(allow_empty)) (package (name tezt-riscv-sandbox)(allow_empty)) (package (name tezt-tests-cloud)(allow_empty)) diff --git a/etherlink/tezt/lib/dune b/etherlink/tezt/lib/dune index 3a0b5dd4fd01..1c0152665ec2 100644 --- a/etherlink/tezt/lib/dune +++ b/etherlink/tezt/lib/dune @@ -9,7 +9,7 @@ tezt-tezos.tezt-performance-regression octez-libs.crypto tezt-tezos - tezt-tezos.tezt-cloud + tezt-cloud octez-libs.test-helpers) (flags (:standard) @@ -18,5 +18,5 @@ -open Tezt_tezos_tezt_performance_regression -open Tezt_tezos -open Tezt_tezos.Runnable.Syntax - -open Tezt_tezos_tezt_cloud + -open Tezt_cloud -open Tezos_test_helpers)) diff --git a/manifest/product_octez.ml b/manifest/product_octez.ml index 2e435d08dbb2..fed5cdc316a9 100644 --- a/manifest/product_octez.ml +++ b/manifest/product_octez.ml @@ -2378,10 +2378,11 @@ let tezt_performance_regression = let tezt_cloud = public_lib - "tezt-tezos.tezt-cloud" + "tezt-cloud" ~path:"tezt/lib_cloud" - ~opam:"tezt-tezos" ~bisect_ppx:No + ~synopsis: + "Automatic of Cloud deployment for complex scenarios on top of Tezt" ~deps: [ tezt_lib |> open_ |> open_ ~m:"Base"; diff --git a/opam/tezt-cloud.opam b/opam/tezt-cloud.opam new file mode 100644 index 000000000000..b64a8a2a4aad --- /dev/null +++ b/opam/tezt-cloud.opam @@ -0,0 +1,24 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. +opam-version: "2.0" +maintainer: "contact@tezos.com" +authors: ["Tezos devteam"] +homepage: "https://www.tezos.com/" +bug-reports: "https://gitlab.com/tezos/tezos/issues" +dev-repo: "git+https://gitlab.com/tezos/tezos.git" +license: "MIT" +depends: [ + "dune" { >= "3.11.1" } + "ocaml" { >= "4.14" } + "tezt" { >= "4.1.0" & < "5.0.0" } + "tezt-tezos" { = version } + "jingoo" + "octez-libs" { = version } +] +build: [ + ["rm" "-r" "vendors" "contrib"] + ["dune" "build" "-p" name "-j" jobs] + ["dune" "runtest" "-p" name "-j" jobs] {with-test} +] +available: os-family != "windows" +synopsis: "Automatic of Cloud deployment for complex scenarios on top of Tezt" diff --git a/opam/tezt-etherlink.opam b/opam/tezt-etherlink.opam index c247144f69d5..2c997a88eb10 100644 --- a/opam/tezt-etherlink.opam +++ b/opam/tezt-etherlink.opam @@ -12,6 +12,7 @@ depends: [ "ocaml" { >= "4.14" } "octez-libs" "tezt-tezos" + "tezt-cloud" "ppx_import" {with-test} "ppx_deriving" {with-test} "tezt" { with-test & >= "4.1.0" & < "5.0.0" } diff --git a/opam/tezt-tests-cloud.opam b/opam/tezt-tests-cloud.opam index 3ac40401aa33..324b5cf71ed5 100644 --- a/opam/tezt-tests-cloud.opam +++ b/opam/tezt-tests-cloud.opam @@ -13,6 +13,7 @@ depends: [ "bls12-381" "octez-libs" "tezt-tezos" + "tezt-cloud" "tezt-etherlink" { = version } ] build: [ diff --git a/opam/tezt-tezos.opam b/opam/tezt-tezos.opam index 2c42f83d2b7e..7a5c9da18fe9 100644 --- a/opam/tezt-tezos.opam +++ b/opam/tezt-tezos.opam @@ -12,9 +12,8 @@ depends: [ "ocaml" { >= "4.14" } "octez-libs" { = version } "uri" { >= "3.1.0" } - "tezt" { >= "4.1.0" & < "5.0.0" } - "jingoo" "hex" { >= "1.3.0" } + "tezt" { with-test & >= "4.1.0" & < "5.0.0" } "bls12-381" { with-test & = version } ] build: [ diff --git a/tezt/lib_cloud/dune b/tezt/lib_cloud/dune index 3ff95c1a07e5..0d1fe0ca480a 100644 --- a/tezt/lib_cloud/dune +++ b/tezt/lib_cloud/dune @@ -2,8 +2,8 @@ ; Edit file manifest/main.ml instead. (library - (name tezt_tezos_tezt_cloud) - (public_name tezt-tezos.tezt-cloud) + (name tezt_cloud) + (public_name tezt-cloud) (libraries tezt tezt-tezos.tezt-performance-regression diff --git a/tezt/tests/cloud/dune b/tezt/tests/cloud/dune index 5d72d41c9a74..40f3df964c65 100644 --- a/tezt/tests/cloud/dune +++ b/tezt/tests/cloud/dune @@ -8,7 +8,7 @@ octez-libs.test-helpers octez-libs.tezt-wrapper tezt-tezos - tezt-tezos.tezt-cloud + tezt-cloud tezt_etherlink) (link_flags (:standard) @@ -20,4 +20,4 @@ -open Tezt_wrapper.Base -open Tezt_tezos -open Tezt_tezos.Runnable.Syntax - -open Tezt_tezos_tezt_cloud)) + -open Tezt_cloud)) -- GitLab From 86f2ba8f7875f496d7d234b78011604dde361eb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Mon, 25 Nov 2024 18:02:18 +0100 Subject: [PATCH 2/6] Tezt/Cloud: Ensure Octez CLi arguments are specific to the scenario --- tezt/lib_cloud/cli.ml | 8 -------- tezt/lib_cloud/cli.mli | 3 --- tezt/tests/cloud/dal.ml | 9 +++++++++ 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/tezt/lib_cloud/cli.ml b/tezt/lib_cloud/cli.ml index 91003f0cb3e8..a16cb43ad19e 100644 --- a/tezt/lib_cloud/cli.ml +++ b/tezt/lib_cloud/cli.ml @@ -238,14 +238,6 @@ let no_dns = cancel any effect of [--dns-domain]." false -let octez_release = - Clap.optional_string - ~section - ~long:"octez-release" - ~placeholder:"" - ~description:"Use the octez release instead of local octez binaries." - () - let open_telemetry = Clap.flag ~section diff --git a/tezt/lib_cloud/cli.mli b/tezt/lib_cloud/cli.mli index 7d672cd06bf5..6c5fc7a54ddd 100644 --- a/tezt/lib_cloud/cli.mli +++ b/tezt/lib_cloud/cli.mli @@ -99,9 +99,6 @@ val no_dns : bool (** OS used by the VM. *) val os : string -(** The tag of the octez release to be used. *) -val octez_release : string option - (** Activate the Open Telemetry collector. *) val open_telemetry : bool diff --git a/tezt/tests/cloud/dal.ml b/tezt/tests/cloud/dal.ml index 49cf0ff7c16d..d29c0783fb36 100644 --- a/tezt/tests/cloud/dal.ml +++ b/tezt/tests/cloud/dal.ml @@ -776,6 +776,15 @@ module Cli = struct ~description:"Runs teztale" false + let octez_release = + Clap.optional_string + ~section + ~long:"octez-release" + ~placeholder:"" + ~description: + "Use the octez release instead of local octez binaries." + () + let memtrace = Clap.flag ~section -- GitLab From 50975f3e39e3b5b3449cae9c41521ff7f364655e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Mon, 25 Nov 2024 18:02:48 +0100 Subject: [PATCH 3/6] Tezt/Cloud: Remove unecessary call to `write_website` --- tezt/tests/cloud/dal.ml | 1 - 1 file changed, 1 deletion(-) diff --git a/tezt/tests/cloud/dal.ml b/tezt/tests/cloud/dal.ml index d29c0783fb36..ba5f6f88710f 100644 --- a/tezt/tests/cloud/dal.ml +++ b/tezt/tests/cloud/dal.ml @@ -1685,7 +1685,6 @@ let init_sandbox_and_activate_protocol cloud (configuration : configuration) ~url: (sf "http://explorus.io?network=%s" (Node.rpc_endpoint bootstrap_node)) in - let* () = Cloud.write_website cloud in let* client = Client.init ~endpoint:(Node bootstrap_node) () in let* baker_accounts = Client.stresstest_gen_keys -- GitLab From 202cc2cea33014101add68f2159ca36a616cff07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Mon, 25 Nov 2024 18:03:17 +0100 Subject: [PATCH 4/6] Tezt/Cloud: Do note depend on `Env` module --- tezt/tests/cloud/dal.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tezt/tests/cloud/dal.ml b/tezt/tests/cloud/dal.ml index ba5f6f88710f..7e7b23b3f7a9 100644 --- a/tezt/tests/cloud/dal.ml +++ b/tezt/tests/cloud/dal.ml @@ -2801,7 +2801,7 @@ let benchmark () = |> List.concat in let docker_image = - Option.map (fun tag -> Env.Octez_release {tag}) Cli.octez_release + Option.map (fun tag -> Configuration.Octez_release {tag}) Cli.octez_release in let default_vm_configuration = Configuration.make ?docker_image () in let vms = -- GitLab From 4026d11d97161d739fa8c52f781db86f35f59c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Mon, 25 Nov 2024 18:03:38 +0100 Subject: [PATCH 5/6] Tezt/Cloud: Simplify teztale server endpoint --- tezt/tests/cloud/dal.ml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tezt/tests/cloud/dal.ml b/tezt/tests/cloud/dal.ml index 7e7b23b3f7a9..e81eba6ad053 100644 --- a/tezt/tests/cloud/dal.ml +++ b/tezt/tests/cloud/dal.ml @@ -1469,10 +1469,7 @@ let init_teztale (configuration : configuration) cloud agent = let* () = Teztale.wait_server teztale in let* () = let domain = - match Env.mode with - | `Host | `Cloud -> - Agent.point agent |> Option.fold ~none:"localhost" ~some:fst - | `Orchestrator | `Localhost -> "localhost" + Agent.point agent |> Option.fold ~none:"localhost" ~some:fst in let port = teztale.server.conf.interface.port in let url = sf "http://%s:%d" domain port in -- GitLab From 918848e46eed95d547e61fab7add689fafc170c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Mon, 25 Nov 2024 18:04:32 +0100 Subject: [PATCH 6/6] Tezt/Cloud: Expose module Agent --- tezt/lib_cloud/tezt_cloud.mli | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tezt/lib_cloud/tezt_cloud.mli b/tezt/lib_cloud/tezt_cloud.mli index 05a777077407..93f44d603252 100644 --- a/tezt/lib_cloud/tezt_cloud.mli +++ b/tezt/lib_cloud/tezt_cloud.mli @@ -5,11 +5,7 @@ (* *) (*****************************************************************************) -module Agent : sig - type t - - val configuration : Agent.t -> Configuration.t -end +module Agent = Agent module Configuration : sig type docker_image = -- GitLab