Skip to content

Add RPM repository and remote pages (upstream #370) with the fork's URL and save rules - #19

Merged
aevnsvi merged 16 commits into
mainfrom
ups-370-rpm
Nov 2, 2026
Merged

aevnsvi merged 16 commits into
mainfrom
ups-370-rpm

Conversation

@aevnsvi

@aevnsvi aevnsvi commented Nov 2, 2026

Copy link
Copy Markdown

What this changes

Takes the RPM repository and remote pages from the upstream pull request
pulp#370 and brings them to the rules the file and deb pages already
follow. Content of the upstream pull request taken: head commit
c27d50b2bc1542514063ef7d5b778970a5364c4d.

Upstream commits

11 of the 12 upstream commits are cherry-picked with -x: each keeps its upstream author and has a
"(cherry picked from commit ...)" line naming the upstream commit. Conflicts were resolved in favour
of the fork's existing code (the RPM distribution API file, and the plugin lookup table where the
RPM remote API was added). The upstream diff was read in full before anything was fetched or built:
it changes only TypeScript under src/ and the README, no dependency, lockfile, script, workflow or
config, and every request goes through the existing Pulp API wrapper.

The one commit that only touched the Cypress smoke tests is skipped, because the fork has no
Cypress; its assertions are ported to the Playwright smoke test (see below).

Commits added on top of the picks

  • Create RPM repositories through the shared create flow: autopublish is off by default and the form
    says what ticking it does; a new repository keeps every version; a distribution is created only
    when the box is ticked, after the name and base path were checked; a refused distribution is
    reported once and never retried under another name; a blank "versions kept per package" is sent as
    0 (keep all).
  • Offer the private flag only for ansible repositories: file, deb and rpm forms no longer show a
    field their serializer does not have.
  • Show served URLs on the RPM repository pages: every distribution serving the repository is listed
    with the base_url the server reports (never a URL built from the base path), a distribution with
    nothing to serve is marked "Not served", a failed load is shown instead of "None", and Details has
    one Autopublish row.
  • Check the RPM pages in the smoke run: the RPM repository and remote pages open and show the
    autopublish (unticked), retained package versions and download policy fields of the add forms.
  • Import RPM repository page code from specific files.

Delete, sync, revert and update for RPM keep the upstream behaviour for now.

How it is tested

  • npx vitest run src/containers/rpm-repository src/components/repository-form.test.tsx
    (request sequences of the create page, served URL, "Not served" and single Autopublish row,
    private only for ansible)
  • npm test && npm run lint:ts && npm run lint:e2e && npx prettier -l . && npx eslint src/ config/ e2e/ scripts/ && npx ls-lint && node scripts/check-public.mjs --all
  • CI smoke on the upstream Pulp image

nicholas.parente and others added 16 commits November 2, 2026 12:13
… hide Ansible-only private option

(cherry picked from commit 8dbc84c)
The RPM add page used its own save path: it published new repositories by
default, kept a single repository version, and on any distribution error
retried with a random numeric suffix, so a failed or conflicting create
could leave an unexpected, differently named distribution behind.

It now uses the same createRepository flow as the file and deb pages. A
new repository keeps every version and is not autopublished (the form
says what ticking the box does). A distribution is created only when the
box is ticked, after the name and base path were checked, and a refused
distribution is reported once and never retried under another name. A
blank "versions kept per package" is sent as 0, which keeps all versions.
The repository form showed "Make private" for file, deb and rpm
repositories too, although only the ansible serializer has that field.
Ticking it there sent a value the server ignores or refuses. The checkbox
is now rendered for ansible only. The tests also cover the RPM-only
autopublish checkbox starting unticked.
The RPM repository page built its URL from a distribution's base path and
showed a single guess, and the Distributions tab built every command line
the same way, so the page could show a URL the server does not serve. The
Details tab listed the Autopublish row twice.

The page now loads every distribution that serves the repository (bound
to it, to one of its publications or to one of its versions) and shows the
base_url the server reports for each. A distribution with nothing to serve
is marked "Not served", a failed load is shown instead of "None", the
Distributions tab lists the loaded distributions with a command line that
uses the server URL, and Details has one Autopublish row.
Open the RPM repository and remote pages against the throwaway Pulp and
look for the fields that only RPM has: autopublish (unticked on a new
repository), the retained package versions and the download policy.
The detail page and its Details and Distributions tabs imported through
the api, actions and utilities barrels, which the lint rules warn about
because a barrel pulls in unrelated modules. Import from the specific
files, as the file repository pages do.
@aevnsvi
aevnsvi merged commit cbf3654 into main Nov 2, 2026
6 checks passed
@aevnsvi
aevnsvi deleted the ups-370-rpm branch November 2, 2026 11:25
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