pythondotorg icon indicating copy to clipboard operation
pythondotorg copied to clipboard

Sigstore and SBOM documentation under /download/* broken

Open sethmlarson opened this issue 1 year ago • 1 comments

I believe these CMS pages (/download/sbom and /download/sigstore) were made unavailable by the added redirect rules.

sethmlarson avatar Feb 27 '24 15:02 sethmlarson

Can the pages be moved under /downloads/? It seems for whatever reason that was the "chosen" name at some point in favor of /download/

ewdurbin avatar Feb 28 '24 00:02 ewdurbin

https://www.python.org/download/sbom/ and https://www.python.org/download/sigstore/ are currently working.

Do they still need moving under /downloads/ or can this issue be closed?

hugovk avatar Sep 01 '24 21:09 hugovk

@ewdurbin Do we need to add specific redirects for these like

location ~ ^/download/sbom/$ {
	return 301 https://www.python.org/downloads/sbom/;
}

location ~ ^/download/sigstore/$ {
	return 301 https://www.python.org/downloads/sigstore/;
}

I tried changing the page path in admin but then the old URL 404'd (expected) but the new one 500'd... i was figuring it was due to NGINX mess

JacobCoffee avatar Sep 13 '24 17:09 JacobCoffee

@sethmlarson do you have a preference on the way this is resolved?

ewdurbin avatar Sep 16 '24 13:09 ewdurbin

@ewdurbin I think in a perfect world we end up with everything under /downloads/ and redirect the old URLs to the new? I don't know how the CMS interacts with the pythondotorg backend, though, does one take precedence over the other?

sethmlarson avatar Sep 16 '24 13:09 sethmlarson

I don't think specific nginx redirects are necessary since they can be added in the redirects app. But I was able to reproduce the 500 locally by temporarily setting DEBUG=False in pydotorg/settings/local.py.

Seems it has something to do with the url_name context processor and a conflict when resolving the page urls.

/downloads/sbom and /downloads/sigstore conflict with the download_os_list url config and instigates this bug.

One expedient option would be to rename the pages as /downloads/metadata/sbom and /downloads/metadata/sigstore. Are those acceptable @sethmlarson ?

ewdurbin avatar Sep 16 '24 14:09 ewdurbin

@ewdurbin Those routes work for me! Thanks :)

sethmlarson avatar Sep 16 '24 15:09 sethmlarson

All set!

ewdurbin avatar Sep 16 '24 15:09 ewdurbin