Repository navigation
Add Python repository, remote and package pages (upstream #371) with the fork's URL and save rules - #20
Merged
Conversation
(cherry picked from commit 9c36ec9)
(cherry picked from commit 3cbb89e)
(cherry picked from commit 141d3da)
(cherry picked from commit 51e4474)
(cherry picked from commit dd0fd10)
(cherry picked from commit b0e7139)
(cherry picked from commit 432f691)
(cherry picked from commit dde91d0)
pulp_python distributions serve the repository directly, so a repository-bound Python distribution is served without a publication and no publication endpoint is scanned for it.
A new Python repository keeps every version, offers a distribution only when the box is ticked, checks the name and base path before writing, and reports a refused distribution once instead of retrying it under another name.
The detail page and its tabs list every distribution serving the repository with the URL the server reports instead of a URL built from a base path, and say why when the distributions could not be loaded.
The column sent one repository lookup per package row, and Pulp has no filter that answers it for a whole page. A repository's own Packages tab lists the packages it holds.
A new Python remote starts on the on demand policy, the form offers all three policies, and an existing remote keeps the policy it has. Includes and excludes are sent trimmed, without blank lines and in the order typed, and a cleared field is sent as an empty list.
The smoke run opens the Python repository, remote and package pages and looks for the substitution, reject, includes, excludes, keep latest, package type and download policy fields.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Takes the Python repository, remote and package pages from the upstream pull request
pulp#371 and brings them to the rules the file, deb and rpm pages
already follow. Content of the upstream pull request taken: head commit
dde91d0078d7ec8d5c1753df6dea1ce284a3e80d. It sits on top of the RPM pages (upstream pulp#370, alreadyon main).
Upstream commits
8 of the 10 upstream commits are cherry-picked with
-x: each keeps its upstream author and has a"(cherry picked from commit ...)" line naming the upstream commit. The upstream diff was read in
full before anything was fetched or built: it changes only TypeScript under
src/, the README andthe Cypress smoke file, no dependency, lockfile, script, workflow or config, and every request goes
through the existing Pulp API wrapper.
Conflicts with the RPM pages and the fork's code were resolved by merging both sides:
block and the Python fields block both stay
Two commits are not in the history: the one that only touched the Cypress smoke tests (the fork has
no Cypress; its assertions are ported to the Playwright smoke test below) and the one that hides the
ansible-only private option for Python, which became empty because the fork already limits that
field to ansible repositories.
Commits added on top of the picks
repository directly, so no publication is needed to count as served.
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.
listed with the URL the server reports instead of one built from a base path, the pip line uses it,
and a failed load is shown instead of "None".
remote keeps its policy. Includes and excludes are sent trimmed, without blank lines and in the
order typed; a cleared field is sent as an empty list.
Delete, sync, revert and update for Python keep the upstream behaviour for now.
How it is tested
npx vitest run src/containers/python-repository src/containers/python-remote src/containers/python src/utilities(request sequences of the create page, served URLs, no repository request from the package list,
policy default and the includes and excludes bodies)
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