~jfloret

Recent activity

[PATCH dlrepo] views: catch exception on invalid fmt name 17 days ago

From Julien Floret to ~rjarry/dlrepo

Attempting to upload to a invalid format name (name starting with a
"." or containing a "/") resulted in error "500 Internal Server
Error". Let's catch the exception to get error "404: Not Found"
instead.

Signed-off-by: Julien Floret <julien.floret@6wind.com>
Acked-by: Thomas Faivre <thomas.faivre@6wind.com>
---
 dlrepo/views/artifact.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlrepo/views/artifact.py b/dlrepo/views/artifact.py
index dcd40ca992d2..e7dc1bcef067 100644
--- a/dlrepo/views/artifact.py
[message trimmed]

[PATCH dlrepo] container: fix pull with no tag 3 months ago

From Julien Floret to ~rjarry/dlrepo

When doing a container pull with no tag (or ":latest"):

> docker pull <registry>/<branch>/<job>

Before this patch, the "latest" tag was selected from all available
tags in /branches/<branch>, not from the tags available for that
specific container. As a consequence, if the container did not exist
in the latest tag, the "docker pull" or equivalent
command returned an error like:

> Error response from daemon: manifest for <img>:latest not found: manifest unknown: latest

Fix that by adding an optional "filter_names" argument to
Branch.get_tag(): when resolving a dynamic tag like "latest", tags
[message trimmed]

[PATCH dlrepo v2] cli: new no-print-url option 3 months ago

From Julien Floret to ~rjarry/dlrepo

The --no-print-url option allows disabling the printing of the target
URL to stderr.
That option is useful in scripts, where we want actual errors to
pop in stderr, but not "URL:" lines.

Suggested-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Julien Floret <julien.floret@6wind.com>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 dlrepo-cli | 26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)

diff --git a/dlrepo-cli b/dlrepo-cli
index 1396ba80993d..8222ca1b4154 100755
[message trimmed]

Re: [PATCH dlrepo] cli: new no-print-url option 3 months ago

From Julien Floret to ~rjarry/dlrepo

Le mer. 11 déc. 2024 à 11:59, Robin Jarry <robin@jarry.cc> a écrit :
>
> Julien Floret, Dec 11, 2024 at 11:57:
> > The --print-url/--no-print-url options allow enabling or disabling the
> > printing of the target URL to stderr. Printing is on by default.
> > "--no-print-url" is useful in scripts, where we want actual errors to
> > pop in stderr, but not "URL:" lines.
> >
> > Suggested-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> > Signed-off-by: Julien Floret <julien.floret@6wind.com>
> > Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> > ---
> >  dlrepo-cli | 34 ++++++++++++++++++++++++++++------
> >  1 file changed, 28 insertions(+), 6 deletions(-)

[PATCH dlrepo] cli: new no-print-url option 3 months ago

From Julien Floret to ~rjarry/dlrepo

The --print-url/--no-print-url options allow enabling or disabling the
printing of the target URL to stderr. Printing is on by default.
"--no-print-url" is useful in scripts, where we want actual errors to
pop in stderr, but not "URL:" lines.

Suggested-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Julien Floret <julien.floret@6wind.com>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 dlrepo-cli | 34 ++++++++++++++++++++++++++++------
 1 file changed, 28 insertions(+), 6 deletions(-)

diff --git a/dlrepo-cli b/dlrepo-cli
index 1396ba80993d..cd117b7e01cb 100755
[message trimmed]

[PATCH dlrepo] cli: print URL info to stderr 5 months ago

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]

[PATCH dlrepo] fs: allow disabling periodic cleanup 5 months ago

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]

[PATCH dlrepo] tag: add description 5 months ago

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]

[PATCH dlrepo] fmt: add content disposition header to redirection 11 months ago

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]

Re: Applied: [PATCH dlrepo 0/3] fmt: rework set/delete restrictions 1 year, 2 months ago

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>
>