Skip to content

Support prefetching plugins metadata from an http api #5887

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

Merged
merged 6 commits into from
May 8, 2025

Conversation

tom-seqera
Copy link
Contributor

@tom-seqera tom-seqera commented Mar 14, 2025

This adds an implementation of p4fj's UpdateRepository which can download plugin metadata from an http api.

It also adds a new interface PrefetchUpdateRepository which extends p4fj's interface to add a prefetch() method. When initialising plugins, Nextflow will call this prefetch method on any UpdateRepository which implements this interface, allowing the repository to optimise how it downloads plugin metadata (for example, only loading metadata for required plugins rather than for all plugins).

Use of the new http update repository can be enabled with the new NXF_PLUGINS_INDEX_URL environment variable. If set, this overrides the default indexUrl location of the plugins.json metadata file. If the supplied url ends in .json then Nextflow will use the existing update repository implementation, otherwise it will use the new http api implementation.

Unless this new env var is set, these changes should have no effect on Nextflow's behaviour.

Copy link

netlify bot commented Mar 14, 2025

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 7e8de18
🔍 Latest deploy log https://app.netlify.com/sites/nextflow-docs-staging/deploys/681c63a27846d00008b997aa

@tom-seqera tom-seqera force-pushed the plugin-metadata-prefetch branch from 71fa033 to db98839 Compare March 17, 2025 14:05
@tom-seqera tom-seqera requested a review from pditommaso March 17, 2025 16:00
Copy link
Member

@pditommaso pditommaso left a comment

Choose a reason for hiding this comment

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

Not major comments apart if I'm not wrong there isnt any unit test for this pre-fetching mechanism ?

@tom-seqera
Copy link
Contributor Author

Added unit tests

Copy link
Member

@pditommaso pditommaso left a comment

Choose a reason for hiding this comment

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

Ok, i've made a couple of minor comments and changes.

@tom-seqera tom-seqera force-pushed the plugin-metadata-prefetch branch from 46f1fac to 920ed83 Compare April 14, 2025 08:03
@tom-seqera
Copy link
Contributor Author

I updated the warning to be clearer that using a custom index is currently experimental. The previous wording suggested that people should only use the main plugin index, but I think people will want the option to have alternative plugin indexes.

@pditommaso
Copy link
Member

Please revert 920ed83, the expected message is the previous commit

@tom-seqera tom-seqera force-pushed the plugin-metadata-prefetch branch from 920ed83 to ee7f4ef Compare April 29, 2025 10:58
@bentsherman bentsherman added this to the 25.04 milestone May 1, 2025
pditommaso added 4 commits May 8, 2025 09:46
Signed-off-by: Paolo Di Tommaso <[email protected]>
Signed-off-by: Paolo Di Tommaso <[email protected]>
Signed-off-by: Paolo Di Tommaso <[email protected]>
@pditommaso pditommaso merged commit 37d433d into master May 8, 2025
35 of 39 checks passed
@pditommaso pditommaso deleted the plugin-metadata-prefetch branch May 8, 2025 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants