-
Notifications
You must be signed in to change notification settings - Fork 348
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
Remove plugin.Definition #810
Conversation
ResultType string `json:"result-type"` | ||
|
||
// SkipCleanup informs Sonobuoy to leave the pods created for this plugin running, | ||
// after the run completes instead of deleting them as part of default, cleanup behavior. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comments here since I had started adding them on the plugin.Definition in my other branch related to #306
@@ -235,7 +235,7 @@ func TestFilterList(t *testing.T) { | |||
{Name: "test3"}, | |||
} | |||
|
|||
expected := []*manifest.Manifest{definitions[0]} | |||
expected := []manifest.Manifest{definitions[0]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a bunch of situations, we were using pointers when I don't think it was necessary (and we had gone from a non-pointer plugin.Definition to a pointer to a manifest.Manifest).
@@ -62,16 +61,6 @@ type Interface interface { | |||
SkipCleanup() bool | |||
} | |||
|
|||
// Definition defines a plugin's features, method of launch, and other | |||
// metadata about it. | |||
type Definition struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main thing I just removed here; it is just a flattened version of the manifest.Manifest
except it doesnt have the Driver
field. It leads to us having an extra layer to transfer data through and doesn't provide any clear benefit.
The type plugin.Definition completely duplicates fields that exist inside of manifest.Manifest and adds nothing new. Though I prefer the name plugin.Definition, the users currently use the manifest.Manifest object locally and expect the nested sonobuoy-config object so we needed to keep that in order to not break existing plugins. In addition, the plugin.Definition type was missing the Driver field, so the server was actually losing that data when using that type. This change should have no impact other than clarifying the landscape of types on the backend. Helps facilitate #306 Signed-off-by: John Schnake <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #810 +/- ##
==========================================
+ Coverage 43.24% 43.28% +0.03%
==========================================
Files 71 71
Lines 4257 4251 -6
==========================================
- Hits 1841 1840 -1
+ Misses 2307 2304 -3
+ Partials 109 107 -2
Continue to review full report at Codecov.
|
What this PR does / why we need it:
The type plugin.Definition completely duplicates fields that exist
inside of manifest.Manifest and adds nothing new. Though I prefer
the name plugin.Definition, the users currently use the manifest.Manifest
object locally and expect the nested sonobuoy-config object so we
needed to keep that in order to not break existing plugins. In addition,
the plugin.Definition type was missing the Driver field, so the server
was actually losing that data when using that type.
This change should have no impact other than clarifying the landscape
of types on the backend.
Which issue(s) this PR fixes
Helps facilitate #306
Release note: