From 022d5cb4f246809ce8d9a08d3499edd309ed26e7 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 29 Sep 2021 21:22:00 +0300 Subject: Add agent, worker, and dependency checksums to task/result manifests --- libbbot/manifest.hxx | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) (limited to 'libbbot/manifest.hxx') diff --git a/libbbot/manifest.hxx b/libbbot/manifest.hxx index 1896f70..7ba53cb 100644 --- a/libbbot/manifest.hxx +++ b/libbbot/manifest.hxx @@ -170,6 +170,8 @@ namespace bbot std::vector requirements; butl::small_vector tests; + butl::optional dependency_checksum; + std::string machine; // Build machine to use for building the package. butl::target_triplet target; // Build target. @@ -178,6 +180,7 @@ namespace bbot // Build system configuration variables (in addition to build environment // configuration variables). + // // Note: could be quoted. // strings config; @@ -194,6 +197,8 @@ namespace bbot butl::optional interactive; // Interactive build breakpoint. + butl::optional worker_checksum; + strings unquoted_config () const; @@ -206,26 +211,30 @@ namespace bbot strings tr, std::vector ra, butl::small_vector ts, + butl::optional dc, std::string mn, butl::target_triplet tg, butl::optional en, strings cf, butl::optional ht, strings wr, - butl::optional ir) + butl::optional ir, + butl::optional wc) : name (std::move (nm)), version (std::move (vr)), repository (std::move (rl)), trust (std::move (tr)), requirements (std::move (ra)), tests (std::move (ts)), + dependency_checksum (std::move (dc)), machine (std::move (mn)), target (std::move (tg)), environment (std::move (en)), config (std::move (cf)), host (std::move (ht)), warning_regex (std::move (wr)), - interactive (std::move (ir)) {} + interactive (std::move (ir)), + worker_checksum (std::move (wc)) {} public: task_manifest () = default; // VC export. @@ -255,15 +264,20 @@ namespace bbot // butl::optional challenge; butl::optional result_url; + + butl::optional agent_checksum; + butl::optional task; task_response_manifest (std::string s, butl::optional c, butl::optional u, + butl::optional ac, butl::optional t) : session (std::move (s)), challenge (std::move (c)), result_url (std::move (u)), + agent_checksum (std::move (ac)), task (std::move (t)) {} public: @@ -283,6 +297,7 @@ namespace bbot // indicate whether one "overrides" the other in the "merge" operator| // (see below). // + skip, success, warning, error, @@ -346,14 +361,21 @@ namespace bbot // operation_results results; + butl::optional worker_checksum; + butl::optional dependency_checksum; + result_manifest (bpkg::package_name n, bpkg::version v, result_status s, - operation_results r) + operation_results r, + butl::optional wc, + butl::optional dc) : name (std::move (n)), version (std::move (v)), status (s), - results (std::move (r)) {} + results (std::move (r)), + worker_checksum (std::move (wc)), + dependency_checksum (std::move (dc)) {} public: result_manifest () = default; // VC export. @@ -375,13 +397,17 @@ namespace bbot // butl::optional> challenge; + std::string agent_checksum; + result_manifest result; result_request_manifest (std::string s, butl::optional> c, + std::string ac, result_manifest r) : session (std::move (s)), challenge (std::move (c)), + agent_checksum (std::move (ac)), result (std::move (r)) {} public: -- cgit v1.1