Skip to content

Conversation

pditommaso
Copy link
Member

Summary

• Extends the Wave client refactoring (#6354) to also update the Tower client
• Replace manual HTTP retry logic with HxClient from io.seqera:lib-httpx
• Update TowerClient.sendHttpMessage() to use HxClient.sendAsString() API
• Add proper HxClient configuration with retry settings, JWT token, and refresh token handling
• Simplify HTTP request creation and response handling by removing 18 lines of redundant code

Changes

  • TowerClient.groovy: Replace manual HTTP handling with HxClient integration
  • SimpleHttpClient.groovy: Add support for content-type and authorization headers
  • build.gradle: Add io.seqera:lib-httpx dependency
  • Tests: Update TowerClientTest to reflect API changes

Test plan

  • Verify existing Tower plugin tests still pass with new HTTP client
  • Confirm retry behavior works correctly through HxClient
  • Test JWT token and refresh token functionality
  • Run integration tests to ensure Tower API connectivity

🤖 Generated with Claude Code

pditommaso and others added 5 commits August 21, 2025 11:39
- 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

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

Co-Authored-By: Claude <[email protected]>
…-client-use-lib-httpx

Signed-off-by: Paolo Di Tommaso <[email protected]>
Signed-off-by: Paolo Di Tommaso <[email protected]>
Signed-off-by: Paolo Di Tommaso <[email protected]>
- 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)

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

Co-Authored-By: Claude <[email protected]>
@pditommaso pditommaso merged commit 06ca439 into refactor-wave-client-use-lib-httpx Aug 23, 2025
17 of 18 checks passed
@pditommaso pditommaso deleted the refactor-tower-client-use-lib-httpx branch August 23, 2025 10:34
pditommaso added a commit that referenced this pull request Sep 3, 2025
* Refactor Wave client to use lib-httpx library

- 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 <[email protected]>

* Bump [email protected]

Signed-off-by: Paolo Di Tommaso <[email protected]>

* Improve integration

Signed-off-by: Paolo Di Tommaso <[email protected]>

* Refactor Tower client to use lib-httpx library (#6357)

* 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 <[email protected]>
Signed-off-by: Ben Sherman <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Ben Sherman <[email protected]>
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