Skip to content

feat: add audit_last_run_end_time metric#2235

Merged
maxsmythe merged 3 commits into
open-policy-agent:masterfrom
stek29:audit-run-end-time
Aug 23, 2022
Merged

feat: add audit_last_run_end_time metric#2235
maxsmythe merged 3 commits into
open-policy-agent:masterfrom
stek29:audit-run-end-time

Conversation

@stek29
Copy link
Copy Markdown
Contributor

@stek29 stek29 commented Aug 21, 2022

What this PR does / why we need it:
It adds a new metric to track last finishing time for audit runs, to ensure that audit runs do actually finish.
It also updates description of existing metric to note that it only shows time when audit has started, and not when audit has finished.

See #2197 for more info.

@stek29
Copy link
Copy Markdown
Contributor Author

stek29 commented Aug 21, 2022

I haven't touched versioned website docs – not sure if they should be updated yet.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 21, 2022

Codecov Report

Merging #2235 (4a0bdc2) into master (8f6d95a) will increase coverage by 0.18%.
The diff coverage is 61.90%.

❗ Current head 4a0bdc2 differs from pull request most recent head b5acc5b. Consider uploading reports for the commit b5acc5b to get more accurate results

@@            Coverage Diff             @@
##           master    #2235      +/-   ##
==========================================
+ Coverage   54.34%   54.52%   +0.18%     
==========================================
  Files         111      111              
  Lines        9538     9553      +15     
==========================================
+ Hits         5183     5209      +26     
+ Misses       3954     3948       -6     
+ Partials      401      396       -5     
Flag Coverage Δ
unittests 54.52% <61.90%> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/audit/manager.go 0.00% <0.00%> (ø)
pkg/audit/stats_reporter.go 76.66% <81.25%> (-0.89%) ⬇️
pkg/readiness/object_tracker.go 83.98% <0.00%> (+1.06%) ⬆️
...onstrainttemplate/constrainttemplate_controller.go 59.71% <0.00%> (+3.59%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Comment thread website/docs/audit.md Outdated
Comment thread website/docs/audit.md Outdated
@ritazh
Copy link
Copy Markdown
Member

ritazh commented Aug 22, 2022

I haven't touched versioned website docs – not sure if they should be updated yet.

You don't need to update the versioned website docs since this update will only be available after v3.10 is released.

@stek29
Copy link
Copy Markdown
Contributor Author

stek29 commented Aug 22, 2022

@ritazh it might make sense to update versioned docs to update description of gatekeeper_audit_last_run_time since it’s inaccurate.

@stek29 stek29 force-pushed the audit-run-end-time branch 4 times, most recently from 4a0bdc2 to b5acc5b Compare August 22, 2022 22:09
@stek29
Copy link
Copy Markdown
Contributor Author

stek29 commented Aug 22, 2022

@ritazh I've updated description in older versioned docs, but I can remove those changes if you'd prefer me to

Comment thread website/versioned_docs/version-v3.7.x/audit.md Outdated
@stek29 stek29 force-pushed the audit-run-end-time branch from b5acc5b to 8373b28 Compare August 23, 2022 15:05
stek29 added 2 commits August 23, 2022 18:06
Signed-off-by: Viktor Oreshkin <imselfish@stek29.rocks>
clarify gatekeeper_audit_last_run_time metric description in versioned
website docs

Signed-off-by: Viktor Oreshkin <imselfish@stek29.rocks>
@stek29 stek29 force-pushed the audit-run-end-time branch from 8373b28 to 45eaac1 Compare August 23, 2022 15:06
Copy link
Copy Markdown
Member

@ritazh ritazh left a comment

Choose a reason for hiding this comment

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

LGTM

@ritazh ritazh requested a review from maxsmythe August 23, 2022 21:16
Copy link
Copy Markdown
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

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

LGTM

@maxsmythe maxsmythe merged commit 39ca02e into open-policy-agent:master Aug 23, 2022
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.

4 participants