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

Fix #3080: Activity Feed: Blank feed on my-data page for updating user's role or team #3131

Merged
merged 2 commits into from Mar 4, 2022

Conversation

vivekratnavel
Copy link
Contributor

Describe your changes :

See #3080

Type of change :

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my own.
  • I have tagged my reviewers below.
  • I have commented on my code, particularly in hard-to-understand areas.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • All new and existing tests passed.

Reviewers

for (var thread : threads) {
feedDao.create(thread);
// Skip creating threads for user or team related changes for now
if (!Entity.USER.equals(changeEvent.getEntityType()) && !Entity.TEAM.equals(changeEvent.getEntityType())) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we maintain a list of entities in Entity.java that we can grab with shouldDisplayEntityChangeOnFeed or something similar?

We need to avoid user, team, role, bot, policy

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good. I will work on updating the patch.

@sonarcloud
Copy link

sonarcloud bot commented Mar 4, 2022

[catalog] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

100.0% 100.0% Coverage
0.0% 0.0% Duplication

//
// List of entities whose changes should not be published to the Activity Feed
//
public static final List<String> ACTIVITY_FEED_EXCLUDED_ENTITIES = List.of(USER, TEAM, ROLE, POLICY, BOTS);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor: this could be a Set/HashSet

@sonarcloud
Copy link

sonarcloud bot commented Mar 4, 2022

[open-metadata-ingestion] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@vivekratnavel
Copy link
Contributor Author

Test failure is not related

2022-03-04T03:01:20.4128731Z [ERROR] Failures: 
2022-03-04T03:01:20.4158135Z [ERROR]   WebhookResourceTest.put_updateEndpointURL:180->EntityResourceTest.deleteEntity:1414->EntityResourceTest.deleteEntity:1424 Expected org.apache.http.client.HttpResponseException to be thrown, but nothing was thrown.

@vivekratnavel vivekratnavel merged commit bddb16e into open-metadata:main Mar 4, 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.

None yet

2 participants