-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
feat(controller): Add audit logs to workflows. Fixes #1769 #1930
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1930 +/- ##
=========================================
- Coverage 9.02% 8.89% -0.14%
=========================================
Files 53 61 +8
Lines 33698 34083 +385
=========================================
- Hits 3042 3030 -12
- Misses 30267 30662 +395
- Partials 389 391 +2
Continue to review full report at Codecov.
|
a89409b
to
3c1fbb2
Compare
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 looking really good so far. I've added a few comments, but I think they're mostly minor.
manifests/cluster-install/workflow-controller-rbac/workflow-controller-clusterrole.yaml
Outdated
Show resolved
Hide resolved
templates: | ||
- name: exit | ||
container: | ||
image: docker/whalesay:latest |
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.
thank you for using this image - makes for faster tests
@@ -67,6 +70,23 @@ func (t *Then) ExpectWorkflowList(listOptions metav1.ListOptions, block func(t * | |||
return t | |||
} | |||
|
|||
func (t *Then) ExpectAuditEvents(block func(*testing.T, *apiv1.EventList)) *Then { |
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.
nice
@@ -93,6 +97,69 @@ func (s *FunctionalSuite) TestFastFailOnPodTermination() { | |||
}) | |||
} | |||
|
|||
func (s *FunctionalSuite) TestEventOnNodeFail() { |
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.
might be good to state what this test is meant to do
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.
OK. I think you need to do just one more thing before we merge, run make lint
. The CI listing is currently broken on master
@alexec I just ran it and nothing happened. My golangci-lint version is
This is the output:
|
Merged! This will be in v2.5 |
Thanks @alexec ! :) |
Checklist:
"fix(controller): Updates such and such. Fixes #1234"
. Why? for the release notes.I pretty much ported the argo-cd implementation in https://github.com/argoproj/argo-cd/blob/0675ff2fb25fe97856171230f150e6ba5a2563d5/util/argo/audit_logger.go