Skip to content

[management] add account deleted event #4255

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

Merged
merged 2 commits into from
Jul 30, 2025
Merged

Conversation

crn4
Copy link
Contributor

@crn4 crn4 commented Jul 30, 2025

Describe your changes

we miss account deleted event type - this pr adds it

Issue ticket number and link

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

@Copilot Copilot AI review requested due to automatic review settings July 30, 2025 14:17
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds missing support for tracking account deletion events in the management server. The change introduces a new activity code for account deletion and ensures the event is logged when an account is deleted.

  • Adds AccountDeleted activity code with value 99999
  • Implements event logging in the DeleteAccount method with relevant metadata

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
management/server/activity/codes.go Adds new AccountDeleted activity constant
management/server/account.go Adds event logging call in DeleteAccount method

@@ -174,6 +174,8 @@ const (

AccountLazyConnectionEnabled Activity = 85
AccountLazyConnectionDisabled Activity = 86

AccountDeleted Activity = 99999
Copy link
Preview

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

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

The activity code 99999 appears to be an arbitrary large number that doesn't follow the sequential pattern of other activity codes (85, 86). Consider using the next sequential number (87) to maintain consistency and avoid potential conflicts.

Suggested change
AccountDeleted Activity = 99999
AccountDeleted Activity = 87

Copilot uses AI. Check for mistakes.

@@ -174,6 +174,8 @@ const (

AccountLazyConnectionEnabled Activity = 85
AccountLazyConnectionDisabled Activity = 86

AccountDeleted Activity = 99999
Copy link
Preview

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

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

The new AccountDeleted constant is not added to the activityMap. This will likely cause issues when the activity code needs to be mapped to its corresponding Code structure for logging or display purposes.

Copilot uses AI. Check for mistakes.

pascal-fischer
pascal-fischer previously approved these changes Jul 30, 2025
Copy link

@crn4 crn4 merged commit 541e258 into main Jul 30, 2025
34 of 36 checks passed
@crn4 crn4 deleted the fix/account-deletion-event branch July 30, 2025 14:49
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.

2 participants