-
Notifications
You must be signed in to change notification settings - Fork 73
[Feature] Compact Action #1936
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
[Feature] Compact Action #1936
Conversation
0ed0d38
to
c681e55
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Introduces a new CompactMember action to compact DBServer storage, registers it across the codebase, and adds client support and tests.
- Implements
actionCompactMember
withStart
andCheckProgress
- Adds
client.Compact
API and updates the client interface - Registers the new action in generated code, YAML, and updates the changelog
Reviewed Changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
pkg/deployment/reconcile/plan_builder_test.go | Standardized receiver name for GetServerAsyncClient |
pkg/deployment/reconcile/action_compact_member.go | New CompactMember action implementation |
pkg/deployment/reconcile/action_backup_restore.go | Switched to shared LocalJobID constant |
pkg/deployment/reconcile/action.register.generated_test.go | Added tests for CompactMember existence and flags |
pkg/deployment/reconcile/action.register.generated.go | Registered CompactMember action in the registry |
pkg/deployment/reconcile/action.go | Introduced LocalJobID constant |
pkg/deployment/client/compact.go | Created CompactRequest type and Compact method |
pkg/deployment/client/client.go | Extended Client interface with Compact |
pkg/apis/deployment/v2alpha1/actions.generated.go | Added ActionCompactMember definitions and defaults |
pkg/apis/deployment/v1/actions.generated.go | Added ActionCompactMember definitions and defaults |
internal/actions.yaml | Declared CompactMember metadata |
CHANGELOG.md | Added entry for Compact Action |
Comments suppressed due to low confidence (2)
pkg/deployment/client/compact.go:28
- Public types and methods in this file lack GoDoc comments. Add documentation above
CompactRequest
andCompact
to describe their purpose, parameters, and behavior.
type CompactRequest struct {
pkg/deployment/client/compact.go:35
- There are no unit tests for the new
Compact
method. Consider adding tests to verify the HTTP request URL, JSON body serialization, and response status handling.
func (c *client) Compact(ctx context.Context, request *CompactRequest) error {
return false, errors.Errorf("expecting member to be present in list, but it is not") | ||
} | ||
|
||
switch g { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider adding a default
case for the switch on server group g
to explicitly handle or log any unsupported groups, improving future clarity.
Copilot uses AI. Check for mistakes.
No description provided.