feat(nntppool): upgrade to v4 and update related code - #282
Merged
Conversation
- Updated dependency from nntppool v2 to v4, reflecting breaking changes in the API. - Refactored connection handling in various components to accommodate the new client structure. - Adjusted methods for creating and managing NNTP connections, including changes to how providers are configured and utilized. - Removed outdated validation tests that relied on the previous nntppool interface, suggesting integration tests for validation instead. This upgrade enhances performance and security while simplifying the connection management process.
- Added round-trip time (RTT) measurement to the provider connectivity test response. - Updated the ProviderModal component to display RTT alongside connection success messages. - Modified API response types to include RTT information for improved diagnostics. This enhancement provides users with more detailed feedback on connection performance.
…on pool - Introduced a new mechanism for handling provider changes dynamically, allowing for incremental updates to the connection pool. - Added methods for adding and removing providers individually, enhancing flexibility and performance. - Refactored existing configuration handlers to utilize the new provider management functions. - Improved logging for provider changes to facilitate better monitoring and diagnostics. This update streamlines provider management and enhances the overall responsiveness of the connection pool to configuration changes.
- Simplified conditional checks in `TestBuildSegmentIndex` for better clarity. - Standardized formatting in segment definitions across multiple tests for consistency. - Introduced a deterministic random number generator in `TestSelectSegmentsForValidation` to enhance test predictability. - Updated the `randPerm` variable to allow for easier testing of random segment selection. These changes enhance the overall readability and maintainability of the test suite.
- Updated nntppool to v4.0.0 for improved stability. - Upgraded spf13/afero to v1.15.0 and spf13/cobra to v1.10.2 for enhanced features. - Updated google.golang.org/protobuf to v1.36.8 for better compatibility. - Added several indirect dependencies including codeberg.org/polyfloyd/go-errorlint v1.9.0 and github.com/AdminBenni/iota-mixing v1.0.0. - Incremented versions for various indirect dependencies to their latest releases for security and performance improvements. These updates ensure the project remains up-to-date with the latest library versions and improvements.
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.
This pull request introduces improvements to NNTP provider connectivity testing and speed testing, updates the frontend to display round-trip time (RTT) for provider tests, and upgrades several dependencies in the Go backend. The most significant changes are grouped below.
Backend: NNTP Provider Connectivity and Speed Test Improvements
nntppoollibrary from v2 to v4, refactoring provider connectivity and speed test handlers to use new APIs and structures, including support for TLS configuration and reporting of RTT in milliseconds. (internal/api/config_handlers.go,internal/api/provider_speedtest_handler.go) [1] [2] [3] [4]internal/api/config_handlers.go)Frontend: Provider Modal Enhancements
frontend/src/components/config/ProviderModal.tsx,frontend/src/types/config.ts) [1] [2] [3] [4]Dependencies: Go Module Updates
nntppooland multiple other dependencies to newer versions ingo.modto ensure compatibility, security, and access to new features. (go.mod) [1] [2] [3] [4] [5] [6] [7]Code Cleanup
Groupsfield from the localsegmentInfostruct in the speed test handler. (internal/api/provider_speedtest_handler.go) [1] [2]These changes collectively enhance provider diagnostics, modernize backend dependencies, and provide clearer feedback to users in the frontend.