go taskrunner: fix panic on malformed fswatch output#79
Merged
dansamsara merged 2 commits intomasterfrom Nov 7, 2025
Merged
Conversation
b1539a2 to
221dcf8
Compare
Add bounds checking in FSEventsWatcher to handle malformed fswatch output lines that lack event flags. This prevents index out of range panics when running taskrunner.
221dcf8 to
a0b8367
Compare
Contributor
|
Do you mean to have both of these commits in this pull request? |
Contributor
Author
Yeah, the tests were broken on master so the unrelated commit is to fix them so they pass on this branch. See https://github.com/samsarahq/taskrunner/actions/runs/18226498829 |
Prior to this change, the test were failing on CI on the master branch and thus on this branch since it was created from master. Update vendor directory to include github.com/stretchr/testify/require which is imported by goextensions/builder_test.go but was missing from the vendor directory, causing CI tests to fail.
3e2cb54 to
bd44b54
Compare
Contributor
Author
I updated the commit message and the PR description to help clarify |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add bounds checking in FSEventsWatcher to handle malformed fswatch
output lines that lack event flags. This prevents index out of range
panics when running taskrunner.
Here's an example of the error:
The second commit was added to fixe the tests in CI which were broken on the
master branch before this change. See https://github.com/samsarahq/taskrunner/tree/refs/heads/master