feat(cmd): Implemented a CLI for task management#4609
Merged
gulyasgergely902 merged 1 commit intoEricsson:masterfrom Sep 23, 2025
Merged
feat(cmd): Implemented a CLI for task management#4609gulyasgergely902 merged 1 commit intoEricsson:masterfrom
gulyasgergely902 merged 1 commit intoEricsson:masterfrom
Conversation
888ff22 to
f74e6e6
Compare
This patch extends `CodeChecker cmd` with a new sub-command,
`serverside-tasks`, which lets users and administrators deal with
querying the status of running server-side tasks.
By default, the CLI queries the information of the task(s) specified by
their token(s) in the `--token` argument from the server using
`getTaskInfo(token)`, and shows this information in either verbose
"plain text" (available if precisely **one** task was specified), "table"
or JSON formats.
In addition to `--token`, it also supports 19 more parameters, each of
which correspond to a filter option in the `TaskFilter` API type.
If any filters in addition to `--token` is specified, it will exercise
`getTasks(filter)` instead.
This mode is only available to administrators.
The resulting, more detailed information structs are printed in "table"
or JSON formats.
Apart from querying the current status, two additional flags are
available, irrespective of which query method is used to obtain a list
of "matching tasks":
* `--kill` will call `cancelTask(token)` for each task.
* `--await` will block execution until the specified task(s) terminate
(in one way or another).
`--await` is implemented by calling the new **`await_task_termination`**
library function, which is implemented with the goal of being reusable
by other clients later.
gulyasgergely902
requested changes
Aug 19, 2025
gulyasgergely902
approved these changes
Sep 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
⛔ Blocked by #4317.
This is patch 2 of the Asynchronous Store Protocol (#3672).
This patch extends
CodeChecker cmdwith a new sub-command,serverside-tasks, which lets users and administrators deal with querying the status of running server-side tasks.By default, the CLI queries the information of the task(s) specified by their token(s) in the
--tokenargument from the server usinggetTaskInfo(token), and shows this information in either verbose "plain text" (available if precisely one task was specified), "table" or JSON formats.In addition to
--token, it also supports 19 more parameters, each of which correspond to a filter option in theTaskFilterAPI type. If any filters in addition to--tokenis specified, it will exercisegetTasks(filter)instead. This mode is only available to administrators. The resulting more detailed information structs are printed in "table" or JSON formats.Apart from querying the current status, two additional flags are available, irrespective of which query method is used to obtain a list of "matching tasks" after filtering:
--killwill callcancelTask(token)for each task.--awaitwill block execution until the specified task(s) terminate (in one way or another).--awaitis implemented by calling the newawait_task_terminationlibrary function, which is implemented with the goal of being reusable by other clients later.Example outputs
Query that results in using the filters by default shows
tableformatTip
Notice the showing of
MachineID in the output, as this is a query run by an administrator.User can modify the output format via the usual
--outputparameterDefault behaviour when searching for a specific task (identified by token)
Tip
Comments are formatted as if they were e-mails or chat messages for better visual separation.
Caution
This output is only meant to be consumed by humans!