Skip to content

Conversation

@jonburdo
Copy link
Contributor

@jonburdo jonburdo commented Nov 24, 2025

This changes ShouldSync to return a Reason type instead of three separate values.

🤖 Generated with Claude Code

fixes #82

@codecov-commenter
Copy link

codecov-commenter commented Nov 24, 2025

Codecov Report

❌ Patch coverage is 86.66667% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.56%. Comparing base (0b6d3e5) to head (cf85c29).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/sync/manager.go 90.90% 3 Missing ⚠️
internal/sync/mocks/mock_manager.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #172      +/-   ##
==========================================
+ Coverage   65.25%   65.56%   +0.31%     
==========================================
  Files          58       58              
  Lines        3589     3613      +24     
==========================================
+ Hits         2342     2369      +27     
+ Misses       1090     1088       -2     
+ Partials      157      156       -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.

Copy link
Contributor Author

@jonburdo jonburdo left a comment

Choose a reason for hiding this comment

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

This is based on comment #77 (comment)

@blkt Was this roughly what you had in mind? I'm happy to use a different approach if not. This seemed like the simplest, but we could keep reason's as string constants or use a struct like Decision{ShouldSync: false, Reason: "sync-already-in-progress"}

dmjb
dmjb previously approved these changes Nov 24, 2025
@jonburdo jonburdo force-pushed the improve-return-type-for-should-sync branch from d387fc0 to 833977d Compare November 24, 2025 19:43
This changes ShouldSync to return a Reason type instead of three
separate values.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Jon Burdo <jon@jonburdo.com>
@jonburdo jonburdo force-pushed the improve-return-type-for-should-sync branch from 833977d to 71baca9 Compare November 24, 2025 19:51
Copy link
Collaborator

@dmartinol dmartinol left a comment

Choose a reason for hiding this comment

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

Thanks!

@rdimitrov rdimitrov merged commit 479c1c8 into stacklok:main Nov 25, 2025
12 checks passed
@jonburdo jonburdo deleted the improve-return-type-for-should-sync branch November 25, 2025 16:06
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.

Introduce enumerated types for ShouldSync return types

6 participants