summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2021-05-05Add github action for CIgithub-actionsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-04-26Add support for database connection timeoutMatthias Beyer
This patch adds support for a database connection timeout, giving the user the option to configure one, but hardcoding a default timeout to 30 seconds. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-22Remove outdated docMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-04-22Update changelog for 0.1.1 releaseMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de> (cherry picked from commit da9ada592cc9a63cfd2a921f515f7772f906b3cf)
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-22Merge branch 'release-new-print'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-22Add helper functions to load Package from DBMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-22Add helper functions to load Image from DBMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-22Add helper functions to load Endpoint from DBMatthias 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-19Update dependency: diesel 1.4 -> 1.4.6Matthias Beyer
See also: https://rustsec.org/advisories/RUSTSEC-2021-0037.html https://github.com/diesel-rs/diesel/pull/2663 Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-19Update dependency: tar 0.4 -> 0.4.16Matthias Beyer
See: https://rustsec.org/advisories/RUSTSEC-2018-0002.html https://github.com/alexcrichton/tar-rs/pull/156 Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-13Add configurable timeoutChristoph Prokop
This patch adds a configurable timeout value (default 10 seconds) in the Endpoint struct. This way we get an error if the connection to the endpoint is stalled. Signed-off-by: Christoph Prokop <christoph.prokop@atos.net> Pair-programmed-with: Matthias Beyer <matthias.beyer@atos.net> Suggested-by: Matthias Beyer <matthias.beyer@atos.net> Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-04-13Fix: Value nameChristoph Prokop
Signed-off-by: Christoph Prokop <christoph.prokop@atos.net> Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-12Merge branch 'no-outputs-directory'Matthias Beyer
2021-04-12Fix typoMatthias 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-12Make function privateMatthias Beyer
This function is only needed in the PackageVersionConstraint::parser() function, thus make it private here so it is not accidentally used somewhere else. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-12Remove duplicated codeMatthias Beyer
This patch rewrites the unpacking of the tar from the stream in a way so that the unpacking function returns the written pathes and therefore we don't have to pass over the tar twice. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-12Filter out the /outputs/ directoryMatthias Beyer
The issue here is that we copy all build results (packages) in the container to /outputs and then butido uses that directory to fetch the outputs of the build. But, because how the docker API works, we get a TAR stream from docker that _contains_ the /outputs directory. But of course, we don't want that. Until now, that was no issue. But it has become one now that we start adopting butido for our real-world scenarios. This patch adds filtering out that /outputs portion of the pathes from the tar archive when writing all the things to disc. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-04-12Use aquamarine 0.1 branchMike Lubients
Aquamarine has been updated to support offline mode in 0.1.8, and doesn't require internet connection to build and view the rendered diagrams anymore. This change switches from pinned patch version to a the 0.1 branch in order to include the offline more feature and other backward-compatible improvements coming in future Signed-off-by: mersinvald <me@mkl.dev> 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>