4 Commits

Author SHA1 Message Date
Nathan Wallace
7e27df2d44 Fix #4791: Use idiomatic for-range pattern for error channel closes #4791 (#4835)
* Add test demonstrating bug #4791: Goroutine leak in executeUpdateSetsInParallel

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix #4791: Use idiomatic for-range pattern for error channel

Replace the for-select-nil-check pattern with the idiomatic for-range
pattern when consuming from the error channel. The for-range pattern:
- Automatically exits when the channel is closed
- Doesn't require manual nil checks
- Is more maintainable and less error-prone
- Follows Go best practices for channel consumption

This eliminates the potential for goroutine leaks if the nil check
were accidentally removed or modified in future maintenance.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-16 14:11:31 -05:00
Nathan Wallace
3cfbb59dc5 Fix type assertion panic in logRefreshConnectionResults closes #4807 (#4855)
* Add test for #4807: Potential type assertion panic in logRefreshConnectionResults

Fix test to verify panic is prevented, not expected

The test was written to expect a panic, but after the fix is applied,
the panic should NO LONGER occur. Updated the test to verify that:
1. No panic occurs when handling nil values
2. No panic occurs when handling wrong types
3. No panic occurs when handling nil cobra.Command pointers

This ensures the test passes after the fix is applied.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix #4807: Use safe type assertion in logRefreshConnectionResults

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-16 11:19:55 -05:00
Nathan Wallace
e374540483 Context cancellation check in executeUpdateSetsInParallel closes #4806 (#4873)
* Add test for #4806: executeUpdateSetsInParallel context cancellation

* Fix #4806: Add context cancellation checks in executeUpdateSetsInParallel
2025-11-15 11:19:20 -05:00
Nathan Wallace
ca32de335c Fix #4757: Race condition in exemplarSchemaMap (#4774) 2025-11-11 17:31:58 +08:00