Skip to content

e2e: assert sync status, conditions, and cleanup - #2194

Open
JohnStrunk wants to merge 3 commits into
backube:mainfrom
JohnStrunk:opencode/issue-2188-e2e-sync-status-assertions
Open

JohnStrunk wants to merge 3 commits into
backube:mainfrom
JohnStrunk:opencode/issue-2188-e2e-sync-status-assertions

Conversation

@JohnStrunk

@JohnStrunk JohnStrunk commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes #2188. Adds shared end-to-end assertions for VolSync synchronization status, conditions, and temporary-resource cleanup.

  • Adds roles/verify_sync_status with completion, continuous, and validation-error modes.
  • Integrates the role at 82 sync checkpoints across all 36 playbooks that create ReplicationSources or ReplicationDestinations. The three CR-free utility playbooks remain unchanged.
  • Adds a no-mover ReplicationSource test that checks Synchronizing=False, reason Error, and the expected validation message.
  • Regenerates the upstream/downstream custom-scorecard configs to include the new test.
  • Adds the CR UID cleanup label to mover Job Pod templates so Pod cleanup is verifiable per CR. The role also checks the latest ReplicationDestination image remains present.
  • Documents the continuous-mover exception and upgrade behavior for immutable mover Job templates.

Walkthrough

The shared role checks settled WaitingForManual/WaitingForSchedule success, mover result, timing and schedule status, latest-image existence, and cleanup-labeled PVCs, VolumeSnapshots, Jobs, and Pods. Continuous mode handles always-on Syncthing and untriggered movers without falsely requiring an idle state. Error mode covers a validation failure before a mover starts.

Showboat walkthrough and repeatable syntax-check evidence

Demo: Not applicable; this is test infrastructure and adds no user-facing runtime feature. No live e2e was run because the playbooks require a disposable Kubernetes cluster.

Verification

  • Ansible syntax check passed for all 39 test_*.yml playbooks.
  • Go tests passed for the Restic, Rclone, Rsync, and Rsync-TLS mover packages.
  • Targeted pre-commit checks passed (YAML, Markdown, whitespace, and file formatting).
  • CodeRabbit review of the shared role reported no findings.
  • No cluster was created or mutated; live e2e behavior and timing remain unverified.
  • The proposed no-op reconcile spot check is deferred: there is no status.observedGeneration to prove completion without a fixed, flaky sleep; existing controller tests cover reconcile idempotence.

(AI generated)

@openshift-ci

openshift-ci Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnStrunk

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

The pull request process is described here

Details 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

JohnStrunk and others added 3 commits October 28, 2026 15:34
Add a shared role for status, condition, latest-image, and per-CR temporary-resource checks. Integrate it into all CR-based e2e playbooks and add a no-mover error case.

Signed-off-by: John Strunk <jstrunk@redhat.com>
Co-authored-by: OpenCode - GPT-6 Luna <noreply@opencode.ai>
Regenerate the upstream and downstream scorecard configs to include the new validation-error playbook.

Signed-off-by: John Strunk <jstrunk@redhat.com>
Co-authored-by: OpenCode - GPT-6 Luna <noreply@opencode.ai>
Pass the actual ReplicationDestination name to the shared status role.

Signed-off-by: John Strunk <jstrunk@redhat.com>
Co-authored-by: OpenCode - GPT-6 Luna <noreply@opencode.ai>
@JohnStrunk
JohnStrunk force-pushed the opencode/issue-2188-e2e-sync-status-assertions branch from 636431d to e0091f4 Compare October 28, 2026 19:42
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Oct 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.5%. Comparing base (2602797) to head (e0091f4).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #2194   +/-   ##
=====================================
  Coverage   68.4%   68.5%           
=====================================
  Files         61      61           
  Lines       6213    6217    +4     
=====================================
+ Hits        4255    4259    +4     
  Misses      1636    1636           
  Partials     322     322           
Files with missing lines Coverage Δ
internal/controller/mover/rclone/mover.go 72.2% <100.0%> (+0.1%) ⬆️
internal/controller/mover/restic/mover.go 80.5% <100.0%> (+<0.1%) ⬆️
internal/controller/mover/rsync/mover.go 76.7% <100.0%> (+<0.1%) ⬆️
internal/controller/mover/rsynctls/mover.go 69.9% <100.0%> (+<0.1%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

e2e: assert sync status, conditions, and resource cleanup in existing playbooks

1 participant