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

(feat) Allow sending of only aspect-specific audit events. #141

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sacsar
Copy link
Contributor

@sacsar sacsar commented Dec 17, 2021

We add an emitGeneralAuditEvents field to BaseLocalDAO which enables
the sending of the general all-aspect audit events to be disabled,
assuming that aspect-specific events are enabled.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable)

We add an `emitGeneralAuditEvents` field to BaseLocalDAO which enables
the sending of the general all-aspect audit events to be disabled,
assuming that aspect-specific events are enabled.
/**
* Enables or disables the emission of general audit events.
*/
public void enableGeneralAuditEvent(boolean generalAuditEventEnabled) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this method public? If it's public then what is the difference between this method and setEmitGeneralAuditEvent ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No difference :) I was trying to be consistent in the naming and it turned out it wasn't possible--there's enableModelValidationOnWrite, but setEmitAspectSpecificAuditEvent. I thought enableGeneralAuditEvent was the "better" name, but added the other for symmetry with setEmitAspectSpecificAuditEvent. I can delete one or the other or, if you think enableFoo is the way forward, mark the setFoo one as deprecated and note that it just routes to enableFoo.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's just stick with one method, enableGeneralAuditEvent sounds good to me.

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.

3 participants