Skip to content

fix: avoid infinite loops when searching for filesystem root of another drive#353

Merged
zimeg merged 9 commits intomainfrom
fix-windows-ci
Feb 26, 2026
Merged

fix: avoid infinite loops when searching for filesystem root of another drive#353
zimeg merged 9 commits intomainfrom
fix-windows-ci

Conversation

@zimeg
Copy link
Member

@zimeg zimeg commented Feb 25, 2026

Changelog

We now avoid infinite loops when searching for the root project .slack directory for projects existing on drives other than the C: drive on Windows.

Summary

This PR follows #178 with ongoing attempt to exit hanging installations in CI. We now check for repeated lookups when searching "up" for the project .slack directory.

Reviewers

These changes were proven to work on Windows with slackapi/slack-github-action#560!

Requirements

zimeg and others added 2 commits February 24, 2026 22:24
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg zimeg self-assigned this Feb 25, 2026
@zimeg zimeg added bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented semver:patch Use on pull requests to describe the release version increment labels Feb 25, 2026
@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.57%. Comparing base (54ba6d6) to head (7900769).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
internal/shared/clients.go 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #353      +/-   ##
==========================================
+ Coverage   64.54%   64.57%   +0.02%     
==========================================
  Files         213      213              
  Lines       17915    17918       +3     
==========================================
+ Hits        11564    11570       +6     
+ Misses       5274     5272       -2     
+ Partials     1077     1076       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zimeg zimeg changed the title fix: avoid hang before command exit if jaeger traces fail to flush fix: avoid infinite loops when searching for filesystem root of another drive Feb 25, 2026
@zimeg zimeg added this to the Next Release milestone Feb 26, 2026
@zimeg zimeg marked this pull request as ready for review February 26, 2026 21:33
@zimeg zimeg requested a review from a team as a code owner February 26, 2026 21:33
Copy link
Contributor

@hello-ashleyintech hello-ashleyintech left a comment

Choose a reason for hiding this comment

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

this has brought back many windows memories! 🙌

mockWorkingDirectory: filepath.Join("path", "outside", "home", "to", "project"),
expectedError: slackerror.New(slackerror.ErrHooksJSONLocation),
},
"errors if traversal reaches a filesystem root": {
Copy link
Contributor

Choose a reason for hiding this comment

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

nice add 🙏

@zimeg
Copy link
Member Author

zimeg commented Feb 26, 2026

@hello-ashleyintech I hope all good ones! Let's merge this to look out for more edge 📠

@zimeg zimeg enabled auto-merge (squash) February 26, 2026 21:59
@zimeg zimeg merged commit fbab2b6 into main Feb 26, 2026
7 checks passed
@zimeg zimeg deleted the fix-windows-ci branch February 26, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants