-
Notifications
You must be signed in to change notification settings - Fork 345
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
Prints all plugins when invoking sonobuoy results
by default
#909
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,10 @@ const ( | |
defaultNodesFile = "Nodes.json" | ||
defaultServerVersionFile = "serverversion.json" | ||
defaultServerGroupsFile = "servergroups.json" | ||
|
||
// InfoFile contains data not that isn't strictly in another location | ||
// but still relevent to post-processing or understanding the run in some way. | ||
InfoFile = "info.json" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given that a method is provided to return the info file path, does it need to be exported? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So you raise a good question which I definitley touched on when coding this: who is in charge of what information and what is the right way to grab it? A few different packages hardcode these string values (results.json, errors.json, results/, etc), some of the values here are exported, some arent. Some have methods to return their values, some dont. I'm going to make a new ticket specifically for fixing this up and clarifying where to find all the results structure (folders/names/etc) and how to use them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TIL: there is a quick 'Reference comment in new issue' button which will create a new issue with the comment body. |
||
) | ||
|
||
// Versions corresponding to Kubernetes minor version values. We used to | ||
|
@@ -323,6 +327,13 @@ func ConfigFile(version string) string { | |
} | ||
} | ||
|
||
// RunInfoFile returns the path to the Sonobuoy RunInfo file which is extra metadata about the run. | ||
// This was added in v0.16.1. The function will return the same string even for earlier | ||
// versions where that file does not exist. | ||
func (r *Reader) RunInfoFile() string { | ||
return path.Join(metadataDir, InfoFile) | ||
} | ||
|
||
// PluginResultsItem returns the results file from the given plugin if found, error otherwise. | ||
func (r *Reader) PluginResultsItem(plugin string) (*Item, error) { | ||
resultObj := &Item{} | ||
|
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.
Also, FYI, this was inappropriate to use here. The values
--plugin -p
were ok, but the description of the flags meaning was specific to thesonobuoy images
command.