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

Prevent race condition in diff generation #1456

Merged
merged 1 commit into from Sep 7, 2019

Conversation

@ddfreyne
Copy link
Member

commented Sep 7, 2019

This fixes a rare issue where Nanoc would print an error that a file does not exist. (Happens during output diff generation)

Detailed description

The call to Nanoc::Core::NotificationCenter.sync helped avoid some issues, but it is still possible for the diff generation to fail because the original file is no longer available. This happens because .sync unblocks as soon as the last notification is picked up, rather than when the last notification is finished.

To do

(none)

Related issues

(none)

Prevent race condition in diff generation
The call to `Nanoc::Core::NotificationCenter.sync` helped avoid some issues, but it is still possible for the diff generation to fail because the original file is no longer available. This happens because `.sync` unblocks as soon as the last notification is picked up, rather than when the last notification is finished.

@ddfreyne ddfreyne merged commit b21a5db into master Sep 7, 2019

21 checks passed

ci/circleci: check_style_cruby26 Your tests passed on CircleCI!
Details
ci/circleci: setup_cruby24 Your tests passed on CircleCI!
Details
ci/circleci: setup_cruby25 Your tests passed on CircleCI!
Details
ci/circleci: setup_cruby26 Your tests passed on CircleCI!
Details
ci/circleci: test_guard_nanoc_cruby24 Your tests passed on CircleCI!
Details
ci/circleci: test_guard_nanoc_cruby25 Your tests passed on CircleCI!
Details
ci/circleci: test_guard_nanoc_cruby26 Your tests passed on CircleCI!
Details
ci/circleci: test_nanoc_core_cruby24 Your tests passed on CircleCI!
Details
ci/circleci: test_nanoc_core_cruby25 Your tests passed on CircleCI!
Details
ci/circleci: test_nanoc_core_cruby26 Your tests passed on CircleCI!
Details
ci/circleci: test_nanoc_cruby24 Your tests passed on CircleCI!
Details
ci/circleci: test_nanoc_cruby25 Your tests passed on CircleCI!
Details
ci/circleci: test_nanoc_cruby26 Your tests passed on CircleCI!
Details
ci/circleci: test_nanoc_external_cruby24 Your tests passed on CircleCI!
Details
ci/circleci: test_nanoc_external_cruby25 Your tests passed on CircleCI!
Details
ci/circleci: test_nanoc_external_cruby26 Your tests passed on CircleCI!
Details
ci/circleci: test_nanoc_live_cruby24 Your tests passed on CircleCI!
Details
ci/circleci: test_nanoc_live_cruby25 Your tests passed on CircleCI!
Details
ci/circleci: test_nanoc_live_cruby26 Your tests passed on CircleCI!
Details
codecov/patch Coverage not affected when comparing bda846f...51adcc3
Details
codecov/project 97.36% (-0.01%) compared to bda846f
Details

@ddfreyne ddfreyne deleted the fix-diff-generation branch Sep 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.