Age | Commit message (Collapse) | Author |
|
Fixes: 52bd280b4b95949cf130e4d7477c02ad2d2f81b3 ("Refactor: Database connection setup code")
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
(cherry picked from commit 4e3dccc9290056c91d120cfa8cf74330b0a7d65d)
|
|
Since today, sourcehut builds should only work if payment is enabled.
Right now it still seems to work. I am not sure whether this is a bug or
intended. Either way, to be nice, remove the build setup for now until
we figured out what is happening and how to continue.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This fixes the git commit hash and author information passing.
The changes in 2d72cbed2495517dba84ec4d46e5f521ff46412b did not add the
environment variables to the `find_artifact()` call when searching for
replacement artifacts.
Thus, calling the same build twice, with the staging directory from the first
call added in the second call, resulted in a full rebuild, although the
artifacts from the first call could be resused.
With this patch applied, this issue is fixed by adding the environment variables
to the environment passed to the `find_artifacts()` call.
Fixes: 2d72cbed2495517dba84ec4d46e5f521ff46412b ("Add feature to pass git author and git commit information to container")
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Tested-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
|
|
This fixes a nasty bug; because we used the LogItem::display() function to build
the log string that was put into the database, the database contained
_colorized_ log lines. Because of this, our parsing of the log text later (when
reading historical data from the database) failed to parse whether the job was
successfull or not.
The issue was actually introduced in b3a6458ce34e3065192208826b2fc85edd4761f9,
where we changed the `LogItem::display()` implementation.
With this fix in place, the log text in the database is corrected again (only
for new logs that get put into the database).
Fixes: b3a6458ce34e3065192208826b2fc85edd4761f9 ("Add color support in LogItem::display() impl")
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Tested-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
This patch changes the interface from `-> Option<bool>` to something more
explanatory.
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
This patch removes the `PackageFlags` type and the feature from the package
definition struct, so a user cannot longer use the package flags.
This feature was not used yet in our repository, so it seems that this is
nothing that is valuable.
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
This fixes a bug where dependencies were not found, but this was
ignored.
This happened even if there was a typo in the version of the
dependency, for example.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Tested-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
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>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
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>
|
|
This patch changes the LogReceiver to preallocate a reasonable large buffer for
holding logs in memory.
Because of the fact that we have to write the log _in one piece_ to the
database (there might be a way to append to the log field, but that's
optimization of a problem we shouldn't have - we rather should use another
approach for storing logs), we have to keep the log in memory until the job is
finished.
For keeping the log of a job in memory, we use a `Vec`. After consulting the
documentation
https://doc.rust-lang.org/stable/std/collections/index.html#when-should-you-use-which-collection
https://doc.rust-lang.org/stable/std/collections/index.html#sequences
we found that `Vec` should be appropriate here, although `VecDeque` might be an
option as well because of O(1) insertion time (and we're only inserting).
Still, because `Vec` has amortized constant time for adding elements at the end,
this should be sufficient.
Preallocating a reasonable large amount of elements could yield big benefits
with only minor disadvantage. If the job fails early (after only a few lines of
log output), there's memory wasted.
Also, if we have a large number of jobs, we allocate a huge amount of memory
before filling it up.
Because we need to have that memory anyways (considering all jobs succeed), that
is not really a disadvantage.
Now, what is "reasonable large"? This value might be changed later on, but for
now, I took this value from experience we had when using butido in practice:
select
AVG(length.l), MAX(length.l), MIN(length.l)
FROM
(
SELECT
LENGTH(log_text) - LENGTH(REPLACE(log_text, chr(10), '')) AS l
FROM
jobs
) AS length
+-----------------------+--------+-------+
| avg | max | min |
|-----------------------+--------+-------|
| 2863.0497427101200686 | 165213 | 11 |
+-----------------------+--------+-------+
The max and min values seem to be extreme. Now, the values contain a lot of
failed jobs and the maximum value (165k log lines is _huge_!) was also a bogus
setup.
Removing these from the equation, using only the successful jobs, gives us a
not-so-different number:
SELECT
AVG(l.len), MAX(l.len), MIN(l.len)
FROM
(
SELECT
LENGTH(log_text) - LENGTH(REPLACE(log_text, CHR(10), '')) AS len,
STRPOS(log_text, 'BUTIDO:STATE:OK') AS okpos
FROM JOBS
) AS l
WHERE
l.okpos != 0
AND
l.len != 165213
+-----------------------+-------+-------+
| avg | max | min |
|-----------------------+-------+-------|
| 2661.7306791569086651 | 55422 | 66 |
+-----------------------+-------+-------+
Using the average (arithmetic mean) as a baseline, we decided to go for 4096
(2^12) preallocated elements in the buffer, which should be reasonable.
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
(cherry picked from commit 944ee16b5688f10d7f2395be630802035fa6635f)
|
|
This change fixes a bug where two submits that differed only in an
environment variable where considered equal:
butido build pkg
butido build pkg -E FOO=1
the second build reused the artifacts from the first one, which is a
bug.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Tested-by: Matthias Beyer <mail@beyermatthias.de>
|
|
We have to manually implement Debug here, because otherwise we would
print the database password in the debug output, which is CLEARLY a bad
idea.
Hence, change the debug!() call in the establish_connection() function
to (debug-)print `self` and hand-implement the `Debug` trait.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
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>
|
|
|
|
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This results in less overhead in the or-else case by now allocating a
String object.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
|
|
|
|
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
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>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
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>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
The automatic pager setup resulted in more confusion in using the CLI than in
benefit. Hence, remove this feature again.
This reverts commit b5a3f02a05311d5f5a4eb35b8d2513cb6a543560.
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
(cherry picked from commit db40f5d644fa5fbf3c0a2ea2fe3498c524f4e33f)
|
|
|