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

Add non atomic behaviour #53

Closed
stp-ip opened this issue Mar 22, 2017 · 11 comments
Closed

Add non atomic behaviour #53

stp-ip opened this issue Mar 22, 2017 · 11 comments
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.

Comments

@stp-ip
Copy link
Member

stp-ip commented Mar 22, 2017

Add flag and logic to disable symlink usage and just pull in new changes via git pull.

This could be used as a workaround for various issues and additional use-cases, but introduces inconsistent state so this should be heavily warned about.

Flag: GIT_SYNC_ATOMIC

@ursuad
Copy link

ursuad commented Apr 4, 2017

Maybe an option here would be to introduce a hook which will get triggered once the pull (update) is successful?
For example calling a configurable REST endpoint ( notify ) once the update is complete. This way, it would be really easy to create a wrapper around third party tools that want to use the git-sync functionality.

The third party tools would get notified once the update is complete. This would partly eliminate the need for non atomic behaviour.

@thockin
Copy link
Member

thockin commented Apr 4, 2017 via email

@stp-ip
Copy link
Member Author

stp-ip commented Apr 4, 2017

Do we want to add triggering to git-sync?
What trigger should be used? http, touch ready.file, etc.?
Should we still provide a non atomic option?

@thockin
Copy link
Member

thockin commented Apr 4, 2017 via email

@stp-ip
Copy link
Member Author

stp-ip commented Apr 4, 2017

One of the pain points of symlinks are programs using notify "different" following symlinks and not checking for symlink changes itself. hugo for example.

@thockin
Copy link
Member

thockin commented Apr 5, 2017 via email

@stp-ip stp-ip added this to the 3.0 milestone Sep 15, 2017
@japettyjohn
Copy link

This would help when the folder becomes the CWD of the app for Go, not sure if this is the same problem in Hugo. In my case the symlink is dereferenced which then leads to explosions when it references a relative file from the non-existent folder.

Another option would be to replace the old folder with a symlink to the new folder. The notification should still be added so things can get reloaded as needed.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 6, 2018
@thockin
Copy link
Member

thockin commented Feb 1, 2018

/lifecycle frozen
/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 1, 2018
@thockin
Copy link
Member

thockin commented Dec 17, 2018

Do you think #110 would cover this need?

@stp-ip
Copy link
Member Author

stp-ip commented Dec 22, 2018

It doesn't solve it perfectly, but it gives a good workaround I guess. After merge I can take another look and maybe write up some ideas.

@stp-ip stp-ip removed this from the 3.0 milestone Jan 24, 2019
@thockin thockin closed this as completed Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
None yet
Development

No branches or pull requests

6 participants