Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sigstore and SBOM documentation under /download/* broken #2387

Closed
sethmlarson opened this issue Feb 27, 2024 · 8 comments
Closed

Sigstore and SBOM documentation under /download/* broken #2387

sethmlarson opened this issue Feb 27, 2024 · 8 comments
Labels
backend Relates to the backend of the app

Comments

@sethmlarson
Copy link
Contributor

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

@ewdurbin
Copy link
Member

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

@hugovk
Copy link
Member

hugovk commented Sep 1, 2024

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?

@JacobCoffee JacobCoffee added the backend Relates to the backend of the app label Sep 13, 2024
@JacobCoffee
Copy link
Member

@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

@ewdurbin
Copy link
Member

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

@sethmlarson
Copy link
Contributor Author

@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?

@ewdurbin
Copy link
Member

ewdurbin commented Sep 16, 2024

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 ?

@sethmlarson
Copy link
Contributor Author

@ewdurbin Those routes work for me! Thanks :)

@ewdurbin
Copy link
Member

All set!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Relates to the backend of the app
Projects
None yet
Development

No branches or pull requests

4 participants