Skip to content

Conversation

@yashuatla
Copy link
Owner

This PR contains changes from a range of commits from the original repository.

Commit Range: 89f29cb..b932e53
Files Changed: 40 (21 programming files)
Programming Ratio: 52.5%

Commits included:

  • chore: go mod tidy
  • refactor: watchTasks - Chmod operations are already filtered in the Deduper
  • refactor(fsnotifyext): use Event.Has to check for chmod operations
  • doc(fsnotifyext): add godoc for GetChan method
  • refactor(fsnotifyext): GetChan should return a receive only chan
  • refactor(fsnotifyext): handle Deduper timers in own goroutine, avoid mutex use
  • chore(deps): update all non-major dependencies (chore(deps): update all non-major dependencies go-task/task#2270)
  • chore: add special variables task to remote for testing
  • chore: go mod tidy
  • chore: changelog for feat: checksum pinning go-task/task#2223
    ... and 5 more commits

}

return nil, errors.TaskfileNotFoundError{URI: u.String(), Walk: false}
return nil, errors.TaskfileNotFoundError{URI: u.Redacted(), Walk: false}
Copy link

Choose a reason for hiding this comment

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

🔒 Security Issue

Security: URL Redaction for Error Messages.

Using u.Redacted() instead of u.String() prevents sensitive information in URLs from being exposed in error messages, which is a critical security improvement.

case event, ok := <-eventsChan:
switch {
case !ok:
if !ok {
Copy link

Choose a reason for hiding this comment

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

⚡ Performance Issue

Removed Chmod Event Filtering.

The code no longer ignores chmod events, which will cause unnecessary processing when only file permissions change.

Current Code (Diff):

- 				if !ok {
- 					cancel()
- 					return
- 				}
+ 				switch {
+ 				case !ok:
+ 					cancel()
+ 					return
+ 				case event.Op == fsnotify.Chmod:
+ 					continue
+ 				}
📝 Committable suggestion

‼️ IMPORTANT
Trust, but verify! 🕵️ Please review this suggestion with the care of a code archaeologist - check that it perfectly replaces the highlighted code, preserves all lines, maintains proper indentation, and won't break anything in production. Your future self will thank you! 🚀

Suggested change
if !ok {
switch {
case !ok:
cancel()
return
case event.Op == fsnotify.Chmod:
continue
}

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.

6 participants