diff --git a/dune-project b/dune-project index 02483f73b..9ecbcd757 100644 --- a/dune-project +++ b/dune-project @@ -48,9 +48,9 @@ (logs (>= 0.7.0)) (containers - (>= 3.6)) + (>= 3.14)) (containers-data - (>= 3.6)) + (>= 3.14)) (mariadb (and (>= 1.1.6) @@ -77,5 +77,4 @@ (guardian (= 0.3.2)) ;; Test/Dev dependencies - (alcotest-lwt :with-test) - )) + (alcotest-lwt :with-test))) diff --git a/pool.opam b/pool.opam index 12d247a2b..a939810c6 100644 --- a/pool.opam +++ b/pool.opam @@ -21,8 +21,8 @@ depends: [ "sihl-storage" {>= "4.0.0" & < "5.0.0"} "lwt" {>= "5.6.1"} "logs" {>= "0.7.0"} - "containers" {>= "3.6"} - "containers-data" {>= "3.6"} + "containers" {>= "3.14"} + "containers-data" {>= "3.14"} "mariadb" {>= "1.1.6" & < "2.0.0"} "caqti-driver-mariadb" {>= "2.0.1"} "caqti-lwt" {>= "2.0.1"} diff --git a/pool.opam.locked b/pool.opam.locked index 159e951d6..412a6722d 100644 --- a/pool.opam.locked +++ b/pool.opam.locked @@ -28,7 +28,7 @@ depends: [ "ca-certs" {= "0.2.3"} "camlp-streams" {= "5.0.1"} "canary" {= "0.0.3"} - "caqti" {= "2.1.2"} + "caqti" {= "2.1.1"} "caqti-driver-mariadb" {= "2.1.1"} "caqti-lwt" {= "2.1.1"} "cmdliner" {= "1.3.0"} @@ -49,9 +49,9 @@ depends: [ "conf-mariadb" {= "2"} "conf-pkg-config" {= "3"} "conformist" {= "0.8.1"} - "containers" {= "3.13.1"} - "containers-data" {= "3.13.1"} - "cppo" {= "1.7.0"} + "containers" {= "3.14"} + "containers-data" {= "3.14"} + "cppo" {= "1.6.9"} "csexp" {= "1.5.2"} "cstruct" {= "6.2.0"} "ctypes" {= "0.20.2"} @@ -148,7 +148,7 @@ depends: [ "ppxlib" {= "0.33.0"} "prettym" {= "0.0.3"} "ptime" {= "1.1.0"} - "re" {= "1.12.0"} + "re" {= "1.11.0"} "result" {= "1.5"} "rock" {= "0.20.0"} "rosetta" {= "0.3.0"} diff --git a/pool/test/filter_test.ml b/pool/test/filter_test.ml index 8866166ca..068336fa5 100644 --- a/pool/test/filter_test.ml +++ b/pool/test/filter_test.ml @@ -1241,7 +1241,6 @@ let filter_by_date_custom_field _ () = let filter_by_tags _ () = let open Utils.Lwt_result.Infix in - let open CCFun in let open Tags in let open Operator.ListM in let open Alcotest in @@ -1289,7 +1288,7 @@ let filter_by_tags _ () = find (Some filter) ||> get_exn ||> CCList.filter - (flip + (CCFun.flip (CCList.mem ~eq:Contact.equal) [ contact_one; contact_two; contact_three ]) ||> CCList.stable_sort Contact.compare diff --git a/pool/test/waiting_list_test.ml b/pool/test/waiting_list_test.ml index d730de843..391dc4494 100644 --- a/pool/test/waiting_list_test.ml +++ b/pool/test/waiting_list_test.ml @@ -116,8 +116,9 @@ module PendingWaitingLists = struct Experiment.find_pending_waitinglists_by_contact Test_utils.Data.database_label contact - ||> CCList.find_opt (Experiment.Public.equal experiment) - %> CCOption.is_some + |> Lwt.map + (CCList.find_opt (Experiment.Public.equal experiment) + %> CCOption.is_some) in let () = Alcotest.(check bool "succeeds" true res) in Lwt.return_unit @@ -141,9 +142,10 @@ module PendingWaitingLists = struct find_pending_waitinglists_by_contact Test_utils.Data.database_label contact - ||> CCList.find_opt (fun public -> - Id.equal (Public.id public) experiment_id) - %> CCOption.is_none + |> Lwt.map + (CCList.find_opt (fun public -> + Id.equal (Public.id public) experiment_id) + %> CCOption.is_none) in let () = Alcotest.(check bool "succeeds" true res) in Lwt.return_unit @@ -168,8 +170,9 @@ module PendingWaitingLists = struct Experiment.find_pending_waitinglists_by_contact Test_utils.Data.database_label contact - ||> CCList.find_opt (Experiment.Public.equal experiment) - %> CCOption.is_some + |> Lwt.map + (CCList.find_opt (Experiment.Public.equal experiment) + %> CCOption.is_some) in let () = Alcotest.(check bool "succeeds" true res) in Lwt.return_unit diff --git a/pool/web/handler/root_status.ml b/pool/web/handler/root_status.ml index ea1453873..4f53cc1ea 100644 --- a/pool/web/handler/root_status.ml +++ b/pool/web/handler/root_status.ml @@ -11,13 +11,12 @@ let yojson_response ?status json = ;; let show _ = - let open CCFun in let%lwt result = let open Schedule in let create_entry ?database_label label value = ( CCOption.map_or ~default:label - (Database.Label.value %> Format.asprintf "%s [%s]" label) + CCFun.(Database.Label.value %> Format.asprintf "%s [%s]" label) database_label , value ) in @@ -59,9 +58,11 @@ let show _ = CCString.mem ~sub (Schedule.Label.value label) in if contains_label then Some (is_ok schedule) else None) - |> CCList.for_all id + |> CCList.for_all CCFun.id + in + let is_ok schedules = + schedules |> CCList.map is_ok |> CCList.for_all CCFun.id in - let is_ok = CCList.(map is_ok %> for_all id) in let list_schedules = schedules |> CCList.map (fun ({ label; last_run; _ } : public) -> diff --git a/pool/web/handler/root_tenant.ml b/pool/web/handler/root_tenant.ml index 6d9d7cbf8..88ac42b51 100644 --- a/pool/web/handler/root_tenant.ml +++ b/pool/web/handler/root_tenant.ml @@ -103,7 +103,6 @@ let create_operator req = Lwt_result.map_error (fun err -> err, Format.asprintf "%s/operator" redirect_path) @@ - let open CCFun in let tags = Pool_context.Logger.Tags.req req in let* tenant_db = Pool_tenant.(find_full tenant_id >|+ Write.database_label) @@ -123,8 +122,10 @@ let create_operator req = >>= handle ~roles:[ `Operator, None ] ~tags |> Lwt_result.lift in - let handle = - Lwt_list.iter_s (Pool_event.handle_event ~tags tenant_db) %> Lwt_result.ok + let handle events = + events + |> Lwt_list.iter_s (Pool_event.handle_event ~tags tenant_db) + |> Lwt_result.ok in let return_to_overview () = Http_utils.redirect_to_with_actions