brbzull0 commented on code in PR #13032:
URL: https://github.com/apache/trafficserver/pull/13032#discussion_r4134029440


##########
src/traffic_ctl/CtrlCommands.cc:
##########
@@ -1243,14 +1266,21 @@ ServerCommand::server_debug()
     lookup_request.emplace_rec("proxy.config.diags.debug.tags", 
shared::rpc::NOT_REGEX, shared::rpc::CONFIG_REC_TYPES);
     auto lookup_response = invoke_rpc(lookup_request);
 
-    if (!lookup_response.is_error()) {
-      auto const &records = 
lookup_response.result.as<shared::rpc::RecordLookUpResponse>();
-      if (!records.recordList.empty()) {
-        std::string current_tags = records.recordList[0].currentValue;
-        if (!current_tags.empty()) {
-          // Combine: current|new
-          tags = current_tags + "|" + tags;
-        }
+    if (lookup_response.is_error()) {
+      // Without the current tags the append cannot be done: report it and set 
nothing.
+      _printer->write_output(lookup_response);
+      if (App_Exit_Status_Code == CTRL_EX_OK) {
+        App_Exit_Status_Code = CTRL_EX_ERROR;
+      }

Review Comment:
   Letting the grade stand would exit 0 although nothing was set, so a script 
would take the append as done. Below `--error-level` the command now exits 75 
(not done, retry), the same as `config reload --monitor` when it cannot see the 
outcome; at or above it, 2.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to