diff --git a/doc/docs-ci-client-cli-tool.md b/doc/docs-ci-client-cli-tool.md index e89751da..50bb316b 100644 --- a/doc/docs-ci-client-cli-tool.md +++ b/doc/docs-ci-client-cli-tool.md @@ -123,7 +123,6 @@ http://staging.docs.ci.ocaml.org/job/2023-06-27/104410-voodoo-prep-2cd771 "voodoo_do": "67ccabec49b5f4d24147839291fcae7c19d3e8c9", "voodoo_prep": "67ccabec49b5f4d24147839291fcae7c19d3e8c9", "voodoo_gen": "67ccabec49b5f4d24147839291fcae7c19d3e8c9", - "odoc": "https://github.com/ocaml/odoc.git#103dac4c370aa2ad5aca7ba54f02f8e06adb941b", "voodoo_repo": "https://github.com/ocaml-doc/voodoo.git", "voodoo_branch": "main", "failed_packages": 15, @@ -136,7 +135,6 @@ http://staging.docs.ci.ocaml.org/job/2023-06-27/104410-voodoo-prep-2cd771 "voodoo_do": "67ccabec49b5f4d24147839291fcae7c19d3e8c9", "voodoo_prep": "67ccabec49b5f4d24147839291fcae7c19d3e8c9", "voodoo_gen": "67ccabec49b5f4d24147839291fcae7c19d3e8c9", - "odoc": "https://github.com/ocaml/odoc.git#103dac4c370aa2ad5aca7ba54f02f8e06adb941b", "voodoo_repo": "https://github.com/ocaml-doc/voodoo.git", "voodoo_branch": "main", "failed_packages": 0, diff --git a/migrations/20230921005634_add_attributes_to_pipeline.down.sql b/migrations/20230921005634_add_attributes_to_pipeline.down.sql index 80fc6fda..edb4cc81 100644 --- a/migrations/20230921005634_add_attributes_to_pipeline.down.sql +++ b/migrations/20230921005634_add_attributes_to_pipeline.down.sql @@ -1,8 +1,8 @@ ALTER TABLE docs_ci_pipeline_index -DROP COLUMN voodoo_branch TEXT; +DROP COLUMN voodoo_branch; ALTER TABLE docs_ci_pipeline_index -DROP COLUMN voodoo_repo TEXT; +DROP COLUMN voodoo_repo; ALTER TABLE docs_ci_pipeline_index -DROP COLUMN odoc_commit TEXT; +DROP COLUMN odoc_commit; diff --git a/migrations/20240123102438_remove_odoc_commit.down.sql b/migrations/20240123102438_remove_odoc_commit.down.sql new file mode 100644 index 00000000..e1a41ac8 --- /dev/null +++ b/migrations/20240123102438_remove_odoc_commit.down.sql @@ -0,0 +1,2 @@ +ALTER TABLE docs_ci_pipeline_index +ADD COLUMN odoc_commit TEXT; \ No newline at end of file diff --git a/migrations/20240123102438_remove_odoc_commit.up.sql b/migrations/20240123102438_remove_odoc_commit.up.sql new file mode 100644 index 00000000..669a90c0 --- /dev/null +++ b/migrations/20240123102438_remove_odoc_commit.up.sql @@ -0,0 +1,2 @@ +ALTER TABLE docs_ci_pipeline_index +DROP COLUMN odoc_commit; \ No newline at end of file diff --git a/src/api/pipeline/client.ml b/src/api/pipeline/client.ml index cf496bae..08bd3a8a 100644 --- a/src/api/pipeline/client.ml +++ b/src/api/pipeline/client.ml @@ -155,7 +155,6 @@ module Pipeline = struct let voodoo_gen = voodoo_gen_commit_get h in let voodoo_branch = voodoo_branch_get h in let voodoo_repo = voodoo_repo_get h in - let odoc_commit = odoc_commit_get h in let failed_packages = failing_packages_get h |> Int64.to_int in let running_packages = running_packages_get h |> Int64.to_int in let passed_packages = passing_packages_get h |> Int64.to_int in @@ -166,7 +165,6 @@ module Pipeline = struct ("voodoo_do", `String voodoo_do); ("voodoo_prep", `String voodoo_prep); ("voodoo_gen", `String voodoo_gen); - ("odoc", `String odoc_commit); ("voodoo_repo", `String voodoo_repo); ("voodoo_branch", `String voodoo_branch); ("failed_packages", `Int failed_packages); diff --git a/src/cli/ocaml-docs-ci-client.md b/src/cli/ocaml-docs-ci-client.md index 166c285b..9fa85c51 100644 --- a/src/cli/ocaml-docs-ci-client.md +++ b/src/cli/ocaml-docs-ci-client.md @@ -92,7 +92,6 @@ $ ocaml-docs-ci-client health-check --ci-cap="capnp://sha-256:lsLPZ6Q4jYcTxiitvB "voodoo_do": "67ccabec49b5f4d24147839291fcae7c19d3e8c9", "voodoo_prep": "67ccabec49b5f4d24147839291fcae7c19d3e8c9", "voodoo_gen": "67ccabec49b5f4d24147839291fcae7c19d3e8c9", - "odoc": "https://github.com/ocaml/odoc.git#34a48e2543f6ea5716e9ee922954fa0917561dd7", "voodoo_repo": "https://github.com/ocaml-doc/voodoo.git", "voodoo_branch": "main", "failed_packages": 25255, @@ -105,7 +104,6 @@ $ ocaml-docs-ci-client health-check --ci-cap="capnp://sha-256:lsLPZ6Q4jYcTxiitvB "voodoo_do": "67ccabec49b5f4d24147839291fcae7c19d3e8c9", "voodoo_prep": "67ccabec49b5f4d24147839291fcae7c19d3e8c9", "voodoo_gen": "67ccabec49b5f4d24147839291fcae7c19d3e8c9", - "odoc": "https://github.com/ocaml/odoc.git#b4f11fcff450691a74987a3bf1131f0a52154cc3", "voodoo_repo": "https://github.com/ocaml-doc/voodoo.git", "voodoo_branch": "main", "failed_packages": 1205, diff --git a/src/lib/config.ml b/src/lib/config.ml index d78a6de2..d1579bdc 100644 --- a/src/lib/config.ml +++ b/src/lib/config.ml @@ -212,10 +212,6 @@ let cmdliner = $ take_n_last_versions $ Ssh.cmdliner) -(* odoc pinned to tag 2.2.2 *) -let odoc _ = - "https://github.com/ocaml/odoc.git#34a48e2543f6ea5716e9ee922954fa0917561dd7" - let pool _ = "linux-x86_64" let jobs t = t.jobs let voodoo_branch t = t.voodoo_branch diff --git a/src/lib/config.mli b/src/lib/config.mli index eeb3e180..e35df1a6 100644 --- a/src/lib/config.mli +++ b/src/lib/config.mli @@ -18,9 +18,6 @@ type t val cmdliner : t Cmdliner.Term.t val ssh : t -> Ssh.t -val odoc : t -> string -(** Odoc version pin to use. *) - val pool : t -> string (** The ocluster pool to use *) diff --git a/src/lib/epoch.ml b/src/lib/epoch.ml index cbc4c2c5..8c23cdec 100644 --- a/src/lib/epoch.ml +++ b/src/lib/epoch.ml @@ -1,7 +1,7 @@ -type t = { config : Config.t; voodoo : Voodoo.t } +type t = { voodoo : Voodoo.t } let version = "v1" -let v config voodoo = { config; voodoo } +let v voodoo = { voodoo } type stage = [ `Linked | `Html ] @@ -9,21 +9,20 @@ let digest stage t = let key = match stage with | `Html -> - Fmt.str "%s:%s:%s:%s:%s" version (Config.odoc t.config) + Fmt.str "%s:%s:%s:%s" version Voodoo.Do.(v t.voodoo |> digest) Voodoo.Prep.(v t.voodoo |> digest) Voodoo.Gen.(v t.voodoo |> digest) | `Linked -> - Fmt.str "%s:%s:%s:%s" version (Config.odoc t.config) + Fmt.str "%s:%s:%s" version Voodoo.Do.(v t.voodoo |> digest) Voodoo.Prep.(v t.voodoo |> digest) in key |> Digest.string |> Digest.to_hex let pp f t = - Fmt.pf f - "docs-ci: %s\nodoc: %s\nvoodoo do: %a\nvoodoo prep: %a\nvoodoo gen: %a" - version (Config.odoc t.config) Current_git.Commit_id.pp + Fmt.pf f "docs-ci: %s\nvoodoo do: %a\nvoodoo prep: %a\nvoodoo gen: %a" version + Current_git.Commit_id.pp Voodoo.Do.(v t.voodoo |> commit) Current_git.Commit_id.pp Voodoo.Prep.(v t.voodoo |> commit) diff --git a/src/lib/epoch.mli b/src/lib/epoch.mli index b8b0beb3..6804d490 100644 --- a/src/lib/epoch.mli +++ b/src/lib/epoch.mli @@ -1,6 +1,6 @@ type t -val v : Config.t -> Voodoo.t -> t +val v : Voodoo.t -> t type stage = [ `Linked | `Html ] diff --git a/src/lib/html.ml b/src/lib/html.ml index 4e8f311b..c1f45227 100644 --- a/src/lib/html.ml +++ b/src/lib/html.ml @@ -85,11 +85,10 @@ module Gen = struct base : Spec.t; } - let key { config; compile; voodoo; base = _ } = - Fmt.str "v6-%s-%s-%s-%s" + let key { config = _; compile; voodoo; base = _ } = + Fmt.str "v6-%s-%s-%s" (Compile.package compile |> Package.digest) (Compile.hashes compile).linked_hash (Voodoo.Gen.digest voodoo) - (Config.odoc config) let digest t = key t |> Digest.string |> Digest.to_hex end diff --git a/src/lib/index.ml b/src/lib/index.ml index 324b58dc..abf9dd77 100644 --- a/src/lib/index.ml +++ b/src/lib/index.ml @@ -108,8 +108,8 @@ let db = and record_pipeline = Sqlite3.prepare db "INSERT INTO docs_ci_pipeline_index (epoch_html, epoch_linked, \ - voodoo_do, voodoo_gen, voodoo_prep, voodoo_branch, voodoo_repo, \ - odoc_commit) VALUES (?, ?, ?, ?, ?, ?, ?, ?) returning id" + voodoo_do, voodoo_gen, voodoo_prep, voodoo_branch, voodoo_repo) \ + VALUES (?, ?, ?, ?, ?, ?, ?) returning id" and get_recent_pipeline_ids = Sqlite3.prepare db "SELECT id FROM docs_ci_pipeline_index ORDER BY id DESC LIMIT 2" @@ -128,8 +128,7 @@ let db = and get_pipeline_data = Sqlite3.prepare db "SELECT epoch_html, epoch_linked, voodoo_do, voodoo_gen, voodoo_prep, \ - voodoo_branch, voodoo_repo, odoc_commit FROM docs_ci_pipeline_index \ - WHERE id = ?" + voodoo_branch, voodoo_repo FROM docs_ci_pipeline_index WHERE id = ?" in { @@ -163,7 +162,7 @@ let record package pipeline_id package_status step_list = ] let record_new_pipeline ~voodoo_do_commit ~voodoo_gen_commit ~voodoo_prep_commit - ~odoc_commit ~voodoo_repo ~voodoo_branch ~epoch_html ~epoch_linked = + ~voodoo_repo ~voodoo_branch ~epoch_html ~epoch_linked = let t = Lazy.force db in match Db.query_one t.record_pipeline @@ -176,7 +175,6 @@ let record_new_pipeline ~voodoo_do_commit ~voodoo_gen_commit ~voodoo_prep_commit TEXT voodoo_prep_commit; TEXT voodoo_branch; TEXT voodoo_repo; - TEXT odoc_commit; ] with | Sqlite3.Data.[ INT pipeline_id ] -> Ok pipeline_id @@ -235,7 +233,6 @@ type pipeline_data = { voodoo_prep : string; voodoo_branch : string; voodoo_repo : string; - odoc_commit : string; } let get_pipeline_counts pipeline_id = @@ -265,16 +262,8 @@ let get_pipeline_data pipeline_id = NULL; (* these are new nullable columns so this option is for backward compatibility *) NULL; - NULL; ] -> - ( epoch_html, - epoch_linked, - voodoo_do, - voodoo_gen, - voodoo_prep, - "", - "", - "" ) + (epoch_html, epoch_linked, voodoo_do, voodoo_gen, voodoo_prep, "", "") | Sqlite3.Data. [ TEXT epoch_html; @@ -284,7 +273,6 @@ let get_pipeline_data pipeline_id = TEXT voodoo_prep; TEXT voodoo_branch; TEXT voodoo_repo; - TEXT odoc_commit; ] -> ( epoch_html, epoch_linked, @@ -292,8 +280,7 @@ let get_pipeline_data pipeline_id = voodoo_gen, voodoo_prep, voodoo_branch, - voodoo_repo, - odoc_commit ) + voodoo_repo ) | row -> Fmt.failwith "get_pipeline_data: invalid row %a" Db.dump_row row in match result with @@ -304,8 +291,7 @@ let get_pipeline_data pipeline_id = voodoo_gen, voodoo_prep, voodoo_branch, - voodoo_repo, - odoc_commit ); + voodoo_repo ); ] -> Some { @@ -316,7 +302,6 @@ let get_pipeline_data pipeline_id = voodoo_prep; voodoo_branch; voodoo_repo; - odoc_commit; } | _ -> None diff --git a/src/lib/record.ml b/src/lib/record.ml index a328b473..33cfef1f 100644 --- a/src/lib/record.ml +++ b/src/lib/record.ml @@ -16,8 +16,8 @@ module Record = struct module Key = struct type t = { voodoo : Voodoo.t; config : Config.t } - let key { voodoo; config } = - let t = Epoch.v config voodoo in + let key { voodoo; config = _ } = + let t = Epoch.v voodoo in Fmt.str "%a" Epoch.pp t let digest t = key t |> Digest.string |> Digest.to_hex @@ -29,29 +29,28 @@ module Record = struct let open Lwt.Syntax in let* () = Current.Job.start ~level:Harmless job in - let generation = Epoch.v config voodoo in + let generation = Epoch.v voodoo in let voodoo_do_commit = Voodoo.Do.v voodoo |> Voodoo.Do.digest in let voodoo_gen_commit = Voodoo.Gen.v voodoo |> Voodoo.Gen.commit |> Git.Commit_id.hash in let voodoo_repo = Config.voodoo_repo config in let voodoo_branch = Config.voodoo_branch config in - let odoc_commit = Config.odoc config in let voodoo_prep_commit = Voodoo.Prep.v voodoo |> Voodoo.Prep.digest in let epoch_linked = (Epoch.digest `Linked) generation in let epoch_html = (Epoch.digest `Html) generation in let result = Index.record_new_pipeline ~voodoo_do_commit ~voodoo_gen_commit - ~voodoo_prep_commit ~voodoo_repo ~voodoo_branch ~odoc_commit ~epoch_html + ~voodoo_prep_commit ~voodoo_repo ~voodoo_branch ~epoch_html ~epoch_linked in match result with | Ok pipeline_id -> Lwt.return_ok (pipeline_id |> Int64.to_int) | Error msg -> Lwt.return_error (`Msg msg) - let pp f Key.{ config; voodoo } = - let generation = Epoch.v config voodoo in + let pp f Key.{ config = _; voodoo } = + let generation = Epoch.v voodoo in Epoch.pp f generation let auto_cancel = true diff --git a/src/lib/voodoo.ml b/src/lib/voodoo.ml index cbc8a6a2..4fe9ab49 100644 --- a/src/lib/voodoo.ml +++ b/src/lib/voodoo.ml @@ -203,9 +203,6 @@ module Do = struct |> Spec.add [ run ~network "sudo apt-get update && sudo apt-get install -yy m4"; - run ~network ~cache - "opam pin -ny odoc.dev %s && opam depext -iy odoc" - (Config.odoc t.config); run ~network ~cache "opam pin -ny %s && opam depext -iy voodoo-do" (remote_uri t.commit); run @@ -219,9 +216,9 @@ end module Gen = struct type voodoo = t - type t = { commit : Git.Commit_id.t; config : Config.t } + type t = { commit : Git.Commit_id.t } - let v { voodoo_gen; config; _ } = { commit = voodoo_gen; config } + let v { voodoo_gen; _ } = { commit = voodoo_gen } let spec ~base t = let open Obuilder_spec in @@ -229,9 +226,6 @@ module Gen = struct |> Spec.add [ run ~network "sudo apt-get update && sudo apt-get install -yy m4"; - run ~network ~cache - "opam pin -ny odoc.dev %s && opam depext -iy odoc" - (Config.odoc t.config); run ~network ~cache "opam pin -ny %s && opam depext -iy voodoo-gen" (remote_uri t.commit); run @@ -239,6 +233,6 @@ module Gen = struct /home/opam"; ] - let digest t = Git.Commit_id.hash t.commit ^ Config.odoc t.config + let digest t = Git.Commit_id.hash t.commit let commit t = t.commit end diff --git a/src/pipelines/api_impl.ml b/src/pipelines/api_impl.ml index 2198ed69..0fd42509 100644 --- a/src/pipelines/api_impl.ml +++ b/src/pipelines/api_impl.ml @@ -172,7 +172,7 @@ let make ~monitor = voodoo_prep_commit_set health_slot pipeline_data.voodoo_prep; voodoo_branch_set health_slot pipeline_data.voodoo_branch; voodoo_repo_set health_slot pipeline_data.voodoo_repo; - odoc_commit_set health_slot pipeline_data.odoc_commit; + odoc_commit_set health_slot "DEPRECATED"; epoch_html_set health_slot pipeline_data.epoch_html; epoch_linked_set health_slot pipeline_data.epoch_linked; failing_packages_set health_slot @@ Int64.of_int failed_count; diff --git a/src/pipelines/docs.ml b/src/pipelines/docs.ml index c517cd57..59367f0b 100644 --- a/src/pipelines/docs.ml +++ b/src/pipelines/docs.ml @@ -258,7 +258,7 @@ let v ~config ~opam ~monitor ~migrations () = in let generation = let+ voodoo in - Epoch.v config voodoo + Epoch.v voodoo in (* 0) Housekeeping - run migrations *) let* _ = migrations in