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

Ensure that mode.getFullVersion_ falls back to the full version and not just major #5946

Merged
merged 4 commits into from Nov 2, 2016

Conversation

dvoytenko
Copy link
Contributor

@dvoytenko dvoytenko commented Nov 1, 2016

Partial for #5940.

@dvoytenko dvoytenko changed the title Ensure that mode.getFullVersion_ falls back to the full version and n… Ensure that mode.getFullVersion_ falls back to the full version and not just major Nov 1, 2016
@erwinmombay
Copy link
Member

erwinmombay commented Nov 1, 2016

@jridgewell for final review. not sure if this affects sw in any way

Copy link
Contributor

@jridgewell jridgewell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't affect SW at all, so it's fine with me.

// We will default to production default `01` minor version for now.
// TODO(erwinmombay): decide whether $internalRuntimeVersion$ should contain
// minor version.
return `01${version}`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

01 may not always be the Prod prefix, though. I think. @cramforce would know better than I would.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, 01 is not always the best. But it should always be there. And we have no better information for a fallback at this time. Separately, I asked @erwinmombay to consider to simply update $internalRuntimeVersion$ to a full version or add another replacement like this for minor version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took to using two types, AmpVersion and RtvVersion in the SW to help catch issues where I used a non-prefixed value in a place that requires a prefix. Maybe we should do the same here to catch these kinds of issues?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like rtvVersion definitely makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I added rtvVersion field to disambiguate the two.

Dima Voytenko added 2 commits November 1, 2016 14:16
@jridgewell
Copy link
Contributor

LGTM.

@dvoytenko dvoytenko merged commit d20970e into ampproject:master Nov 2, 2016
@dvoytenko dvoytenko deleted the pwa16 branch November 2, 2016 00:25
Lith pushed a commit to Lith/amphtml that referenced this pull request Dec 22, 2016
…ot just major (ampproject#5946)

* Ensure that mode.getFullVersion_ falls back to the full version and not just major

* renames

* types

* update rtvVersion everywhere
Lith pushed a commit to Lith/amphtml that referenced this pull request Dec 22, 2016
…ot just major (ampproject#5946)

* Ensure that mode.getFullVersion_ falls back to the full version and not just major

* renames

* types

* update rtvVersion everywhere
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants