Skip to content

Fix plugin install command by adding missing prefetch metadata call#6396

Merged
pditommaso merged 1 commit intomasterfrom
add-prefetch-metadata-test
Sep 10, 2025
Merged

Fix plugin install command by adding missing prefetch metadata call#6396
pditommaso merged 1 commit intomasterfrom
add-prefetch-metadata-test

Conversation

@pditommaso
Copy link
Member

Summary

Fixes the broken plugin install command by adding the missing prefetchMetadata() call in the pullPlugins method.

Problem

The plugin install command was broken because it wasn't calling prefetchMetadata() before processing plugins, which is required for repositories that implement PrefetchUpdateRepository to properly initialize their metadata.

Solution

  • Added prefetchMetadata(specs) call in PluginUpdater.pullPlugins() method before processing individual plugins
  • This ensures repositories can perform necessary data-loading optimizations before plugin operations

Changes

  • Fix: Added missing prefetchMetadata(specs) call in pullPlugins() method (PluginUpdater.groovy:189)
  • Test: Added comprehensive test to verify the fix works correctly and prevent regression

Test Coverage

The new test should prefetch plugin metadata when pulling plugins verifies:

  • prefetchMetadata() is called on repositories implementing PrefetchUpdateRepository
  • ✅ Correct PluginSpec objects are passed to the prefetch method
  • ✅ Prefetch happens before individual plugin processing
  • ✅ No regressions in existing functionality (all 18/18 tests pass)

This fix ensures the plugin install command works properly with all repository types, especially those requiring metadata prefetching for optimal performance.

🤖 Generated with Claude Code

This commit adds a comprehensive test to verify that the prefetchMetadata()
method is called correctly when pulling plugins. The test ensures that:

- prefetchMetadata() is called on repositories implementing PrefetchUpdateRepository
- The correct PluginSpec objects are passed to prefetchMetadata()
- The method is called before individual plugin processing

The test uses Spock Framework with appropriate mocking to isolate the
functionality being tested while following existing test patterns in the codebase.

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

Co-Authored-By: Claude <noreply@anthropic.com>
@netlify
Copy link

netlify bot commented Sep 10, 2025

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 1a5e2f6
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/68c18a1e1874960008da3aa3

@pditommaso pditommaso merged commit a5c19b8 into master Sep 10, 2025
23 checks passed
@pditommaso pditommaso deleted the add-prefetch-metadata-test branch September 10, 2025 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants