sample plugins: reduce code duplication across the sample plugins hosted in the core NRI repo.
- Dominant language
- Go
- Stars
- 406
- Forks
- 102
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 8
Description
We host a set of sample and/or simple plugins in the core NRI repository, under the `plugins` directory tree. As the number of plugins slowly grows, there is an increasing amount of code duplication across these plugins. Most of it simply aims to keep some plugin-neutral NRI-specific aspects of the plugins identical, such as command line options for providing the plugin's identity, the possibility to override the default NRI socket location, etc. This is becoming error prone over time, and makes the plugins prone to divergence wrt. command line options and possibly other behavioral aspects which are supposed to be common but are not implemented by shared code.
The sample plugins should be refactored, distilling out common bits to a single shared code base then reimporting it to each plugin. Candidates for the shared location are `plugins/common`, or the already existing `pkg/plugins`.
See https://github.com/containerd/nri/pull/249#pullrequestreview-3548066716 for the original related comment and possible follow-up discussion.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by comparing the sample plugins under the `plugins` directory tree and review the related discussion in pull request #249. Evaluate `plugins/common` and `pkg/plugins` as shared-code locations, then confirm that the plugins use the shared implementation for common NRI-specific behavior without diverging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100