-
Notifications
You must be signed in to change notification settings - Fork 719
Refactor Wave and Tower client to use lib-httpx library #6354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pditommaso
wants to merge
8
commits into
master
Choose a base branch
from
refactor-wave-client-use-lib-httpx
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
- 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 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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>
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-httpx
library, significantly simplifying HTTP handling across Nextflow plugins.Key Changes
• Wave Client: Replace 138+ lines of manual HTTP retry logic with
HxClient
fromio.seqera:lib-httpx:1.6.0
• Tower Client: Migrate from custom HTTP handling to standardized
HxClient
implementation• RetryConfig: Update
RetryOpts
to implementRetryable.Config
interface fromlib-retry
• Dependency Updates: Add
lib-httpx:1.6.0
to 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