Copilot commented on code in PR #13842:
URL: https://github.com/apache/trafficserver/pull/13842#discussion_r4282754158


##########
src/traffic_ctl/CtrlCommands.cc:
##########
@@ -351,6 +366,8 @@ ConfigCommand::config_status()
     for (const auto &task : resp.tasks) {
       _printer->as<ConfigReloadPrinter>()->print_reload_report(task, true);
     }
+    // The server lists the newest reload last. Older ones shown with --count 
are history and are not graded.
+    grade_reload(resp.tasks.back());

Review Comment:
   `get_reload_config_status` returns history in most-recent-first order 
(`ReloadCoordinator::get_all()` and its public comment use that order), so 
`resp.tasks.back()` is the oldest reload, not the newest. With `--count` this 
grades the wrong task and can report success for a failed newest reload (or 
vice versa). Grade `resp.tasks.front()` instead, and update the test fixtures 
that currently model the reverse order.



-- 
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