summaryrefslogtreecommitdiffstats
path: root/src/commands
AgeCommit message (Collapse)Author
2021-05-31Fix typoMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-31Add trace outputMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-31Make job-successfullness-check less boolishMatthias Beyer
This patch changes the interface from `-> Option<bool>` to something more explanatory. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-20Update dependency: indicatif 0.15 -> 0.16.1Matthias Beyer
0.16.1 has been published which fixes the bug introduced by 0.16.0, hence update this dependency. This reverts commit ddbd9629b3188c9f08d023829683c40ab9e1448b. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-18Fix typo in fn nameMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-18Fix: Counting should not use helper fnMatthias Beyer
By using the helper function is_job_successfull(), we resulted in bogus output when there was no successfull and no failed job, because jobs can have an "unknown" state as well. This patch fixes this by counting properly. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-17Revert "Update dependency: indicatif 0.15 -> 0.16"Matthias Beyer
This reverts the dependency update because indicatif 0.16 introduced a reachable `unreachable!()` statement in their sourcecode that we actually hit if we `--hide-bars`. This reverts commit 6ceccb679d9c2d19389c6c6eef792d8db9086f31. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-05-17Add "db setup" subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-05-17Refactor: Return Cow instead of StringMatthias Beyer
This results in less overhead in the or-else case by now allocating a String object. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-05-17Merge branch 'download-graceful-error-reporting'Matthias Beyer
2021-05-17Merge branch 'download-fail-slow'Matthias Beyer
2021-05-12Report download errors gracefullyMatthias Beyer
This patch changes the implementation of the "source download" subcommand so that download errors are reported in the progress bar message, instead of dropping the bar silently (which resulted in errors not being that visible to the user). Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-12Report URL of finished download in bar finish messageMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-12Fix: Consume all items before failingMatthias Beyer
This patch changes the download implementation so that one failing download does not fail the whole process, but errors are collected instead and reported after all other downloads are finished. This is the simple case implementation where only one error is reported, though multiple could have happened. Tested-by: Matthias Beyer <matthias.beyer@atos.net> Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-12Set length of bar before iteratingMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-11Add description for the subcommand implementing functionsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-05-11Add docs for helper functionsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-05-11Add module-level docsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-05-11Refactor: Parsing and connection establishing should be member functionsMatthias Beyer
This refactors the parsing of the `DbConnectionConfig` object and the establishing of the connection to be member functions of the type, rather than free functions. Way more idomatic. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-11Refactor: Database connection setup codeMatthias Beyer
This patch refactors the database connection setup code to involve less copying of data in memory. It also changes the configuration value type of the database port and the database connection timeout setting to be `u16` instead of `String`, which is another improvement. Because the `DbConnectionConfig` type no longer holds owned values, it must be annotated with a lifetime. Usages were adapted. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-11Refactor: Use human readable time formatMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-11Add subcommand: endpoint containers stopMatthias Beyer
Implementation of the "endpoint containers stop" subcommand. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-11Merge branch 'refactor-log-printing'Matthias Beyer
2021-05-11Refactor: Replace manual string-formatting with LogItem::display() callMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-11Refactor: Use moving iterator for ParsedLogMatthias Beyer
This patch replaces the ParsedLog::iter() function with ParsedLog::into_iter(), to use a moving iteration rather than a iteration by reference, because iterating by reference is not necessary at all. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-11Refactor: Implement FromStrMatthias Beyer
Instead of having a function `&str -> Result<Self>` on the type, implement the `std::str::FromStr` trait to be more rusty here. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-11Refactor: Use the LogItem::display() function instead of reimplementing itMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-11Add subcommand to get top output of containersMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-11Fix: Order of header entriesMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-11Merge branch 'update-deps'Matthias Beyer
2021-05-11Update dependency: indicatif 0.15 -> 0.16Matthias Beyer
Because the interfaces of indicatif have changed, this PR changes a lot of calls in the codebase. (Yay, moving all the things!) Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-05-10Add subcommand "db log-of"Matthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-22Merge branch 'fix-prune-no'Matthias Beyer
2021-04-22Merge branch 'submits-limit'Matthias Beyer
2021-04-22Merge branch 'subcommand-submit'Matthias Beyer
2021-04-22Fix: If no, returnMatthias Beyer
Fixes a bug where the return value of the function was not used. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-22Add --limit argMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-22Refactor into three query blocksMatthias Beyer
This should be equivalent to the previous version. The first if-block should be equivalent because of the changed join schema, which should select all submits for jobs where packages have the appropriate name. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-22Refactor: Reorder diesel query building for further refactoringMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-22Refactor: submit_to_vec laterMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-22Implement "db submit" subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-21Outsource helper to check whether job was successfulMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-21Add option to disable printing of released file pathesMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-21Subcommand "release new": Print pathes of released filesMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-12Fix: copy release artifact instead of renaming itMatthias Beyer
Because renaming does not work if there is a filesystem boundary. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-12Shuffle endpoint configurationsMatthias Beyer
As the comment in the code explains, we're always loading the endpoints from the same file and feed it to the scheduler the same way. Because of that, we always schedule to the first endpoint until it is full and then to the second. To have a bit more spreading over the endpoints, shuffle the configurations before connecting, so this way the scheduler does not always (each time butido is called) use the same endpoint as first endpoint. This is not a perfect solution, but a simple and working one. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-09Merge branch 'subcommand-db-jobs-simplification'Matthias Beyer
2021-04-09Add --limit option to "db jobs"Matthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-09Add debug outputMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-09Fix: clap value querying should match CLI specMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>