Skip to content

refactor(reconcile): simplify cache and sync flows#27

Open
veerendra2 wants to merge 8 commits into
mainfrom
feat/simplify-reconciliation
Open

refactor(reconcile): simplify cache and sync flows#27
veerendra2 wants to merge 8 commits into
mainfrom
feat/simplify-reconciliation

Conversation

@veerendra2
Copy link
Copy Markdown
Owner

This PR refactors composeflux's reconciliation code to improve simplicity, memory management, and runtime safety:

  1. Eliminate Stateful Struct Cache: Removes the cache and cacheMu fields from Reconciler and deletes cache.go entirely. Env/secrets are loaded statelessly on demand via loadEnvAndConfig and passed down to stack discovery.
  2. Defensive Label Verification: Adds explicit safety check inside isManagedStack to prevent any possible nil map access.
  3. Optimize & Clean Sync: Uses in-memory checks against discovered configurations to validate startup order directory presence.
  4. Deterministic Deployment Ordering: Extracts ordering logic to the pure, testable helper orderStacks that applies the configured StartupOrder followed by a deterministic alphabetical fallback.

@veerendra2 veerendra2 added the build Builds dev docker image label May 29, 2026
@veerendra2 veerendra2 marked this pull request as ready for review May 30, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Builds dev docker image

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant