summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)Author
2021-04-09Fix: Error message should be less technical hereMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-09Merge branch 'source-get-path'Matthias Beyer
2021-04-08Optimize: Remove helperMatthias Beyer
Because we can just use the actual interface function here. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-08Optimize: Dont compute PathBuf object three timesMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-08Remove helper Source::exists()Matthias Beyer
It is easier for the caller (because more visible what happens) to call `Source::path().exists()`. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-08Add subcommand to get path to source fileMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-08Fix: Error out if a patch file is missingMatthias Beyer
This patch fixes a bug where a patch file is not there. Before this patch, we were simply ignoring non-existing files in the iterator, because during development of this algorithm, it seemed to be the right idea because of the recursion that is happending. The patch-branch-patching that is happening in the recursion, that rewrites the pathes to the patches during the recursive loading of the packages, used to yield invalid pathes at some point, which simply could be ignored. That happened before that patch. But because during the development of the recursive loading, the scheme how this all works was changed, it does not yield invalid pathes anymore. Hence, we can be sure that either the file is here or it is not - which is an error then. I have to say that I'm not particularly good with recursion, but as far as my tests go, this seems to work as intended now. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-08Print submit details before starting buildsMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-08Rewrite source verification outputMatthias Beyer
This patch rewrites the source verification output to be one progress bar that prints all necessary information: That is, only a one-line success message, or multiple lines in case of error. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-08Fix: Update the progress bar each secondMatthias Beyer
This patch tries to work around a longer-than-1-sec blocking future while waiting for the channel .recv() call in the LogReceiver. The issue at hand is: If the channel does not produce log output for longer than 1 second, the progress bar won't be `tick()`ed for that amount of time. That leads to progress bars that seem to block (no update of the time in the progress bar output), which might confuse users. This patch works around that by wrapping the recv() in a timeout future and then catch the timeout, ping the progress bar and try to `recv()` again. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-08Remove pub(super) on Job membersMatthias Beyer
Not yet perfectly nice, but almost there. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-04-06Remove pub from FileStoreImpl::root_path memberMatthias Beyer
And replace it with a getset::Getters implementation. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-04-06Remove outdated commentMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-18Make error message more verboseMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-18Rewrite PackageVersionConstraint constructingMatthias Beyer
Use the TryFrom trait rather than a `::new()` constructor that can fail. This is way more idomatic. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-18Make ::parser() privateMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-18Rewrite to use constructorMatthias Beyer
Rewrite this function to use the constructor or PackageVersionConstraint instead of getting the parser and using it, because this shouldn't be allowed anyways. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-17Make error on closed channel more verboseMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-17Add check whether package name or version is emptyMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-17Merge branch 'update-deps'Matthias Beyer
2021-03-16Fix: Check return value of confirmation promptMatthias Beyer
This is an embarrassing bug. :-/ Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-13Switch from sha1 to sha-1Matthias Beyer
This is because the "sha1" crate seems to be unmaintained (no release in 3 years) but the sha-1 crate seems to be actively maintained in the context of a bigger rust-crypto-functions project. Signed-off-by: Matthias Beyer <mail@beyermatthias.de> Tested-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-11Fix: Make XDG configuration not requiredMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-11Merge branch 'misc'Matthias Beyer
2021-03-11Add more error context to config loadingMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-11Endpoint configuration as MapMatthias Beyer
This patch rewrites the endpoint configuration format to be a map. The problem here is, that a list of endpoints cannot easily be used with layered configuration, where a part of the configuration lives in the XDG config home of the user and the rest lives in the repository. With this patch, the endpoints are configured with a map instead of an array, which makes it less complicated to overwrite. The name of an endpoint is now the key in the map. A type `EndpointName` was introduced to take advantage of strong typing. Thus, the patch touches a bit more code to adapt to the new type in use. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-11Add xdg-based config file mergingMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-11Add more verbose error if ./. is not a git repositoryMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-11Fix: Make error message more readable for humansMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-11Add missing about message for release subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-11Add more verbose error output if no subcommand is givenMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-11Add more verbose error output if no subcommand is givenMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-11Add more error context if CLI command failsMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-11Add more error contextMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-11Fix: Remove job input/output artifacts tablesMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Fixes: b95c3f21a2a9406d45a0e421a11f6425291f1182 ("Remove job input/output artifacts tables")
2021-03-10Merge branch 'pathes-to-absolute'Matthias Beyer
2021-03-10Fix: Do not check lint script path in config validationMatthias Beyer
This fix is needed because the config validation does not know whether the config is loaded from ./ or from ../ (or way more up). The script linter path points to a file relative to the project root, which cannot be checked here, but only when constructing the linter command. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-10Merge branch 'subcommand-endpoint'Matthias Beyer
Conflicts: src/cli.rs src/main.rs from merging the "metrics" subcommand implementation branch first. Conflicts were trivial, so I resolved them here in the merge commit. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-10Add comments on patch-path-fixing algorithmMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-10Refactor for more readabilityMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-10Re-write patch postprocessingMatthias Beyer
This patch rewrites patch post-processing with a new setter in the config-rs crate: Config::set_once() That is introduced on a PR I've written for the crate. The PR: https://github.com/mehcode/config-rs/pull/172 The new function is more likely to land on the config-rs master branch than the old one, as it does not introduce more exported types from the config-rs crate. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-10Implement patch-to-container copyingMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-10Add command to get metricsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-10Clippy fix: Remove unneeded lifetimesMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-10Clippy fix: Remove unneeded to_string() callMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-10Add subcommand: container inspectMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-10Add long_about for container exec subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-10Refactor: Simplify impl of Endpoint::get_container_by_id()Matthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-09Implement patch-path rewritingMatthias Beyer
This patch ensures that pathes for patches are always relative to the repository root, when loading the packages layered from the repository. The problem is well described in the comment in the code, so this commit message ends here. This patch was written using an proposed feature for the config-rs dependency: https://github.com/mehcode/config-rs/pull/165 This PR added a `Config::get_value_mut()` function and exported the `config::value::ValueKind` type in config-rs public API. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-08Refactor filter building into helper functionMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>