Skip to content

Update outdated plugin JSON files automatically when a plugin version is not available#356

Merged
nvnieuwk merged 1 commit intoaskimed:mainfrom
nvnieuwk:automatic/plugin-update
Mar 17, 2026
Merged

Update outdated plugin JSON files automatically when a plugin version is not available#356
nvnieuwk merged 1 commit intoaskimed:mainfrom
nvnieuwk:automatic/plugin-update

Conversation

@nvnieuwk
Copy link
Collaborator

@nvnieuwk nvnieuwk commented Mar 17, 2026

This PR updates the PluginRepository code to automatically download the latest plugins JSON files whenever a version or plugin is missing from the cached file. Due to this change people won't have to run nf-test update-plugins anymore when updating plugin versions in the config.

I tested the following cases:

An existing plugin is missing from the JSON

=> The JSON file gets pulled again and finds the plugin in it, tests start like expected

An existing version of a plugin is missing from the JSON

=> Same outcome as the last case

An unknown plugin is specified

=> The cache gets updated but the tests won't start and throw this error: Plugin'nft-unknown' not found.

A non-existing version is specified

=> The cache gets updated but the tests won't start and throw this error: Plugin'nft-bam' found, but version 0.9.0 not found.

Copy link
Collaborator

@maxulysse maxulysse left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@lukfor lukfor left a comment

Choose a reason for hiding this comment

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

perfect! this helps a lot

@nvnieuwk
Copy link
Collaborator Author

Thank you for the quick review!!

@nvnieuwk nvnieuwk merged commit 8eff31d into askimed:main Mar 17, 2026
8 checks passed
@nvnieuwk nvnieuwk deleted the automatic/plugin-update branch March 17, 2026 13:04
@lukfor
Copy link
Collaborator

lukfor commented Mar 17, 2026

Thank you for the quick review!!

You work like a machine Nicolas!! Thanks!

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.

Automatically fetch newer plugin versions when cache has not been found locally

3 participants