-
-
Notifications
You must be signed in to change notification settings - Fork 241
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-blocking notes #180
Conversation
All tests passed in my workflow. |
If I revert your changes in 3194d69. The tests do block forever. |
Thanks! The last attempt to get that working tried to remove the uses of |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/creack/pty](https://togithub.com/creack/pty) | `v1.1.21` -> `v1.1.23` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fcreack%2fpty/v1.1.23?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fcreack%2fpty/v1.1.23?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fcreack%2fpty/v1.1.21/v1.1.23?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fcreack%2fpty/v1.1.21/v1.1.23?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>creack/pty (github.com/creack/pty)</summary> ### [`v1.1.23`](https://togithub.com/creack/pty/releases/tag/v1.1.23) [Compare Source](https://togithub.com/creack/pty/compare/v1.1.21...v1.1.23) #### What's Changed - Upgrade to go version 1.18.2 to fix multiple CVEs by [@​pinaki124](https://togithub.com/pinaki124) in [https://github.com/creack/pty/pull/154](https://togithub.com/creack/pty/pull/154) - Tests cleanup by [@​creack](https://togithub.com/creack) in [https://github.com/creack/pty/pull/173](https://togithub.com/creack/pty/pull/173) - Revert [#​167](https://togithub.com/creack/pty/issues/167) to avoid race on Linux. by [@​creack](https://togithub.com/creack) in [https://github.com/creack/pty/pull/177](https://togithub.com/creack/pty/pull/177) - Add non-blocking notes by [@​WeidiDeng](https://togithub.com/WeidiDeng) in [https://github.com/creack/pty/pull/180](https://togithub.com/creack/pty/pull/180) - ztypes_openbsd\_32bit_int.go: remove arch list by [@​n2vi](https://togithub.com/n2vi) in [https://github.com/creack/pty/pull/189](https://togithub.com/creack/pty/pull/189) #### New Contributors - [@​pinaki124](https://togithub.com/pinaki124) made their first contribution in [https://github.com/creack/pty/pull/154](https://togithub.com/creack/pty/pull/154) - [@​WeidiDeng](https://togithub.com/WeidiDeng) made their first contribution in [https://github.com/creack/pty/pull/180](https://togithub.com/creack/pty/pull/180) - [@​n2vi](https://togithub.com/n2vi) made their first contribution in [https://github.com/creack/pty/pull/189](https://togithub.com/creack/pty/pull/189) **Full Changelog**: creack/pty@v1.1.20...v1.1.23 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 11pm every weekday,before 7am every weekday,every weekend" in timezone Europe/Brussels, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/kairos-io/provider-kairos). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
I have done some local testing, it turns out if the file is in non-blocking mode,
Getsize
will return zero sizes without any error. Setting the file in block mode will allow the result to be correct.Instead, we could document that we can manually set a file to be non-blocking mode using
syscall.SetNonblock
, this will allow deadlines to work. I have set a larger timeout so the tests will succeed every time. Possibly this is due to how golang internal poller works, but that's up to golang to fix it.