Skip to content
This repository has been archived by the owner on Jul 22, 2021. It is now read-only.

NIFIREG-234: Publish events for tenant CRUD #161

Closed
wants to merge 2 commits into from

Conversation

brosander
Copy link
Contributor

No description provided.

@brosander brosander closed this Mar 11, 2019
@brosander brosander reopened this Mar 11, 2019
@brosander brosander closed this Mar 11, 2019
@brosander brosander reopened this Mar 11, 2019
@brosander brosander closed this Mar 11, 2019
@brosander brosander reopened this Mar 11, 2019
@kevdoran
Copy link
Contributor

Thanks for the contribution, @brosander. Will review...

@brosander
Copy link
Contributor Author

Thanks @kevdoran it seems like there are sporadic failures around some of the tests, that's why all the close/reopen, my other pr had seemingly unrelated test failures as well...

@brosander
Copy link
Contributor Author

brosander commented Mar 11, 2019

Ex:

https://travis-ci.org/apache/nifi-registry/jobs/504770097

No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
The build has been terminated

During install of the assembly

@brosander brosander closed this Mar 11, 2019
@brosander brosander reopened this Mar 11, 2019
Copy link
Contributor

@kevdoran kevdoran left a comment

Choose a reason for hiding this comment

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

I had a chance to pull this down and test it today. It is a nice addition of Event instrumentation for tenants. I had a couple minor comments that I am interested in other people's opinion on.

public static Event userCreated(final User user) {
return new StandardEvent.Builder()
.eventType(EventType.CREATE_USER)
.addField(EventFieldName.USER, user.getIdentity())
Copy link
Contributor

Choose a reason for hiding this comment

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

Tenant Events should probably have the identifier field as well.

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 add

COMMENT;

USER_GROUP,
COMMENT
Copy link
Contributor

Choose a reason for hiding this comment

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

I'n not sure we should reuse the EventFieldName.USER for the the user that was created. In other contexts it indicates the user that performed the operation (speaking of which, maybe we want that information for tenant CRUD events?)

I would suggest adding new EventFieldNames that align with the the tenant data model, such as TENANT_ID and TENANT_IDENTITY that can be used for all tenant types, or if we want to break it down into users and groups, USER_ID, USER_IDENTITY, USER_GROUP_ID, USER_GROUP_IDENTITY. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think USER_ID, USER_IDENTITY, USER_GROUP_ID, USER_GROUP_IDENTITY more closely matches the terminology in object, methods of the tenant resource but don't have very strong feelings either way.

@brosander
Copy link
Contributor Author

@kevdoran I think I've addressed the feedback, please let me know if I've missed anything or if further changes are needed

Copy link
Contributor

@kevdoran kevdoran left a comment

Choose a reason for hiding this comment

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

Thanks for making those changes, @brosander. +1, merging to master

@kevdoran kevdoran closed this in 563bfed Mar 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants