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

refactor: changed transaction handling related to Push package #1481

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

kakcy
Copy link
Contributor

@kakcy kakcy commented Jan 27, 2025

This pull request includes significant changes to the pkg/push/api/api.go file to refactor transaction handling and improve the push storage mechanism. The main changes involve replacing the old transaction methods with a new version and updating the push storage usage across various functions. Additionally, the test cases in pkg/push/api/api_test.go have been updated to reflect these changes.

Refactoring transaction handling and push storage:

  • pkg/push/api/api.go: Replaced the old transaction handling methods with RunInTransactionV2 and updated the usage of pushStorage across multiple functions such as CreatePush, UpdatePush, DeletePush, and GetPush. [1] [2] [3] [4] [5] [6] [7]

Updating test cases:

  • pkg/push/api/api_test.go: Modified the test cases to use the mock pushStorage and the new transaction handling method RunInTransactionV2. This includes changes in functions like TestCreatePushMySQL, TestCreatePushNoCommandMySQL, and TestUpdatePushMySQL. [1] [2] [3] [4] [5] [6] [7] [8]

Part of #1474

@kakcy kakcy marked this pull request as ready for review January 27, 2025 04:31
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.

1 participant