~jfloret

Recent activity

[PATCH dlrepo 3/3] templates: add branch links to product page 2 months ago

From Julien Floret to ~rjarry/dlrepo

To ease navigation between the product page and the original job(s) in
/branches/, add a "Branch Link(s)" section to the bottom of the
product page (similar to the "Product Link" section at the bottom of
the job page).

The branch links are not displayed if the user does not have the
rights to access the job (typically, customers should have access to
/products/ but not to /branches/).

Signed-off-by: Julien Floret <julien.floret@6wind.com>
Acked-by: Thomas Faivre <thomas.faivre@6wind.com>
---
 dlrepo/templates/product_version.html | 14 ++++++++++++++
 dlrepo/views/product.py               | 10 ++++++++++
[message trimmed]

[PATCH dlrepo 2/3] job: detect product link conflicts 2 months ago

From Julien Floret to ~rjarry/dlrepo

Several jobs may be linked to the same product. For example,
we can have a job handling the generation of the binary packages (a
"bin" format), and another job handling the generation of the
documentation (a "doc" format) for the same product.

However, if some formats of the two jobs overlap (e.g. each job has a
"bin" format), the product format will point to the latest uploaded
job. This usually happens if there is a mistake in the declaration of
the product variant of one of the jobs.
However, since there is no error, the conflict can easily be missed.

To avoid this, when updating the symlinks, let symlink_to() throw an
exception if the link already exists. The dlrepo-cli "set-info"
command will then return an error and it will be easier to detect the
[message trimmed]

[PATCH dlrepo 1/3] job: rm redundant code in _link_to_product() 2 months ago

From Julien Floret to ~rjarry/dlrepo

The method iterates over the job formats to symlink each format into
the product folder. It then attempts to symlink the "container" format
explicitly. The latter is redundant since containers are already taken
care of in the loop.

Fixes: bd1c23893882 ("server: add filesystem api")
Signed-off-by: Julien Floret <julien.floret@6wind.com>
Acked-by: Thomas Faivre <thomas.faivre@6wind.com>
---
 dlrepo/fs/job.py | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/dlrepo/fs/job.py b/dlrepo/fs/job.py
index 662f52dde964..3790893909aa 100644
[message trimmed]

[PATCH dlrepo 0/3] product link enhancements 2 months ago

From Julien Floret to ~rjarry/dlrepo

This series brings a few enhancements to product links: code cleanup,
better conflict detection and easier navigation between product and
branch pages on the website.

Julien Floret (3):
  job: rm redundant code in _link_to_product()
  job: detect product link conflicts
  templates: add branch links to product page

 dlrepo/fs/job.py                      | 15 +++------------
 dlrepo/templates/product_version.html | 14 ++++++++++++++
 dlrepo/views/product.py               | 10 ++++++++++
 3 files changed, 27 insertions(+), 12 deletions(-)

[PATCH dlrepo] release: do not publish internal artifact formats 3 months ago

From Julien Floret to ~rjarry/dlrepo

Some artifact formats can be for internal use only and never meant to
be published (e.g. test reports, preconfigured VM snapshots...). It is
tedious and error-prone to have to systematically exclude them from
the customer ACLs on the public server. Furthermore, it can be a waste
of storage.

Reintroduce the notion of "internal" formats; these formats are
skipped when publishing a job.
Internal formats are filtered via the "DLREPO_INTERNAL_FORMAT_FILTER"
config option: all format names that match this regular expression are
considered internal. They are lined in red in the web UI to be easily
recognizable.

Note: these formats are not taken into account when calculating
[message trimmed]

Re: [PATCH dlrepo] container: fix pull with k8s containerd (fix) 7 months ago

From Julien Floret to ~rjarry/dlrepo

Le lun. 24 avr. 2023 à 11:59, Robin Jarry <robin@jarry.cc> a écrit :
>
> When responding to a HEAD request, path will be None and path.stat()
> will fail. This is my fault, I tried to be a smart ass and rework
> a patch from someone else before applying it.
>
> Avoid code duplication by adding a separate dict and update it when it
> is a HEAD request.
>
> Fixes: 2850e40638be ("container: fix pull with k8s containerd")
> Signed-off-by: Robin Jarry <robin@jarry.cc>

Acked-by: Julien Floret <julien.floret@6wind.com>

[PATCH dlrepo] container: fix pull with k8s containerd 7 months ago

From Julien Floret to ~rjarry/dlrepo

Fix this error when pulling an image with Kubernetes/containerd:

Failed to pull image "foo":
rpc error:
code = InvalidArgument
desc = failed to pull and unpack image "foo": unable to fetch descriptor
(sha256:badcafe) which reports content size of zero: invalid argument

This is incorrect, a successful HEAD request on the image manifest
should return the size of the manifest file in the Content-Length
header, as specified in the docker registry API documentation:

  The image manifest can be checked for existence with the following url:
  [...]
[message trimmed]

Re: [PATCH dlrepo v2 3/3] auth: define more fine-grained access rights 7 months ago

From Julien Floret to ~rjarry/dlrepo

Hi Robin,

Le lun. 10 avr. 2023 à 20:13, Robin Jarry <robin@jarry.cc> a écrit :
>
> Hey Julien,
>
> This looks good.
>
> Julien Floret, Apr 03, 2023 at 17:13:
> > @@ -317,15 +325,26 @@ def parse_group_acls() -> Dict[str, FrozenSet["ACL"]]:
> >                  if len(tokens) < 2:
> >                      continue
> >                  access, *args = tokens
> > -                if access not in ("ro", "rw"):

Re: [PATCH dlrepo 2/2] container: fix http return codes for blob upload 8 months ago

From Julien Floret to ~rjarry/dlrepo

Le sam. 1 avr. 2023 à 01:00, Robin Jarry <robin@jarry.cc> a écrit :
>
> Fix this error when pushing a tag with podman:
>
>  Error: writing blob: uploading layer to http://.../blobs/uploads/...:
>  received unexpected HTTP status: 204 No Content
>
> This is incorrect, that PUT request should return 201 created. docker
> seems to not care about the return codes. podman does.
>
> Also fix the return code for PATCH, DELETE and add the missing GET
> handler.
>

Re: [PATCH dlrepo 1/2] container: fix push/pull with podman 8 months ago

From Julien Floret to ~rjarry/dlrepo

Le sam. 1 avr. 2023 à 01:00, Robin Jarry <robin@jarry.cc> a écrit :
>
> podman uses the oci image formats. Make sure to handle them properly and
> return the correct content type with manifest responses.

Tested for non-regression with docker.

> Signed-off-by: Robin Jarry <robin@jarry.cc>

Acked-by: Julien Floret <julien.floret@6wind.com>