Skip to content

Bump nextflow registry as default#6339

Merged
pditommaso merged 6 commits intomasterfrom
default-to-nextflow-reg
Aug 13, 2025
Merged

Bump nextflow registry as default#6339
pditommaso merged 6 commits intomasterfrom
default-to-nextflow-reg

Conversation

@pditommaso
Copy link
Member

@pditommaso pditommaso commented Aug 12, 2025

This pull request updates the plugin repository integration to support the new Nextflow plugin registry API and improves plugin metadata handling, including robust date conversion for plugin releases. It also refactors the file downloader to streamline HTTP request handling and clarifies registry URL management. The changes are validated with new comprehensive test cases.

Plugin Registry API Integration and Metadata Handling

  • Added support for the new io.seqera:npr-api dependency and updated the plugin repository to consume plugin metadata from the Nextflow registry API, replacing legacy response types and mapping API objects to pf4j-compatible objects, including correct date conversions for plugin releases. [1] [2] [3] [4] [5]
  • Added a comprehensive test validating mapToPluginInfo with various date formats and null handling, ensuring robust conversion from API responses to plugin metadata.

File Downloader Improvements

  • Refactored OciAwareFileDownloader to use InputStream directly for HTTP responses, removed redundant request logic, and improved response handling for redirects and authentication, ensuring resources are properly closed and logging is clarified. [1] [2] [3]
  • Updated related test to reflect the new request sequence and authentication flow.

Registry URL Management and Legacy Handling

  • Renamed legacy registry URL constants and introduced a new default registry URL for Nextflow plugins; updated logic to use the new registry by default and clarified support for legacy URLs. [1] [2] [3] [4]

Codebase Cleanup

  • Removed deprecated static attributes related to legacy plugin registry URLs in Plugins.groovy.

Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
@pditommaso pditommaso requested a review from Copilot August 12, 2025 20:15
@netlify
Copy link

netlify bot commented Aug 12, 2025

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 4b82a24
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/689cffbdc216b000084425db

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates Nextflow's plugin registry system to use the new Nextflow Plugin Registry (NPR) API as the default, while maintaining backward compatibility with the legacy registry. The changes introduce a new API dependency and refactor the plugin metadata parsing logic to support the new registry format.

  • Switch default plugin registry from legacy GitHub-based URL to new Nextflow registry API
  • Add NPR API dependency and update plugin metadata parsing logic
  • Maintain backward compatibility by preserving legacy registry support

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
modules/nf-commons/build.gradle Adds npr-api dependency for new plugin registry support
modules/nf-commons/src/main/nextflow/plugin/PluginsFacade.groovy Updates registry URL constants and changes default to new Nextflow registry
modules/nf-commons/src/main/nextflow/plugin/Plugins.groovy Updates deprecated constant to reference legacy registry
modules/nf-commons/src/main/nextflow/plugin/HttpPluginRepository.groovy Refactors plugin metadata parsing to use new NPR API classes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

pditommaso and others added 4 commits August 12, 2025 22:42
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Changed sendRequest0() to return HttpResponse<InputStream> directly, eliminating
the duplicate request pattern where we made a String request for status checking
followed by an InputStream request for actual download.

In the happy path (no redirects/auth), only one HTTP request is made instead of two.
When redirects or authentication are needed, the InputStream is properly closed
before making retry requests.

Updated test expectations to reflect the reduced number of HTTP requests.

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

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>
@pditommaso pditommaso merged commit eaf1048 into master Aug 13, 2025
5 checks passed
@pditommaso pditommaso deleted the default-to-nextflow-reg branch August 13, 2025 21:13
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.

2 participants