Skip to content
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

Added RunTimeLimit option and runner code to strip profiles metadata #3697

Merged
merged 2 commits into from
May 18, 2020

Conversation

alexpop
Copy link
Contributor

@alexpop alexpop commented May 15, 2020

This is the Automate equivalent change for this audit cookbook report reducing approach: chef-boneyard/audit#418

It will strip profile metadata from reports when the compliance-profile index already has the metadata.

Signed-off-by: Alex Pop <apop@chef.io>

Add unit tests for metadata strip

Signed-off-by: Alex Pop <apop@chef.io>
@alexpop alexpop requested a review from a team May 15, 2020 18:42
Copy link
Contributor

@rickmarry rickmarry left a comment

Choose a reason for hiding this comment

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

thanks @alexpop!

}
stripProfilesMetadata(&report, profilesMissingMeta, RunTimeLimit)

_, err = t.ingestClient.ProcessComplianceReport(ctx, &report)
Copy link
Contributor

Choose a reason for hiding this comment

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

nice!

@@ -34,6 +34,7 @@ var conf = config.Compliance{
TmpDir: os.Getenv("TMPDIR"),
ResultMessageLimit: 10000,
ControlResultsLimit: 50,
RunTimeLimit: 1.0,
Copy link
Contributor

Choose a reason for hiding this comment

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

should we have a comment on this to document the unit of time? min? seconds?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, will put a comment and will mention it in the runFlags description.

Signed-off-by: Alex Pop <apop@chef.io>
@alexpop alexpop merged commit fa94432 into master May 18, 2020
@chef-expeditor chef-expeditor bot deleted the ap/metadata-strip branch May 18, 2020 18:43
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.

2 participants