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

Implement the Delete handler for the datasource service #5062

Merged
merged 3 commits into from
Nov 27, 2024

Conversation

rdimitrov
Copy link
Member

Summary

The following PR implements the delete handler for the datasource service.

Fixes: #5045

Change Type

Mark the type of change your PR introduces:

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

Outline how the changes were tested, including steps to reproduce and any relevant configurations.
Attach screenshots if helpful.

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

@rdimitrov rdimitrov requested a review from a team as a code owner November 27, 2024 08:47
@rdimitrov rdimitrov self-assigned this Nov 27, 2024
@coveralls
Copy link

coveralls commented Nov 27, 2024

Coverage Status

coverage: 54.712% (+0.05%) from 54.662%
when pulling 38d481e on delete-datasource
into 2b44edb on main.

defer func(stx serviceTX) {
err := stx.Rollback()
if err != nil {
fmt.Printf("failed to rollback transaction: %v", err)
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 not use fmt.Printf, you can build a zerologger from the context.Context instance.

... Aaaaaand I just realized I missed this in another review. @teodor-yanev can you submit a fix for the Create function?

Copy link
Member Author

Choose a reason for hiding this comment

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

oh, hahaha, copy pasta! I can fix both here, thanks!

Copy link
Contributor

@JAORMX JAORMX left a comment

Choose a reason for hiding this comment

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

Mostly LGTM, let's add some tests.

@rdimitrov
Copy link
Member Author

Mostly LGTM, let's add some tests.

Great, I was in the process of writing the tests but opened the PR first to get the feedback, thanks! 👍

Signed-off-by: Radoslav Dimitrov <[email protected]>
@rdimitrov rdimitrov requested a review from JAORMX November 27, 2024 09:41
Copy link
Contributor

@teodor-yanev teodor-yanev 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 logging in Create as well

@rdimitrov rdimitrov merged commit 135cf2f into main Nov 27, 2024
25 checks passed
@rdimitrov rdimitrov deleted the delete-datasource branch November 27, 2024 10:16
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.

data source service: Implement Delete function
4 participants