Too eagerly redirecting to latest stable index page
- If I want to access Dart 3.1.5 API docs, I can use https://api.dart.dev/stable/3.1.5/index.html, but https://api.dart.dev/stable/3.1.5 doesn't work.
- If I want to access the
index.json(search index) of a specific channel, such as the for the current beta, I can't do https://api.dart.dev/beta/index.json as it redirects to the latest stable index page. I'd expect it to redirect to https://api.dart.dev/beta/3.3.0-174.3.beta/index.json
\cc @sortie
Yeah I can reproduce these bugs. Looking at the source, they don't appear to be new breakages caused by my recentish changes. As such, I won't treat it as a super important breakage and delay fixing these problems to the new year. It doesn't help that redirector.py is messy and hard to understand and correctly modify. :)
Like, I don't see any unit tests on this thing. It makes it risky to make changes especially since there's a production freeze going on.
As such, I won't treat it as a super important breakage and delay fixing these problems to the new year.
Thanks for checking in to this! No need to prioritize this then, even in the new year, I just wanted to make sure this was tracked.
Like, I don't see any unit tests on this thing. It makes it risky to make changes especially since there's a production freeze going on.
Yeah it's part of the reason I didn't just open a PR right away...It's in a pretty confusing state.
Rather than trying to make improvements and fixes, I keep thinking to ignore a bunch of the legacy handling and switch to some new setup, especially since app engine is planning to phase out Python 2.7 support. Anything new is quite hard for me to set up outside of Google though, but I'd be happy to help with any work in that area!
I tried fixing this, but honestly, the lack of testing made it really difficult and the code is really hard to understand.
Meanwhile the Python 2.7 apocalypse is on us. We're currently working towards replacing the project entirely with a new implementation using modern technologies. For now, let's just live with these older bugs.
The Python 2.7 apocalypse. The less-scary follow up to the Javapocalypse of 2013 😆
https://www.youtube.com/watch?v=E3418SeWZfQ
We're currently working towards replacing the project entirely with a new implementation using modern technologies.
I think that makes a lot of sense and is definitely a better use of time. I'll keep this open so I don't forget to verify the behavior in the future, but feel free to close.
If you have a chance, I'd be curious what setup you're exploring?
Basically we're thinking of having a cloud load balancer cache the contents right out of the storage bucket. We'll have to deal with the redirect logic somehow, maybe by deprecating it, or serving html http equiv refresh tokens, or by duplicating files with multiple paths.