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

fix(service-worker): detect new version even if files are identical to an old one #26006

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
5 participants
@gkalpak
Copy link
Member

gkalpak commented Sep 18, 2018

PR Checklist

PR Type

[x] Bugfix

What is the current behavior?

If an app version (aka manifest) contains the same files as an older version (e.g. making a change, then rolling it back), the SW would not detect it as the latest version (and update clients).

Issue Number: #24338

What is the new behavior?

A new timestamp field is added in ngsw.json (based on the current date), which makes each build unique (with sufficiently high probability).

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Fixes #24338.

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Sep 18, 2018

@gkalpak gkalpak force-pushed the gkalpak:fix-sw-detect-rollback-as-new-version branch from d12a118 to ca19ce5 Jan 16, 2019

@gkalpak gkalpak requested a review from angular/fw-service-worker as a code owner Jan 16, 2019

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Jan 16, 2019

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Jan 16, 2019

@gkalpak gkalpak force-pushed the gkalpak:fix-sw-detect-rollback-as-new-version branch from 79fa1bc to 94ad278 Jan 16, 2019

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Jan 16, 2019

@gkalpak gkalpak added the risk: low label Jan 16, 2019

@ngbot ngbot bot added this to the needsTriage milestone Jan 16, 2019

@IgorMinar IgorMinar removed the request for review from alxhub Mar 5, 2019

@IgorMinar

This comment has been minimized.

Copy link
Member

IgorMinar commented Mar 5, 2019

@gkalpak can you please rebase this to get rid of the pending pullapprove status? thanks

gkalpak added some commits Mar 5, 2019

fix(service-worker): detect new version even if files are identical t…
…o an old one

Previously, if an app version contained the same files as an older
version (e.g. making a change, then rolling it back), the SW would not
detect it as the latest version (and update clients).

This commit fixes it by adding a `timestamp` field in `ngsw.json`, which
makes each build unique (with sufficiently high probability).

Fixes #24338

@gkalpak gkalpak force-pushed the gkalpak:fix-sw-detect-rollback-as-new-version branch from 94ad278 to b158057 Mar 5, 2019

AndrewKushnir added a commit that referenced this pull request Mar 5, 2019

fix(service-worker): detect new version even if files are identical t…
…o an old one (#26006)

Previously, if an app version contained the same files as an older
version (e.g. making a change, then rolling it back), the SW would not
detect it as the latest version (and update clients).

This commit fixes it by adding a `timestamp` field in `ngsw.json`, which
makes each build unique (with sufficiently high probability).

Fixes #24338

PR Close #26006

@gkalpak gkalpak deleted the gkalpak:fix-sw-detect-rollback-as-new-version branch Mar 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.