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

cleanup: Stop updating ManageConflictErrors for a remote RSync #1538

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Camila-B
Copy link
Contributor

@Camila-B Camila-B commented Feb 4, 2025

@Camila-B Camila-B requested a review from sdowell February 4, 2025 21:31
Copy link

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

I am currently reviewing this pull request. In the meanwhile, I am providing a summary of the content of the pull request for you and other reviewers to get up to speed quickly on the changes that have occurred, and the intent behind these changes.

Summary

This pull request addresses issue #1342 and b/355301118. The primary goal is to remove the requirement to report conflict errors to the remote manager in the reconciler when dealing with a RootSync. This change simplifies the error reporting mechanism and avoids unnecessary updates.

Changes

The following files were modified:

  • pkg/parse/root_sync_client.go
    • The function prependRootSyncRemediatorStatus (lines 596-643) was removed. This function was responsible for adding conflict errors detected by the remediator to the front of the sync errors in the RootSync status.
  • pkg/parse/root_sync_client_test.go
    • The import statements for context, github.com/stretchr/testify/require, kpt.dev/configsync/pkg/applier, kpt.dev/configsync/pkg/core, kpt.dev/configsync/pkg/core/k8sobjects, kpt.dev/configsync/pkg/metadata, kpt.dev/configsync/pkg/rootsync, kpt.dev/configsync/pkg/status, kpt.dev/configsync/pkg/syncer/syncertest/fake, and sigs.k8s.io/cli-utils/pkg/testutil were removed (lines 18-32).
    • The test function TestPrependRootSyncRemediatorStatus (lines 464-577) was removed, as it tested the functionality of the now-removed prependRootSyncRemediatorStatus function.
  • pkg/parse/run.go
    • The import statement for kpt.dev/configsync/pkg/declared was removed (line 29).
    • The call to reportRootSyncConflicts (lines 547-550) within the setSyncStatus function was removed.
    • The function reportRootSyncConflicts (lines 636-665) was removed. This function was responsible for reporting conflicts to the RootSync that manages the conflicting resources.

In summary, this PR removes the logic for reporting conflict errors to the remote manager for RootSyncs, along with associated tests and dependencies.


Code conflicts arise,
RootSync's errors now subside,
A cleaner sync flows.

Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from camila-b. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

This pull request removes the prependRootSyncRemediatorStatus function and related logic, which was responsible for reporting conflict errors to the remote manager in the reconciler when it's a RootSync. The change is motivated by issue #1342 and aims to address b/355301118. Overall, the changes seem reasonable and well-targeted.

@tiffanny29631
Copy link
Contributor

/lgtm

Karl might have more context on this.

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