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

Use symlink to common #2505

Merged
merged 3 commits into from
May 31, 2021
Merged

Use symlink to common #2505

merged 3 commits into from
May 31, 2021

Conversation

sandrobonazzola
Copy link
Member

Changes proposed in this pull request:

  • Using symlinks here to help moving the documentation to upstream first.

I confirm that this pull request was submitted according to the contribution guidelines: @sandrobonazzola

This pull request needs review by: @stoobie @duck-rh

@sandrobonazzola sandrobonazzola requested review from stoobie, duck-rh and a team May 25, 2021 06:58
Copy link
Contributor

@stoobie stoobie left a comment

Choose a reason for hiding this comment

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

I fetched the branch, generated ovirt-site and verified that include statements that reference the symlinked /common/ directory work as expected.
I did not verify that all links to the /common/ directory were changes to reference the symlink.

Copy link
Collaborator

@duck-rh duck-rh left a comment

Choose a reason for hiding this comment

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

I'm all in for upstream first of course \o/.

There's a regression when testing the site with bundle exec jekyll s:

        ** ERROR: directory is already being watched! **

        Directory: /home/duck/Projects/oVirt/ovirt-site/source/documentation/data_warehouse_guide/common

        is already being watched through: /home/duck/Projects/oVirt/ovirt-site/source/documentation/common

and others, so some patterns are not right.

_config.yml Show resolved Hide resolved
RHV documentation uses a system that requires common
directory to be within each docuemtation guide.
Using symlinks here to help moving the documentation to
upstream first.

It has a downside: live reload raises errors like:

  Directory: ovirt-site/source/documentation/migrating_from_a_standalone_manager_to_a_self-hosted_engine/common
  is already being watched through: ovirt-site/source/documentation/common
  MORE INFO: https://github.com/guard/listen/blob/master/README.md
  ** ERROR: directory is already being watched! **

Signed-off-by: Sandro Bonazzola <[email protected]>
Signed-off-by: Sandro Bonazzola <[email protected]>
@sandrobonazzola
Copy link
Member Author

I addressed comments about the config file, added a note about the symlink generated error.
I found guard/listen#339 which explain that those errors can be avoided with monkey patching but honestly it's beyond my knowledge of the ruby language.

@duck-rh
Copy link
Collaborator

duck-rh commented May 31, 2021

@sandrobonazzola I looked into jekyll-watch and it takes the exclude list into account but skips them if they don't resolve outside the source directory and there is no way to inject custom ignores. I also discovered it does not support globbing like Jekyll does in the ignore field. I then dug into listen and despite uptream's comment on various BRs the ignore list is only skipping events on all architectures (and not just non-linux). Anyway I guess skipping non-directories would still be a problem.

Since there's no way to get the right behavior I looked in the suggested monkeypatch: I believe it is doing the right thing, skipping the warning message but failing in a way that will only skip listening to the symlink target. I have then integrated it in a new patch that I intend to push right after this message.

@sandrobonazzola sandrobonazzola merged commit e19c161 into master May 31, 2021
@sandrobonazzola sandrobonazzola deleted the upstream_first_doc branch May 31, 2021 11:16
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.

3 participants