Skip to content

feat(nntppool): upgrade to v4 and update related code - #282

Merged
javi11 merged 5 commits into
mainfrom
feat-new-pool-v4
Feb 9, 2026
Merged

feat(nntppool): upgrade to v4 and update related code#282
javi11 merged 5 commits into
mainfrom
feat-new-pool-v4

Conversation

@javi11

@javi11 javi11 commented Feb 9, 2026

Copy link
Copy Markdown
Collaborator

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

  • Updated usage of the nntppool library 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]
  • The provider connectivity test endpoint now returns the RTT in milliseconds as part of its response. (internal/api/config_handlers.go)

Frontend: Provider Modal Enhancements

  • The provider test modal now displays RTT (in ms) on successful connections, and the UI/TypeScript types have been updated to handle and show this value. (frontend/src/components/config/ProviderModal.tsx, frontend/src/types/config.ts) [1] [2] [3] [4]

Dependencies: Go Module Updates

  • Upgraded nntppool and multiple other dependencies to newer versions in go.mod to ensure compatibility, security, and access to new features. (go.mod) [1] [2] [3] [4] [5] [6] [7]

Code Cleanup

  • Removed unused Groups field from the local segmentInfo struct 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.

- 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.
@javi11
javi11 merged commit 0f5056c into main Feb 9, 2026
@javi11
javi11 deleted the feat-new-pool-v4 branch February 26, 2026 14:08
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.

1 participant