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

Proxito: deprecate serving README.html by default #9993

Closed
humitos opened this issue Feb 7, 2023 · 5 comments
Closed

Proxito: deprecate serving README.html by default #9993

humitos opened this issue Feb 7, 2023 · 5 comments
Assignees
Labels
Needed: design decision A core team decision is required

Comments

@humitos
Copy link
Member

humitos commented Feb 7, 2023

We are currently serving /README.html and <path>/README.html in

# First, check for dirhtml with slash
for tryfile in ("index.html", "README.html"):
storage_filename_path = build_media_storage.join(
storage_root_path,
f"{filename}/{tryfile}".lstrip("/"),
)
log.debug("Trying index filename.")
if build_media_storage.exists(storage_filename_path):
log.info("Redirecting to index file.")
# Use urlparse so that we maintain GET args in our redirect
parts = urlparse(proxito_path)
if tryfile == "README.html":
new_path = parts.path.rstrip("/") + f"/{tryfile}"
else:
new_path = parts.path.rstrip("/") + "/"
# `proxito_path` doesn't include query params.`
query = urlparse(request.get_full_path()).query
new_parts = parts._replace(
path=new_path,
query=query,
)
redirect_url = new_parts.geturl()
# TODO: decide if we need to check for infinite redirect here
# (from URL == to URL)
return HttpResponseRedirect(redirect_url)

This is not a standard behavior and we have it there because of pretty old compatibility reasons. I'd like to deprecate this and remove this "feature" if possible. As a first step, I added the tryfile= argument in the log line in #9983 to start tracking this and check how many projects are using this non-standard hosting feature. We can then check this via New Relic, analyze and decide what to do.

@humitos humitos added the Needed: design decision A core team decision is required label Feb 7, 2023
@stsewd
Copy link
Member

stsewd commented Mar 20, 2023

We have 340 projects in .org and 1 in .com relying on this https://onenr.io/0BQ1Gv2BMRx

@agjohnson
Copy link
Contributor

Count has gone down in the last year: 239

https://onenr.io/0BR6Zzk5GRO

@humitos humitos self-assigned this May 21, 2024
@humitos
Copy link
Member Author

humitos commented May 23, 2024

Cool. I checked this today and we have 227.

humitos added a commit to readthedocs/website that referenced this issue May 23, 2024
@humitos humitos moved this from Planned to In progress in 📍Roadmap May 23, 2024
humitos added a commit that referenced this issue May 23, 2024
humitos added a commit that referenced this issue May 23, 2024
@humitos humitos moved this from In progress to Needs review in 📍Roadmap May 23, 2024
humitos added a commit to readthedocs/website that referenced this issue May 27, 2024
* Post: redirecting `/` to `README.html` deprecation

Related readthedocs/readthedocs.org#9993

* Small change

* Add tip

* Send email on Tuesday

* Update content/posts/readme-html-deprecated.md

Co-authored-by: Eric Holscher <[email protected]>

---------

Co-authored-by: Eric Holscher <[email protected]>
@humitos
Copy link
Member Author

humitos commented May 28, 2024

Email sent today.

humitos added a commit that referenced this issue May 29, 2024
* Proxito: browndate for redirecting `/` to `README.html`

Related #9993

* Rename function to make it clearer

* Keep indexing README.html for now

* Update logic to take into account enforce brownout setting
@humitos
Copy link
Member Author

humitos commented May 29, 2024

Work done in #11348

@humitos humitos closed this as completed May 29, 2024
@github-project-automation github-project-automation bot moved this from Needs review to Done in 📍Roadmap May 29, 2024
humitos added a commit that referenced this issue Jul 1, 2024
humitos added a commit that referenced this issue Jul 11, 2024
* Proxito: remove redirect for `README.html` files

Fully removal after deprecation and browndates.

Reference:
* #9993
* #11348
* https://about.readthedocs.com/blog/2024/05/readme-html-deprecated/

* Simplify the logic for tryfiles on El Proxito

* Add missing case

* Remove README from the docstring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needed: design decision A core team decision is required
Projects
Archived in project
Development

No branches or pull requests

3 participants