Skip to content

fix(PL-6888): argocd struct tags and force conflicts#20

Merged
davidmdm merged 1 commit into
masterfrom
fix/PL-6888/fix-syncPolicy-defaults
Jul 17, 2026
Merged

fix(PL-6888): argocd struct tags and force conflicts#20
davidmdm merged 1 commit into
masterfrom
fix/PL-6888/fix-syncPolicy-defaults

Conversation

@davidmdm

@davidmdm davidmdm commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Applications can enable automated Argo CD sync (with prune and self-heal) when configured.
    • Added an Argo CD resources finalizer to relevant generated applications to improve lifecycle handling.
  • Bug Fixes
    • Improved Argo CD application updates by applying with forced field ownership to resolve conflicts more reliably.
    • Argo CD destination fields now omit empty server/namespace values in generated JSON.
  • Tests
    • Updated reconciliation tests to validate the correct automated sync policy behavior (including enabled vs omitted/disabled cases).

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d5ef7ef0-738a-4032-ae02-1a76227696e5

📥 Commits

Reviewing files that changed from the base of the PR and between aa6a223 and 5a8215b.

📒 Files selected for processing (5)
  • cmd/operator/argocd/application.go
  • cmd/operator/main_test.go
  • cmd/operator/reconciler_catalog.go
  • cmd/operator/reconciler_environment.go
  • cmd/operator/reconciler_release.go

📝 Walkthrough

Walkthrough

Changes

Argo CD sync policy reconciliation

Layer / File(s) Summary
Application policy contract
cmd/operator/argocd/application.go
Destination fields now omit empty values, and SyncPolicy.Automated uses a pointer to distinguish absent and present policies.
Reconciler application updates
cmd/operator/reconciler_catalog.go, cmd/operator/reconciler_environment.go, cmd/operator/reconciler_release.go
Applications configure finalizers and automated sync policies, release sync automation returns nil when disabled, and application applies now set Force: true.
Reconciliation expectations
cmd/operator/main_test.go
Happy-path assertions now expect pointer-based automated sync policies for catalog, staging, and staging-test applications.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ReleaseReconciler
  participant renderReleaseApplication
  participant appIntf
  ReleaseReconciler->>renderReleaseApplication: Evaluate sync.enabled annotation
  renderReleaseApplication-->>ReleaseReconciler: Return automated policy pointer or nil
  ReleaseReconciler->>appIntf: Apply Application with Force true
Loading

Possibly related PRs

Suggested reviewers: silphid

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main changes: Argo CD struct tag updates and forcing conflicts on apply.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/PL-6888/fix-syncPolicy-defaults

Comment @coderabbitai help to get the list of available commands.

@davidmdm
davidmdm force-pushed the fix/PL-6888/fix-syncPolicy-defaults branch from aa6a223 to 5a8215b Compare July 17, 2026 17:42
@davidmdm
davidmdm requested a review from silphid July 17, 2026 17:43
@davidmdm
davidmdm merged commit 0797c6c into master Jul 17, 2026
3 of 4 checks passed
@davidmdm
davidmdm deleted the fix/PL-6888/fix-syncPolicy-defaults branch July 17, 2026 17:43
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