Amphtml: Lock `amp-foo-latest.js` to current stable versions without automatic upgrade.

Created on 28 Feb 2019  路  7Comments  路  Source: ampproject/amphtml

We need a static table to decide what version latest binaries are built from. Please see https://github.com/ampproject/amphtml/issues/21135 for details on why current -latest binaries are dangerous.

This is a blocker for amp-experiment and amp-list versions 2 work and must happen before we start forking those components for v2.

/to @rsimha to assign within infra
/cc @cathyxz @torch2424

High Priority Bug

All 7 comments

@aghassemi @cathyxz @torch2424 We can do this by adding a new field called latestVersion to extensionBundles in bundles.config.js that specifies the version to which amp-foo-latest is locked. It can be used during the build to determine which version copy into the -latest binary. Would that work?

https://github.com/ampproject/amphtml/blob/6a78bcb541d4ef2f004958c27b29bfdd7b70d312/bundles.config.js#L28-L447

@rsimha that's a good place for it, close to all version declarations. LGTM

@rsimha Works for me as well 馃槃 Thank you for looking into this!

With #21190, there are two changes:

  • The race between versions to be the latest has been fixed
  • The version that becomes the latest is now locked, and will have to be explicitly specified

See #21190 (comment) for more info.

Thank you for the quick fix! I think how runtime insert scripts code also need a bit refinement. https://github.com/ampproject/amphtml/blob/master/src/service/extension-location.js#L70

Follow up comment from https://github.com/ampproject/amphtml/pull/21164#pullrequestreview-214743181:

@aghassemi I noticed that amp-story, amp-mustache, and amp-access-laterpay all list the newest (experimental?) version as latestVersion. Should they be rolled back until the newest version is ready for wide release?

https://github.com/ampproject/amphtml/blob/2b8b439203444545acd5c8780ae5ea79ac972b0a/bundles.config.js#L636-L638
https://github.com/ampproject/amphtml/blob/2b8b439203444545acd5c8780ae5ea79ac972b0a/bundles.config.js#L522-L524
https://github.com/ampproject/amphtml/blob/2b8b439203444545acd5c8780ae5ea79ac972b0a/bundles.config.js#L52-L54

Story is definitely 1.0. I think mustache should stay at 0.2. No idea about laterpay.

Was this page helpful?
0 / 5 - 0 ratings