Skip to content

Add deb repository and remote pages - #347

Open
warisshaikh1 wants to merge 1 commit into
pulp:mainfrom
warisshaikh1:deb-repositories-and-remotes
Open

Add deb repository and remote pages#347
warisshaikh1 wants to merge 1 commit into
pulp:mainfrom
warisshaikh1:deb-repositories-and-remotes

Conversation

@warisshaikh1

@warisshaikh1 warisshaikh1 commented Aug 28, 2026

Copy link
Copy Markdown

Addresses part of #277 (deb in the side menu).

Draft on purpose — I asked three scoping questions in #277 and haven't heard back yet. This is here so there's something concrete to react to rather than to pre-empt the answers. Happy to cut it down, extend it, or restructure it entirely.

What this adds

A Pulp deb menu section gated on hasPlugin('deb'), with Repositories and Remotes, mirroring Pulp file:

list detail edit tabs
remotes/deb/apt yes yes yes details
repositories/deb/apt yes yes yes details, versions, distributions

What it deliberately leaves out

  • Publications. deb has two publication endpoints rather than a field: publications/deb/apt generates fresh metadata and needs a signing service to be consumable, while publications/deb/verbatim republishes upstream's Release/InRelease byte for byte so an ordinary ubuntu-archive-keyring verifies it. A publications tab has to either show both or ask which to create, which is a design decision rather than wiring, so it seemed better to agree it first.
  • Content browsing. content/deb/packages is the useful one, but there are a dozen deb content endpoints where rpm has one. Easy follow-up once the shape here is agreed.

The one place deb genuinely differs from file

RemoteForm needed the APT fields, which have no equivalent elsewhere: distributions (suites), components, architectures, gpgkey, and the sync_sources / sync_udebs / sync_installer switches.

distributions is required, for deb only. Every other plugin's remote needs just a URL; pulp_deb rejects one without suites:

POST /pulp/api/v3/remotes/deb/apt/
{"name":"x","url":"http://deb.debian.org/debian/","tls_validation":true,"download_concurrency":10}
-> 400 {"distributions": ["This field is required."]}

So requiredFields becomes conditional. gpgkey reuses the FileUpload treatment ca_cert and client_cert already get, since it's an armoured key file rather than a one-line value.

Everything else is registry entries — plugin2api, the plugin unions on LazyRepositories / LazyDistributions / RepositoryForm, and deb-only optional fields on the shared RemoteType. All additive; ansible, container and file behaviour is unchanged (the RemoteForm diff is worth a look on that point specifically).

Testing

Verified against a live pulpcore 3.116.0 / pulp_deb 3.10.0 mirroring Ubuntu noble, with the dev server proxied at it (API_PROXY):

  • every query the new pages issue returns 200 — remote and repository lists with ordering / name__icontains / pulp_label_select / remote filters, …/versions/, …/versions/?number=N, and distributions/deb/apt/?repository=<href>
  • the exact create payload DebRemoteEdit sends → 201; the smartUpdate PUT with all APT fields → 202, and the fields read back verbatim
  • the repository create plus auto-created distribution path → 201 / 202, and pluginRepositoryBasePath('deb', …) resolves the base_path the Repository URL field shows
  • test objects cleaned up afterwards, existing content untouched

npm run lint:js, lint:ts, lint:ls, the this-without-class check and npm run build are all clean (build warnings unchanged at 18, all pre-existing bundle-size ones). No CHANGES.md entry, since that's generated from PR titles at release.

Two things I'd flag for review

  1. A third copy of SyncModal. ansible-repository-sync.tsx and file-repository-sync.tsx already carry identical copies and I've followed suit rather than refactoring inside a feature PR. Happy to extract all three into a shared component, here or separately, if you'd prefer.
  2. mirror defaults to true in the sync modal, matching the other plugins, though pulp_deb's own API default is false. I kept UI consistency, but say the word and I'll flip it — mirroring is the destructive direction.

@bmbouter @himdel @dkliban @ipanova

Adds a "Pulp deb" menu section with Repositories and Remotes, mirroring
the structure of Pulp file: list, detail and edit for each, plus the
versions and distributions tabs on a repository.

Deliberately scoped to repositories and remotes. Publications are left
out because deb has two publication endpoints rather than a field --
publications/deb/apt generates fresh metadata and needs a signing
service, publications/deb/verbatim republishes upstream's Release byte
for byte -- so a publications tab needs a design decision rather than
just wiring. Content browsing is left out for the same reason: deb has
a dozen content endpoints where rpm has one.

RemoteForm gains the APT fields, which have no equivalent in the other
plugins: distributions (suites), components, architectures, gpgkey, and
the sync_sources/sync_udebs/sync_installer switches. `distributions` is
added to requiredFields for deb only -- pulp_deb answers a remote
without it with "This field is required.", unlike every other plugin
where url alone is enough. gpgkey reuses the FileUpload treatment the
certificate fields already use, since it is an armoured key file.

The remaining changes are registry entries: plugin2api, the plugin
unions on LazyRepositories/LazyDistributions/RepositoryForm, and the
deb-only fields on the shared RemoteType. All are additive; ansible,
container and file behaviour is unchanged.

Refs pulp#277
@warisshaikh1
warisshaikh1 marked this pull request as ready for review September 1, 2026 09:51
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.

1 participant