Skip to content

fix(ngUpgrade): prevent digest already in progress errors - #9046

Merged
mhevery merged 1 commit into
angular:masterfrom
thelgevold:fix-digest-already-in-progress
Jun 6, 2016
Merged

mhevery merged 1 commit into
angular:masterfrom
thelgevold:fix-digest-already-in-progress

Conversation

@thelgevold

Copy link
Copy Markdown
Contributor

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

  • [x ] Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior? (You can also link to an open issue here)
Under certain conditions ngUpgrade will throw "digest already in progress" errors. Seems to be related to overlapping digest cycles between ngUpgrade and the Angular 1 application.
Repro here:
#8951

What is the new behavior?
By using $applyAsync, digest cycles will no longer overlap since Angular will check if a digest cycle is already in progress before triggering a new one. If a digest is already a progress the ngUpgrade update will just join the existing cycle.

Does this PR introduce a breaking change?

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

@googlebot

Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

@thelgevold

Copy link
Copy Markdown
Contributor Author

I signed it

@googlebot

Copy link
Copy Markdown

CLAs look good, thanks!

@googlebot googlebot added cla: yes and removed cla: no labels Jun 6, 2016
@mhevery
mhevery merged commit d1c989b into angular:master Jun 6, 2016
chuckjaz added a commit that referenced this pull request Jun 6, 2016
@chuckjaz

chuckjaz commented Jun 6, 2016

Copy link
Copy Markdown
Contributor

Reverted because it broke on of the Karma tests. You can run the Karma tests locally by executing:

node_modules/.bin/karma start ./karma-js.conf.js --single-run --browsers=ChromeNoSandbox

Please resubmit once this is addressed.

@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants