From cc77fbf131d9b94aeec2aefa9c185bbaa188c680 Mon Sep 17 00:00:00 2001 From: Francois Kritzinger Date: Wed, 24 Apr 2024 10:00:08 +0200 Subject: Don't pass build hints to build_building() or build_built() --- mod/mod-ci-github-gh.cxx | 3 +-- mod/mod-ci-github-gh.hxx | 5 +++-- mod/mod-ci-github-gq.cxx | 6 +++--- mod/mod-ci-github-gq.hxx | 4 ++-- mod/mod-ci-github.cxx | 6 +----- mod/mod-ci-github.hxx | 4 +--- 6 files changed, 11 insertions(+), 17 deletions(-) diff --git a/mod/mod-ci-github-gh.cxx b/mod/mod-ci-github-gh.cxx index 4e5ae9b..298d21f 100644 --- a/mod/mod-ci-github-gh.cxx +++ b/mod/mod-ci-github-gh.cxx @@ -40,8 +40,7 @@ namespace brep } string - gh_check_run_name (const build& b, - const tenant_service_base::build_hints* bh) + gh_check_run_name (const build& b, const build_queued_hints* bh) { string r; diff --git a/mod/mod-ci-github-gh.hxx b/mod/mod-ci-github-gh.hxx index 0e4cf4e..7d10a15 100644 --- a/mod/mod-ci-github-gh.hxx +++ b/mod/mod-ci-github-gh.hxx @@ -21,6 +21,8 @@ namespace butl namespace brep { + using build_queued_hints = tenant_service_build_queued::build_queued_hints; + // GitHub request/response types (all start with gh_). // // Note that the GitHub REST and GraphQL APIs use different ID types and @@ -83,8 +85,7 @@ namespace brep // NULL, return an abbreviated id if possible. // string - gh_check_run_name (const build&, - const tenant_service_base::build_hints* = nullptr); + gh_check_run_name (const build&, const build_queued_hints* = nullptr); struct gh_repository { diff --git a/mod/mod-ci-github-gq.cxx b/mod/mod-ci-github-gq.cxx index 0b70e47..4a84f2b 100644 --- a/mod/mod-ci-github-gq.cxx +++ b/mod/mod-ci-github-gq.cxx @@ -323,7 +323,7 @@ namespace brep const string& hs, // Head SHA const vector>& bs, build_state st, - const tenant_service_base::build_hints* bh) + const build_queued_hints* bh) { ostringstream os; @@ -399,7 +399,7 @@ namespace brep const string& hs, const vector>& bs, build_state st, - const tenant_service_base::build_hints& bh, + const build_queued_hints& bh, const basic_mark& error) { string rq (gq_serialize_request ( @@ -415,7 +415,7 @@ namespace brep const string& hs, const build& b, build_state st, - const tenant_service_base::build_hints& bh, + const build_queued_hints& bh, const basic_mark& error) { vector crs {move (cr)}; diff --git a/mod/mod-ci-github-gq.hxx b/mod/mod-ci-github-gq.hxx index 87ba49b..3d8c6cc 100644 --- a/mod/mod-ci-github-gq.hxx +++ b/mod/mod-ci-github-gq.hxx @@ -30,7 +30,7 @@ namespace brep const string& head_sha, const vector>&, build_state, - const tenant_service_base::build_hints&, + const build_queued_hints&, const basic_mark& error); // Create a new check run on GitHub for a build. Update `cr` with the new @@ -44,7 +44,7 @@ namespace brep const string& head_sha, const build&, build_state, - const tenant_service_base::build_hints&, + const build_queued_hints&, const basic_mark& error); // Update a check run on GitHub. diff --git a/mod/mod-ci-github.cxx b/mod/mod-ci-github.cxx index f4de8d4..c11b162 100644 --- a/mod/mod-ci-github.cxx +++ b/mod/mod-ci-github.cxx @@ -447,7 +447,7 @@ namespace brep build_queued (const tenant_service& ts, const vector& builds, optional istate, - const build_hints& hs, + const build_queued_hints& hs, const diag_epilogue& log_writer) const noexcept { NOTIFICATION_DIAG (log_writer); @@ -595,11 +595,8 @@ namespace brep }; } - // @@ TODO Are hints still required? And for built? - // function (const tenant_service&)> ci_github:: build_building (const tenant_service& ts, const build& b, - const build_hints&, const diag_epilogue& log_writer) const noexcept { // Note that we may receive this notification before the corresponding @@ -809,7 +806,6 @@ namespace brep function (const tenant_service&)> ci_github:: build_built (const tenant_service&, const build&, - const build_hints&, const diag_epilogue& /* log_writer */) const noexcept { return nullptr; diff --git a/mod/mod-ci-github.hxx b/mod/mod-ci-github.hxx index 4b23d85..07feca8 100644 --- a/mod/mod-ci-github.hxx +++ b/mod/mod-ci-github.hxx @@ -43,17 +43,15 @@ namespace brep build_queued (const tenant_service&, const vector&, optional initial_state, - const build_hints&, + const build_queued_hints&, const diag_epilogue& log_writer) const noexcept override; virtual function (const tenant_service&)> build_building (const tenant_service&, const build&, - const build_hints&, const diag_epilogue& log_writer) const noexcept override; virtual function (const tenant_service&)> build_built (const tenant_service&, const build&, - const build_hints&, const diag_epilogue& log_writer) const noexcept override; private: -- cgit v1.1