Refactor Wave and Tower client to use lib-httpx library#6354
Merged
pditommaso merged 9 commits intomasterfrom Sep 3, 2025
Merged
Refactor Wave and Tower client to use lib-httpx library#6354pditommaso merged 9 commits intomasterfrom
pditommaso merged 9 commits intomasterfrom
Conversation
- Replace manual HTTP retry logic with HxClient from io.seqera:lib-httpx:1.2.0 - Update RetryOpts to implement Retryable.Config interface from lib-retry - Add multiplier field to RetryOpts for exponential backoff configuration - Remove manual JWT token refresh logic in favor of HxClient built-in handling - Update WaveClient to use HxClient.sendAsString() instead of raw HttpClient - Remove redundant retry policy and HTTP response handling code - Update tests to reflect API changes and remove obsolete HTTP retry test 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
✅ Deploy Preview for nextflow-docs-staging canceled.
|
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
4 tasks
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
* Refactor Tower client to use lib-httpx library - Replace manual HTTP retry logic with HxClient from io.seqera:lib-httpx - Update TowerClient.sendHttpMessage() to use HxClient.sendAsString() - Add HxClient configuration with retry settings, JWT token, and refresh token handling - Update makeRequest() helper method to properly build HttpRequest objects with body content - Remove redundant HTTP response handling code in favor of HxClient built-in functionality - Update SimpleHttpClient to support content-type and authorization headers - Update tests to reflect API changes - Add comprehensive annotations to TowerRetryPolicy with default values - Add Javadoc documentation to TowerRetryPolicy class explaining retry behavior - Fix missing annotations in WaveConfig BuildOpts class (conda, compression, maxDuration) Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
- Update WaveClient to use HxClient.newBuilder() with builder pattern - Update TowerClient to use HxClient.newBuilder() with inline HTTP client configuration - Update HttpPluginRepository to use HxClient.newBuilder() with retry config - Fix TowerClientTest to mock HxClient.Builder instead of HxConfig.Builder - Update method calls to match new builder API (bearerToken, basicAuth, etc.) - Upgrade lib-httpx dependency to v2.0.0 across all affected modules - All tests pass after migration to new HxClient API 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Member
Author
|
@bentsherman can you have a look when you have a chance? |
bentsherman
approved these changes
Sep 3, 2025
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.
Summary
This PR refactors both Wave and Tower clients to use the standardized
lib-httpxlibrary, significantly simplifying HTTP handling across Nextflow plugins.Key Changes
• Wave Client: Replace 138+ lines of manual HTTP retry logic with
HxClientfromio.seqera:lib-httpx:1.6.0• Tower Client: Migrate from custom HTTP handling to standardized
HxClientimplementation• RetryConfig: Update
RetryOptsto implementRetryable.Configinterface fromlib-retry• Dependency Updates: Add
lib-httpx:1.6.0to both Wave and Tower plugin dependencies• Code Reduction: Remove ~564 lines of redundant HTTP handling and retry logic across plugins
Technical Improvements
Files Modified
plugins/nf-wave/: Simplified WaveClient HTTP handlingplugins/nf-tower/: Refactored TowerClient with new retry policymodules/nf-commons/: Updated RetryConfig to implement Retryable.ConfigTest Plan
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com