Repository navigation
Add RPM repository and remote pages to Match DEB and FILE - #370
Nparente27 wants to merge 12 commits into
Conversation
… hide Ansible-only private option
|
Hi @Nparente27, thanks for this! We merged a stricter CI pipeline after you opened the PR, so I'm closing and reopening it to run your changes against the new checks. You don't need to do anything yet. If anything fails that isn't caused by your changes, I'll sort it out separately. If something does come from this PR, I'll point it out and help. |
Add RPM repository and remote pages (upstream pulp#370) with the fork's URL and save rules
Redtigercod4
left a comment
There was a problem hiding this comment.
Thanks for this. I've been through the PR and left comments inline. Please take a look at them and let me know if you need anything more from me.
I would recommend going through and seeing if there are any files that can be made generic and reused instead of duplicating them.
| )} | ||
| {plugin !== 'rpm' && | ||
| formGroup( | ||
| // putting the plugin check here because private repositories |
There was a problem hiding this comment.
WOULD: Not blocking but could we tidy up this comment?
It says Ansible is the only plugin that needs private, but the condition is plugin !== rpm, so FILE and DEB still get the checkbox. The comment and the code don't agree.
| // putting the plugin check here because private repositories | |
| // NOTE: 'private' is a pulp_ansible field. It is not a concept in RPM repositories. | |
| // TODO(#GH_ISSUE_NO): confirm whether FILE and DEB repositories support it, and if not limit this to ansible. |
| ), | ||
| }, | ||
| { | ||
| label: t`Autopublish`, |
There was a problem hiding this comment.
MUST: autopublish is listed twice here, so it shows up twice on the details tab.
| export { fileRepositoryDeleteAction } from './file-repository-delete'; | ||
| export { fileRepositoryEditAction } from './file-repository-edit'; | ||
| export { fileRepositorySyncAction } from './file-repository-sync'; | ||
| export { rpmRemoteCreateAction } from './rpm-remote-create'; |
There was a problem hiding this comment.
COULD: Please don't re-export the RPM actions from this barrel instead please import them from their own modules in the containers.
Re-exporting here pulls the new actions into a new 3 cyclic dependency tree and will cause future issues building the application.
| export { RoleAPI } from './role'; | ||
| export { RPMPackageAPI } from './rpm-package'; | ||
| export { RPMRepositoryAPI } from './rpm-repository'; | ||
| export { RPMDistributionAPI } from './rpm-distribution'; |
There was a problem hiding this comment.
COULD: Same principles. Linked to https://github.com/pulp/pulp-ui/pull/370/changes#r4566248959
| actionContext: object; | ||
| } | ||
|
|
||
| const MaybeCode = ({ code, filename }: { code: string; filename: string }) => |
There was a problem hiding this comment.
SHOULD: MaybeCode is an identical copy of the one in file-remote/tab-details.tsx and two other places. Could we move it into a shared location so that it can be reused across the other implementations?
| export { default as EditRole } from './role-management/role-edit'; | ||
| export { default as RoleList } from './role-management/role-list'; | ||
| export { default as RPMPackageList } from './rpm/package-list'; | ||
| export { default as RPMRemoteDetail } from './rpm-remote/detail'; |
There was a problem hiding this comment.
COULD: Same principles. Linked to https://github.com/pulp/pulp-ui/pull/370/changes#r4566248959
| { name, pulp_href, pulpId }, | ||
| { addAlert, setState, listQuery }, | ||
| ) { | ||
| const distributionsToDelete = await listDistributions(pulp_href).catch( |
There was a problem hiding this comment.
SHOULD: If listing the distributions fails, the repository is still deleted, and the repository and distribution deleted run concurrently. Could we abort when the lookup fails, and delete the distributions first?
Updated PulpUI to include more functionality for RPMs. I tried to match as much as I could the functionality of DEB and FILE packages. There's a line: const PLUGINS_WITH_POLICY = ['rpm']; that I only included RPM on because DEB and FILE are outside the scope of the PR, but this can be easily added in another branch.
This was developed with assistance of an AI, specifically Claude. The scope, design, and testing was human-reviewed and tested using a local Pulp instance.