summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2021-04-09shell: hardcode channel to 1.50.0shell-rust-toolchainMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-04-09Merge branch 'subcommand-db-jobs-simplification'Matthias Beyer
2021-04-09Fix: Patch file finding algorithmMatthias Beyer
Because commit 5c36c119f9448baf6bfe5245c6ebac1aa09d5b43 was not enough and was actually buggy, this fixes the patch-file-finding algorithm _again_. The approach changed a bit. It actually introduces even more overhead to the loading algorithm, because of constant type-conversions. But it's as good as it can be right now. So first of all, we're collecting the patches before the merge into a Vec<PathBuf>. Each of those are existing. Then we check whether the new patch exists, and if it not does, we check whether the file actually exists in the patches from before the merge (by filename). If it does, it seems that we dragged the entry from the previous recursion. In this case, the patches from before the merge were valid, and the recursion invalidated the path. I.E.: /pkg.toml with patches = [ "a" ] /a /sub/pkg.toml with no patches=[] in the recursion for /sub/pkg.toml, we get a ["a"] in the patches array, because that's how the layered configuration works. But because the path is invalid, we check whether before the merge (so, the patches array from /pkg.toml) has a file named equally - which it does. So the array before the merge is the correct one. I did some tests on this and it seems to work correctly, but more edge-cases may exist. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net> Fixes: 5c36c119f9448baf6bfe5245c6ebac1aa09d5b43 ("Fix: Error out if a patch file is missing")
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>
2021-04-09Optimize: Only load the job ids from the DB in the first placeMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-09Rewrite jobs-env-filteringMatthias Beyer
This patch rewrites the filtering for environment variables in the "db jobs" subcommand. The output does not contain the environment variables anymore, which is a drawback, but the implementation is _way_ more easy to understand, which I consider an bigger advantage. The implementation now actually queries the database twice: first it gets all job ids from the JobEnv->EnvVar mapping and then builds a filter based on these IDs for the job output. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-09Fix: Error message should be less technical hereMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-09Simplify implementation of subcommand "db jobs"Matthias Beyer
This patch simplifies the implementation by using the `.into_boxed()` function from the diesel query builder and appling the filters from the CLI one-by-one. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-09Merge branch 'source-get-path'Matthias Beyer
2021-04-09Merge branch 'source-simplify-impl'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-18Merge branch 'nice-error-for-package_version_contraint'Matthias Beyer
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-17Merge branch 'prepare-0.1.0'Matthias Beyer
2021-03-17Add entry for 0.1.0Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-17Add crate metadataMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-17Add note about MSRVMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
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-17Update config: own fork -> 0.11Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-17Merge branch 'update-deps'Matthias Beyer
2021-03-16Merge branch 'ban-fuchsia'Matthias Beyer
2021-03-16Merge branch 'fix-confirm'Matthias Beyer
2021-03-16Update dialoguer: 0.7 -> 0.8Matthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
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-13Add lint in CI to check banned cratesMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-13Ban fuchsia-cprgnMatthias Beyer
So we do not accidentially update diesel or some other lib and depend on it by accident. 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-11Merge branch 'xdg-config'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>