-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Improve redirects feature #4221
Comments
Some things have changed since this issue was created. I think it's a good moment to revive this conversation. The most important decision to make, IMHO, is the scope of the redirects: project vs. version. I'd vote to have everything in the config file and de-prioritize any web UI for this work. I do see these options we could implement redirects on YAML file:
|
Yea, I think we can follow a similar approach here, where we can have project-level redirects defined, and we use the |
Ahoy! This would be great for pip, and anything to have these redirects allowed at the "root" level would be ideal. We'd like to start using this for things like error messages and survey links, to make them easier to reference and to have them look more official. This is especially useful for things like https://pip.pypa.io/surveys/backtracking, which are really nice. :) |
@pradyunsg I don't think you need it in the config file for this? You could set it up on the RTD admin. I'm 👍 on doing more around redirects tho. |
We've got those configured in the admin pages (that's why that link works 😉). It'd be nice to have this be something that we can have under version control and accept PRs for (like a config file)! That'll help make it easier for contributors to help add to this, and all the advantages that come with that. :) |
I just noticed that I didn't make a note of why I brought this up again: I'm doing a rewrite of pip's documentation basically, and this would help make that easier to review for folks + to roll out those changes. Additionally (as I mentioned) we're starting to use this for "official links" in tweets / error messages etc. That means that the project-owners become the blockers for contributors' PRs that need things like this which... isn't ideal? (One of our contributors even filed a PR for trying to add a page with a client-side redirect, because none of us had come around to doing this on the server side: pypa/pip#9680). |
Okay, so... as it turns out, I'm very interested in this. What can I do to help move this forward? |
@pradyunsg The big questions are around how to make the UX make sense. What are project-level vs. version-level redirects, how do we handle them both, etc. I think in the past we've had |
Just a note: while we're figuring out how to best make this a native feature, there are a few options for authors here:
|
We had a lot more discussion about this here: #9188 -- I think we can probably close this as a dupe, but not 100% sure they are solving the same things. |
Yeah one of these should be closed probably. I believe we landed on not implementing this in the config file, at least to start. |
Thanks for the confirmation on that @agjohnson! I've ended up implementing this via a script for pip in that case; that uses the RTD API. :) https://github.com/pypa/pip/blob/main/.readthedocs-custom-redirects.yml |
Some related issues:
Eric also mentioned having a way to have more specific redirects per domain, I like how CF does this (*.rtd.com/, */foo). Haven't thought much about how we will be able to support these, but at least matching things per-domain could work. |
Yea, I think #9614 is part of what we hit when migrating EA domains. It would be nice to be able to apply a redirect to a domain without it effecting all domains (like PR builds), so that you can redirect an old domain cleanly. For EA, we wanted a |
We brought up the idea of using our YAML file for redirects. There are a number of problems with this though, as well as many existing problems.
Current problems:
If the application is down, redirects don't workUpdate: still technically true, but the application has been super solidIf we wanted to make a Azure storage hosted version, we don't have an application or ngnix to fall back on for redirectsUpdate: Proxito is the layer in front of S3 storage now, and applies hosting 🪄 up frontNew problems:
Making per-version redirect model is okay, as we can update the database per-version on build, but the point above about azure redirects is valid still.No it's not!A more current description of where this work is:
The text was updated successfully, but these errors were encountered: