Skip to content

[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

Merged
merged 2 commits into from
Jul 17, 2025
Merged

[Feature] Compact Action #1936

merged 2 commits into from
Jul 17, 2025

Conversation

ajanikow
Copy link
Collaborator

No description provided.

@cla-bot cla-bot bot added the cla-signed label Jul 14, 2025
@ajanikow ajanikow requested a review from Copilot July 14, 2025 12:55
Copilot

This comment was marked as outdated.

@ajanikow ajanikow force-pushed the feature/compact_action branch from 0ed0d38 to c681e55 Compare July 14, 2025 13:01
@ajanikow ajanikow requested a review from Copilot July 17, 2025 09:17
Copy link

@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

Introduces a new CompactMember action to compact DBServer storage, registers it across the codebase, and adds client support and tests.

  • Implements actionCompactMember with Start and CheckProgress
  • 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 and Compact 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 {
Copy link
Preview

Copilot AI Jul 17, 2025

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.

@ajanikow ajanikow merged commit 325d5e9 into master Jul 17, 2025
3 checks passed
@ajanikow ajanikow deleted the feature/compact_action branch July 17, 2025 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants