-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
I2D: Deprecate "-latest" Binaries #36749
Comments
I'd suggest an intermediate step - new components will not allow |
For approval, I'd like to see some explicitly recommended metric for "usage is low enough". Given that we'd be breaking existing pages with usage, I would only approve it was extremely low. For example, fewer than 1 in 1,000 documents which include that particular component. |
Added this as another step in the deprecation plan.
Sure, added. I'm actually ok with keeping it forever, as long as its pinned to its current version. |
First Approval |
Approved with the removal of step 5. |
Summary of design review feedback:
|
Approved now that step 5 has been removed. Edit: Chatted offline with @samouri to clarify step 4 and to see if there is a way to implement it without special-casing 0.1 components. He will update with a potentially simpler approach. |
Much of this has been completed in #36889. |
By removing the We need a new canonical source where we can easily read the latest stable version that can be used for auto-extension importing. Or else, we need an easily way to see which extension versions are experimental. (Even experimental extensions can be valid, so the validator spec isn't suitable.) |
What is the expectation of AutoImporter:
If the former, then the desire for "latest non-experimental" version makes sense! If the latter, then the concept itself seems like a mistake. Major version bumps are expected to have breaking changes which could easily break all documents depending on the importer to function. |
It could be either of those two cases, depending on how the Optimizer is being used in the application. The In the context of the AMP plugin for WordPress, the auto-extension importing is tied to plugin version. So if a component version is going to bump from So yeah, if we had a standard reference for which component versions were experimental, we'd be able to avoid ever using those versions when we have to automatically import an extension. |
Another use case that has its own set of challenges is that we want to work on automatically replacing slow components (like a popular React slider known to be bad for performance) with more performant (Bento) AMP components as part of the Page Experience Engine. In this case, we'd always want to stick with the latest stable version, but have the generated logic be adapted as needed with version changes. |
You know better than I do, but my take is that this feature itself should be deprecated for the same reason that we decided to deprecate the That said, adding in |
An alternative route taken by ampproject/amp-toolbox#1273 is to captiure a snapshot of the current latest versions and to use them instead. I also did this as a stop gap measure in ampproject/amp-wp#6803. There is a new JSON file in the amphtml repo which has the legacy latest versions defined, introduced by #37177. |
@westonruter: would you still like an |
@samouri Having a declarative way to find out which extensions are experimental seems like a win regardless. This would eliminate having to look through JS files to find imperative checks for experimental flags (e.g. #37364). Nevertheless, now that |
I think the summary still holds, having a |
+1 to @jridgewell. The The primary impact of this recent discover/P0 is that we can likely never remove the pre-existing |
It also seems sensible to remove |
Just to provide another perspective here: So while I agree that it is not a good idea to have your production site rely on a moving target version, there are other valid use case for providing a way to query the "latest stable" version:
I don't think a |
Yeah, and that could be addressed by having an |
Summary
Context: Following up on an old comment #21135 (comment)
The original intention was that if we create a new version of a component which maintains backward compatibility, we could then simply modify the "-latest" pointer to the new version. Publisher documents could then seamlessly get the new version with no action on their part.
In practice we don't create a new version of a components unless we are explicitly making breaking changes.
This means that bumping the pointer is impossible as it will more than likely break current consumers (as happened in the past). Therefore the
-latest
binaries have serve no practical purpose and we should remove them.Deprecation Plan
-latest
binaries on amp.dev to point out that it is deprecated.-latest
via validator rules.-latest
binaries, recommending publishers pin to a specific extension version.latestVersion
when it isn't the value 0.1Eventually, if usage is low enough, remove the binaries entirely. (cc @honeybadgerdontcare). Less than 1 in 1,000 would be "low enough".removed based on discussion from design review.Notifications
/cc @ampproject/wg-approvers
The text was updated successfully, but these errors were encountered: