pulp_rpm icon indicating copy to clipboard operation
pulp_rpm copied to clipboard

RPM Package API endpoint breaks Firefox

Open josephtate opened this issue 10 months ago • 4 comments

Version pulpcore 3.69.0 pulp_rpm 3.27.2

Describe the bug I have only 5000+ packages (but this doesn't matter). If one of the packages is the kernel (or another with lots of files and/or changelog entries) the page doesn't render, and firefox prompts to stop the page after a few minutes.

To Reproduce Import or mirror an EL kernel. Then open a package list displaying that kernel in Firefox. Even just the kernel-doc package causes the behavior. It breaks firefox even with limit=1.

Expected behavior Quite simply, there is too much data in the list data. I see that the PackageViewSet has a minimal serializer, which should be used instead of the full seralizer for "list" operations. Reserve the full data set for "show".

josephtate avatar Mar 07 '25 19:03 josephtate

Ok, I see how I the user can use the minimal serializer by passing minimal=True to the API endpoint, but should it not be default? In general list operations should be minimal in my opinion, with an option to get full details instead of the other way around.

josephtate avatar Mar 07 '25 19:03 josephtate

It's not the default for any current content type, and in any case it would be impossible to change the default now without breaking the API. Maybe for Pulp 4?

dralley avatar Mar 31 '25 19:03 dralley

Maybe this could be the default for browser clients? Changing the behavior for browsers shouldn't break scripts.

pedro-psb avatar Apr 01 '25 19:04 pedro-psb

I really don't love the idea of switching representations based on user agents.

dralley avatar Apr 10 '25 13:04 dralley