Skip to content

Conversation

@LucasMrqes
Copy link
Collaborator

@LucasMrqes LucasMrqes commented Feb 28, 2025

This implements Sync Windows to burrito, strongly inspired by ArgoCD's Sync Windows.
Sync Windows enables the user to specify windows during which layers will never by planned or applied (deny windows), or to only plan (or apply) layers during specific windows (allow windows)

@github-project-automation github-project-automation bot moved this to 📋 Backlog in burrito Feb 28, 2025
@codecov-commenter
Copy link

codecov-commenter commented Feb 28, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 97.01493% with 2 lines in your changes missing coverage. Please review.

Project coverage is 44.50%. Comparing base (06834f4) to head (1902e7d).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
internal/utils/syncwindow/syncwindow.go 96.36% 1 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #531      +/-   ##
==========================================
+ Coverage   43.81%   44.50%   +0.69%     
==========================================
  Files          78       79       +1     
  Lines        5571     5644      +73     
==========================================
+ Hits         2441     2512      +71     
- Misses       2922     2923       +1     
- Partials      208      209       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@LucasMrqes LucasMrqes requested a review from Copilot March 28, 2025 13:02
Copy link
Contributor

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

This PR implements the sync windows feature for Burrito, allowing users to restrict or permit layer operations (plan/apply) based on defined time windows. The key changes include:

  • Adding sync window definitions in manifests, CRDs, and configuration files.
  • Implementing sync window logic and tests in the internal syncwindow package and controllers.
  • Updating documentation and Helm charts to support and explain the new sync windows feature.

Reviewed Changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated no comments.

Show a summary per file
File Description
mkdocs.yml Added navigation entry for sync windows documentation (note a typo in the filename).
manifests/install.yaml Added syncWindows field supporting type definitions for cron schedule, duration, layers, and actions.
manifests/crds/config.terraform.padok.cloud_terraformrepositories.yaml Updated CRD to include syncWindows field with similar structure as install manifest.
internal/utils/syncwindow/syncwindow.go Introduced sync window blocking logic based on active deny/allow windows.
internal/utils/syncwindow/syncwindow_test.go Added comprehensive tests for various sync window scenarios.
internal/controllers/terraformlayer/states.go Integrated sync window checks into the plan and apply action flows.
internal/controllers/terraformlayer/controller_test.go Extended tests to cover sync window scenarios in reconciliation.
internal/burrito/config/* Added default sync window configuration support and tests.
docs/user-guide/sync-windows.md Created user guide documentation explaining sync windows usage.
deploy/charts/burrito/values.yaml Added defaultSyncWindows configuration placeholder for Helm deployments.
api/v1alpha1/* Updated CRD definitions and deepcopy methods to support syncWindows.
Files not reviewed (1)
  • go.mod: Language not supported
Comments suppressed due to low confidence (1)

mkdocs.yml:43

  • There appears to be a typo in the filename 'additionnal-trigger-path.md'. Consider renaming it to 'additional-trigger-path.md' for consistency.
    - user-guide/additionnal-trigger-path.md

@LucasMrqes LucasMrqes merged commit 92fe11b into main Apr 3, 2025
10 checks passed
@LucasMrqes LucasMrqes deleted the feat/sync-windows branch April 3, 2025 15:43
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in burrito Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants