[VIRTS-4149] Have server handle both stdout and stderr in link results#2662
Merged
Conversation
5 tasks
3 tasks
Contributor
|
Blocked by: #2668 |
argaudreau
previously approved these changes
Oct 10, 2022
|
SonarCloud Quality Gate failed. |
1fdbb40 to
06fdcf1
Compare
…as dict; includes backwards compatibility for old result readers and old output files
…xception handler to file_svc; minor contact_svc update
06fdcf1 to
04f98bd
Compare
…cleaner dict() to create dictionaries
|
Kudos, SonarCloud Quality Gate passed! |
4 tasks
mchan143
approved these changes
Oct 18, 2022
Contributor
|
@elegantmoose should be all set to merge this one whenever you're ready! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.










Description
This PR allows the server to handle both stdout and stderr from an agent. The primary change is that result files will be written as a dictionary, i.e., { stdout: '', stderr: ''}. Thus, when different readers request result output (e.g., the API, reports, or plugins) they will now receive a dictionary. Core CALDERA functionality has been updated in this PR to account for these changes (e.g., reports will generate properly, the UI will display results properly), but any non-CALDERA users of APIs/reports or any custom plugins may be effected.
The PR accounts for old result files, and constructs a dictionary with the old results as "stdout".
Any agents that only send output will have their data stored in stdout, regardless of the origination. An associated PR for Sandcat will be made in conjunction to this one which will return both stdout and stderr from commands. However, stderr from other agents will appear as stdout. Note that the link result itself is NOT effected, and will still show an error even on other agents.
Type of change
How Has This Been Tested?
Tested with Sandcat/Manx, old result files, and new result files. Generated every type of report. Tested with stdout, stderr, and both. Automated test suites run successfully (with updates to account for the dict).
Checklist: