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

Support passing --poll to the auto plugin to better deal with symlink farms. #3757

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

aknrdureegaesr
Copy link
Contributor

Pull Request Checklist

  • I’ve read the guidelines for contributing.
  • I updated AUTHORS.txt and CHANGES.txt (if the change is non-trivial) and documentation (if applicable).
  • I tested my changes.

Description

What did I do?

  • I have a directory nikola-site and another one nikola side-by-side.
  • I removed the pertinent files in nikola-site/stories and replaced them with symbolic links linking to nikola/docs.
  • In nikola-site, I started nikola auto -b.
  • I changed the content of one of the files in nikola/docs.

Expectation:

The nikola auto plugin does its thing and my change becomes visible in the browser.

Actually seen:

The required rebuild is not triggered.

Investigation

This related to a rather ancient bug of watchdog. As I found out by playing around, the bug disappears if the polling functionality of watchdog is used.

What does this PR do?

Add a command line argument to nikola auto, namely --poll. If not present, all is as it always has been. If present, the polling watchdog observer is used and the rebuilds happen as they should.

Copy link
Member

@Kwpolska Kwpolska left a comment

Choose a reason for hiding this comment

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

LGTM

CONTRIBUTING.rst Outdated Show resolved Hide resolved
docs/theming.rst Outdated Show resolved Hide resolved
nikola/plugins/command/auto/__init__.py Outdated Show resolved Hide resolved
@aknrdureegaesr
Copy link
Contributor Author

Sorry - this PR wasn't up to the standards I usually demand of myself 😔. Thanks for the suggestions!

I somewhat changed the help text. The way it is now, the second sentence is actually a sentence, and still shorter.

I think this can be merged now.

@Kwpolska Kwpolska enabled auto-merge (squash) February 12, 2024 18:00
@Kwpolska
Copy link
Member

Don’t worry about it, not all code one writes is perfect, but that’s what the code review is for :)

PS. you don’t need to squash things yourself, we now have a policy that mandates squashes on the GitHub side (your branch can be a complete mess full of merges and test commits, but only one commit will land on master no matter what). Squashing manually makes it harder to track changes on GitHub, as there’s no way to get a diff between revisions of the PR.

@Kwpolska Kwpolska merged commit 411ca50 into getnikola:master Feb 12, 2024
11 checks passed
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.

2 participants