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 #3124: Activity Feed: Add support for deleting a post #3161

Merged
merged 4 commits into from Mar 7, 2022

Conversation

vivekratnavel
Copy link
Contributor

Describe your changes :

See #3124

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

@github-actions
Copy link

github-actions bot commented Mar 4, 2022

Schema Change Detected. Needs ingestion-core version bump

Please run make core_bump_version_dev in the project's root and commit the changes to _version.py in this PR. Please ignore if this has been handled already.

},
"from": {
"description": "Name of the User posting the message",
"type": "string"
Copy link
Collaborator

Choose a reason for hiding this comment

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

If all users are in OpenMetadata internal db, should we use user id?

Copy link
Contributor

@sureshms sureshms Mar 5, 2022

Choose a reason for hiding this comment

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

Actually not. Let's keep them as user names which are supposed to be unique and human readable. One reason why to use UUID is to identify an instance of an entity uniquely (entity with same name can be created and hence name might not be unique) and when permanent links are needed.

Copy link
Collaborator

@harshach harshach left a comment

Choose a reason for hiding this comment

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

Lets not merge the delete part before we make the permission checks to authorizer

@vivekratnavel
Copy link
Contributor Author

@mithmatt @harshach Thank you for the reviews and feedback. I have delegated the authorization logic to the AuthZ.

I will continue to work on converting the type of post.from and thread.createdBy to UUID. Then, the createPost will only require a message and we will populate post.from as id of the logged in user (securityContext.getUserPrincipal().getName()).

@sonarcloud
Copy link

sonarcloud bot commented Mar 5, 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 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@sonarcloud
Copy link

sonarcloud bot commented Mar 5, 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 13 Code Smells

96.6% 96.6% Coverage
0.0% 0.0% Duplication

Copy link
Collaborator

@mithmatt mithmatt 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 addressing the review feedback @vivekratnavel

@harshach harshach merged commit 314013c into open-metadata:main Mar 7, 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

4 participants