aboutsummaryrefslogtreecommitdiff
path: root/bbot/agent
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-02-11 19:44:19 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-02-14 10:26:49 +0300
commit422563c63b2aedaa32fa217aca92b369ac4be755 (patch)
treeec2de1c8f5fc14fb839ce0cbc69dcf4b160b7c73 /bbot/agent
parent30411915355d6946de11638daf98724ab41a9acd (diff)
Fix result manifest request failures due to exceeding request size limit
Diffstat (limited to 'bbot/agent')
-rw-r--r--bbot/agent/agent.cxx21
1 files changed, 19 insertions, 2 deletions
diff --git a/bbot/agent/agent.cxx b/bbot/agent/agent.cxx
index 982f67c..3cfc4b8 100644
--- a/bbot/agent/agent.cxx
+++ b/bbot/agent/agent.cxx
@@ -1432,7 +1432,11 @@ try
try
{
- serialize_manifest (tq, c.out, u, "task request", false);
+ serialize_manifest (tq,
+ c.out,
+ u,
+ "task request",
+ false /* fail_hard */);
}
catch (const failed&) {f = true;}
@@ -1629,7 +1633,20 @@ try
try
{
- serialize_manifest (rq, c.out, u, "task request");
+ // Don't break lines in the manifest values not to further increase
+ // the size of the result request manifest encoded representation.
+ // Note that this manifest can contain quite a few lines in the
+ // operation logs, potentially truncated to fit the upload limit
+ // (see worker/worker.cxx for details). Breaking these lines can
+ // increase the request size beyond this limit and so we can end up
+ // with the request failure.
+ //
+ serialize_manifest (rq,
+ c.out,
+ u,
+ "result request",
+ true /* fail_hard */,
+ true /* long_lines */);
}
catch (const failed&) {f = true;}