From Julien Floret to ~rjarry/dlrepo
Sometimes, we just want to use the output of dlrepo-cli commands in a script (for example to iterate through all jobs of a tag) without the hassle of the json format. In those cases, the "URL:" line is just annoying. Let's print it to stderr to separate it from the actual output. Signed-off-by: Julien Floret <julien.floret@6wind.com> Acked-by: Thomas Faivre <thomas.faivre@6wind.com> --- dlrepo-cli | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlrepo-cli b/dlrepo-cli index 266446edab2f..1396ba80993d 100755 [message trimmed]
From Julien Floret to ~rjarry/dlrepo
It is impractical to rely on the periodic cleanup, because the
time of the cleanup depends on the time when the server started.
So if we want to setup let's say a daily cleanup at 8 AM, we have to
start the server at 8 AM beforehand.
Allow disabling periodic cleanup altogether by setting the
DLREPO_TAG_CLEANUP_PERIOD to 0.
As a reminder, the tag cleanup can also be triggered from an external
script by sending the USR1 signal to the server. This method allows
more control over the cleanup schedule.
Signed-off-by: Julien Floret <julien.floret@6wind.com>
Acked-by: Thomas Faivre <thomas.faivre@6wind.com>
[message trimmed]
From Julien Floret to ~rjarry/dlrepo
Add the possibility to set a custom description on a tag with the "dlrepo-cli set-description BRANCH TAG DESCRIPTION" command. The message is stored in an internal ".description" file inside the tag directory. The description is displayed on top of the tag page on the web interface. It can also be read on the CLI using the "dlrepo-cli get-description BRANCH TAG" command. Signed-off-by: Julien Floret <julien.floret@6wind.com> Acked-by: Thomas Faivre <thomas.faivre@6wind.com> --- dlrepo-cli | 36 ++++++++++++++++++++++++++++++++++++ [message trimmed]
From Julien Floret to ~rjarry/dlrepo
When issuing a GET or HEAD request on a format folder that contains a single artifact file, the response is an HTTP redirection to that file. In that case, add a "Content-Disposition" HTTP header to the response, so that it can be used with e.g. "curl -JOL" to save the downloaded file using the actual file name instead of that of the format folder. Signed-off-by: Julien Floret <julien.floret@6wind.com> Acked-by: Thomas Faivre <thomas.faivre@6wind.com> --- dlrepo/views/fmt.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/dlrepo/views/fmt.py b/dlrepo/views/fmt.py [message trimmed]
From Julien Floret to ~rjarry/dlrepo
Le mer. 24 janv. 2024 à 21:08, Robin Jarry <robin@jarry.cc> a écrit : > > Julien Floret <julien.floret@6wind.com> wrote: > > Patches 1 and 2 add missing restrictions on deleting a job format. > > Patch 3 is for allowing modification of an internal format even when the > > job is locked. > > > > Julien Floret (3): > > fmt: refuse deletion in product view > > fmt: refuse deletion if job is locked > > fmt: allow modifying internal format in locked job > > Acked-by: Robin Jarry <robin@jarry.cc> >
From Julien Floret to ~rjarry/dlrepo
Hi, Oops, I forgot to run "make lint". The changes made by black are trivial formatting of long lines in patch 1. Robin, do you want me to send a v2 of this series? Julien Le mer. 24 janv. 2024 à 14:39, Julien Floret <julien.floret@6wind.com> a écrit : > > Deleting product formats is not supported. > > Fixes: 6de1f15cfcf8 ("format: add delete method")
From Julien Floret to ~rjarry/dlrepo
Internal formats are not released and are not included in the
calculation of the job digest.
They can then be safely added to or deleted from a locked job, without
needing to unlock it prior, so the uploader will not need the "update"
access, only the "add" access.
It is useful to add extra info after a job has been released, like
test results, or transient data like CVE scans updated daily with an
up-to-date vulnerability database, without giving too many permissions
to the uploader.
Signed-off-by: Julien Floret <julien.floret@6wind.com>
Acked-by: Thomas Faivre <thomas.faivre@6wind.com>
---
[message trimmed]
From Julien Floret to ~rjarry/dlrepo
A format should not be deleted in a locked job. Fixes: 6de1f15cfcf8 ("format: add delete method") Signed-off-by: Julien Floret <julien.floret@6wind.com> Acked-by: Thomas Faivre <thomas.faivre@6wind.com> --- dlrepo/views/fmt.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlrepo/views/fmt.py b/dlrepo/views/fmt.py index fca4ae4cdc8b..654d30468f77 100644 --- a/dlrepo/views/fmt.py +++ b/dlrepo/views/fmt.py @@ -188,12 +188,14 @@ def _get_format(repo, match_info, access_cb: Callable[[str], bool] = None, delet [message trimmed]
From Julien Floret to ~rjarry/dlrepo
Deleting product formats is not supported. Fixes: 6de1f15cfcf8 ("format: add delete method") Signed-off-by: Julien Floret <julien.floret@6wind.com> Acked-by: Thomas Faivre <thomas.faivre@6wind.com> --- dlrepo/views/fmt.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlrepo/views/fmt.py b/dlrepo/views/fmt.py index 33876764141c..fca4ae4cdc8b 100644 --- a/dlrepo/views/fmt.py +++ b/dlrepo/views/fmt.py @@ -78,7 +78,7 @@ class FormatDirView(BaseView): [message trimmed]
From Julien Floret to ~rjarry/dlrepo
Patches 1 and 2 add missing restrictions on deleting a job format. Patch 3 is for allowing modification of an internal format even when the job is locked. Julien Floret (3): fmt: refuse deletion in product view fmt: refuse deletion if job is locked fmt: allow modifying internal format in locked job dlrepo/views/artifact.py | 2 +- dlrepo/views/fmt.py | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) --