Skip to content

Support proxy registries for each package type #21223

@OverkillGuy

Description

@OverkillGuy

Feature Description

Spinning off #19270 (comment) into its own ticket as recommended

I wish Gitea supported "remote", or "proxy" repositories.

These are package repositories that proxy an external source of packages, hence configured with proxy URL, but are otherwise same as local package repositories, as they can be pulled from as usual.

Example: A local Pypi.org proxy. Local build system would be configured to use both the private package registry for "internal" (private) packages, but now fetching dependencies on Pypi.org through local Gitea too.

Advantages:

  • Shorter round-trip to fetch packages = faster build times
  • Improved auditability of dependencies (one place for all $internet_stuff)
  • Offline-able build systems helps with disaster recovery, privacy...
  • Mitigate bad/rogue updates by having solid cacheing

This feature in Docker repositories would remove any need for Dockerhub ECR mirror, which many have to set up to avoid Dockerhub's recent rate-limiting.

The canonical example of the feature is in JFrog's Artifactory.

Effectively, Gitea would, for these proxy repositories, become a local package cache. The biggest technical decision is about when to invalidate cache (docker image's "latest" tag moves pretty quickly, but if you already have a local copy, do you serve it as-is? even if you got it 2 years ago?)

Pushing this feature to its extreme, Artifactory provides Virtual Repositories that aggregate both remote (public proxies) and local (private to org) repositories into one place.

I understand this feature can be a big investment, and acknowledge that there may be no particular need for it. I mostly envy the feature, and wish for Gitea to succeed by out-executing Artifactory, given the new Package Registry is already encroaching on that a bit.

Screenshots

Artifactory remote repository
Artifactory cache advanced settings

Activity

added
type/featureCompletely new functionality. Can only be merged if feature freeze is not active.
type/proposalThe new feature has not been accepted yet but needs to be discussed first.
on Sep 20, 2022
OverkillGuy

OverkillGuy commented on Sep 20, 2022

@OverkillGuy
Author

Suggesting applying the label theme/package-registry, but I can't apply that on my own.

lunny

lunny commented on Mar 22, 2023

@lunny
Member

About what should the proxy looks like. A proxy package should have the same url and database structures as an original one but with a mirror column just like repositories and mirror repositories. So this package is readonly from user and there is an internal time to fetch from remote?

springeye

springeye commented on Apr 19, 2023

@springeye
kvaster

kvaster commented on May 28, 2023

@kvaster
Contributor

Also proxy should cache data from remote. That way you may be sure you'll be able to build your project even if data is reomved from remote.

yekanchi

yekanchi commented on Jul 10, 2023

@yekanchi

is this going to be something like Sonatype-Nexus or JFrog-Artifactory?

TimberBro

TimberBro commented on Sep 9, 2023

@TimberBro
Contributor

A proxy package should have the same url and database structures as an original one but with a mirror column just like repositories and mirror repositories.

Wouldn't it be superfluous to keep a link to a remote repository for each package?

@lunny How do you feel about the idea of having mirror settings at the organization level?
As example, for any type of registry, the owner can check whether the registry is a mirror or not and if it is, the owner can set the remote-URL.

yekanchi

yekanchi commented on Sep 10, 2023

@yekanchi

A proxy package should have the same url and database structures as an original one but with a mirror column just like repositories and mirror repositories.

Wouldn't it be superfluous to keep a link to a remote repository for each package?

@lunny How do you feel about the idea of having mirror settings at the organization level? As example, for any type of registry, the owner can check whether the registry is a mirror or not and if it is, the owner can set the remote-URL.

I think we can merge both.

  • packages could be uploaded locally without upstream source (as is now)
  • if any package or package version is requested and there is no file for the specified version the upstream sources will be checked.

So there is no need to specify upstream source for every pacakge/

PatrickHuetter

PatrickHuetter commented on Oct 1, 2023

@PatrickHuetter

This feature would be awesome. We are running a nexus repository server since a few years and migrated from gitlab to gitea. With this feature we could also get rid of the nexus and have a more all in one experience in our development tasks.

8 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic/packagestype/featureCompletely new functionality. Can only be merged if feature freeze is not active.type/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @lunny@techknowlogick@kvaster@KarenArzumanyan@PatrickHuetter

        Issue actions

          Support proxy registries for each package type Β· Issue #21223 Β· go-gitea/gitea