pulp / pulp/pulp_deb

allow fetching obsolete artifacts from snapshot.debian.org

Open
#382 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

.feature Looking_for_Contributor
Dominant language
Python
Stars
71
Forks
91
Avg merge
1d 19h
Merged PRs (30d)
22

Description

Author: evgeni (evgeni)

Redmine Issue: 4866, https://pulp.plan.io/issues/4866


Debian removes old versions of packages that have been updated from their mirrors. Because of that using lazy sync against official Debian mirrors might end up with incomplete repos when Pulp syncs metadata on day 1, on day 2 a package gets updated/replaced and on day 3 pulp tries to actually get that package.

Debian offers a snapshot service at https://snapshot.debian.org/, where you can get almost every file ever seen in the Debian archive by accessing https://snapshot.debian.org/file/HASH (where HASH is currently the SHA1 hash of the file). The API docs of snapshot can be found at https://salsa.debian.org/snapshot-team/snapshot/raw/master/API

The idea would be to allow a secondary source in pulp_deb that is tried when the primary mirror replied with a 404.

This is probably also useful for other backends, not just Debian.

Snapshot currently only supports sha1 hashes, but the authors promised to accept patches for sha256 if anyone would write one (the source of the service is in the same repo as the api doc linked above).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the pulp_deb lazy-sync path and review the snapshot.debian.org API documentation linked in the issue. Define how a secondary source should be configured and used after a primary mirror returns 404, then verify that obsolete Debian artifacts can be fetched without breaking normal mirror retrieval.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.