Skip to content

Allow to use Gitlab registry as index + Allow pypi to be used for dependency resolution#82

Merged
grische merged 5 commits into
python-morgan:mainfrom
RISEFX:gitlab-registry-as-index
Jul 17, 2026
Merged

Allow to use Gitlab registry as index + Allow pypi to be used for dependency resolution#82
grische merged 5 commits into
python-morgan:mainfrom
RISEFX:gitlab-registry-as-index

Conversation

@grische

@grische grische commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

This PR contains two distinct features:

PyPI for dependency resolution

This feature stops extracting and parsing the files from the local mirror, but instead uses PyPi's json API.
It is slower than local file parsing, but a lot less error-prone as the PyPi package parsing is very mature and constantly tested and verified.

GitLab registry as index

This feature uses a Gitlab registry as a target registry instead of relying on a local file system structure.
It checks which packages are already present in the Gitlab registry and only fetches those that are still missing. All the missing packages can then be uploaded by tools like, e.g. twine after Morgan has finished mirroring.

As Gitlab doesn't have PyPi's json API to obtain package dependencies and fetching all files from the Gitlab registry is very expensive on larger registries, this feature only makes sense together with PyPi as a dependency resolution.

As this is a major feature, we also provide extensive tests for both the local-file registry as well as the Gitlab registry.

@grische

grische commented Feb 10, 2026

Copy link
Copy Markdown
Contributor Author

If you prefer, I can also split this PR into two if this helps reviewing.

@grische
grische force-pushed the gitlab-registry-as-index branch from b6a38fa to 3297da7 Compare February 10, 2026 18:30
@grische
grische force-pushed the gitlab-registry-as-index branch 3 times, most recently from 0bb69bd to db51777 Compare July 3, 2026 13:57
Comment thread morgan/__init__.py Outdated
Comment thread morgan/__init__.py Outdated
Comment thread morgan/__init__.py
Comment thread morgan/__init__.py Outdated
Comment thread morgan/__init__.py Outdated
Comment thread morgan/__init__.py Outdated
Comment thread morgan/metadata.py
Comment thread morgan/metadata.py
Comment thread morgan/registry.py
Comment thread morgan/registry.py
@grische
grische force-pushed the gitlab-registry-as-index branch from db51777 to 3fa81eb Compare July 10, 2026 16:23
grische added 2 commits July 16, 2026 10:11
Refactor the code such that it is easier to expand the code for
alternative target repositories.
@grische
grische force-pushed the gitlab-registry-as-index branch from 3fa81eb to 067b0c3 Compare July 16, 2026 08:11
@grische
grische force-pushed the gitlab-registry-as-index branch from 067b0c3 to 4656fff Compare July 16, 2026 08:25

@philnewm philnewm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good now

@grische
grische merged commit 75a092e into python-morgan:main Jul 17, 2026
10 checks passed
@grische
grische deleted the gitlab-registry-as-index branch July 17, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants