fedora-infra / pkgdb2

Updated version of the Package Database
https://admin.fedoraproject.org/pkgdb/
GNU General Public License v2.0
23 stars 26 forks source link

namespace is not included in dead.package git urls #319

Closed apevec closed 8 years ago

apevec commented 8 years ago

namespace parameter was added in https://github.com/fedora-infra/pkgdb2/commit/08104fc65744593b08a3d1a48c18c44b3016c9f4 but def api_dead_package(pkg_name, clt_name)[1] doesn't use it and clicking "Retired" links fail with No dead.package file found in javascript popup.

[1] https://github.com/fedora-infra/pkgdb2/blob/master/pkgdb2/api/extras.py#L628

pypingou commented 8 years ago

Which package were you checking?

Because right now, since there is only one namespace in prod (rpms) and cgit should be backward compatible, this should have no impact.

apevec commented 8 years ago

e.g. https://admin.fedoraproject.org/pkgdb/package/rpms/openstack-nova/ but also others

Generated javascript has: var clt = $( this ).attr('data-clt'); var url = "/pkgdb/api/dead/package/openstack-nova/?namespace=rpms"; url = url + clt So actual URL ends up as /pkgdb/api/dead/package/openstack-nova/?namespace=rpmsmaster

pypingou commented 8 years ago

Looks like you found the bug, the correct url is: https://admin.fedoraproject.org/pkgdb/api/dead/package/openstack-nova/master?namespace=rpms

Is this something you would be interesting in fixing ?

apevec commented 8 years ago

So I had a look and it's unholy mix of flask and javascript! PR coming, tested locally w/ production dump.

pypingou commented 8 years ago

So I had a look and it's unholy mix of flask and javascript!

As in, you think we could improve on this or is this just an judgment call?

apevec commented 8 years ago

No, just general bitching, ignore me. I'm not frontend developer and I just don't like javascript.