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

FLA-510 Migrate to Standalone Workflow for Enhanced Customization and Improved Error Handling #61

Merged
merged 4 commits into from
Oct 19, 2024

Conversation

murillio4
Copy link
Contributor

Key Changes:

  1. Standalone Workflow Implementation:

    • Transitioned from the managed workflow to a standalone workflow to enable custom handling of dependent resources.
    • Initialise CRD status state to be PENDING before starting reconciliation and generate correlation id if necessary
  2. Custom Error Handling:

    • Added ErrorStatusHandler for custom error handling of failed dependent resources.
    • Updated determineNewStatus to properly handle and report dependentErrors for failed dependents.
  3. CRD Status Updates:

    • Ensured that CRD status is updated accurately based on the reconciliation outcomes.
    • Delayed setting FlaisApplicationState to FAILED until the final reconciliation attempt has been reached, ensuring retry logic is respected.
  4. Retry Logic for Dependent Resources:

    • Introduced @GradualRetry(maxAttempts = 3) on FlaisApplicationReconciler to limit retries and prevent infinite update loops when dependent resources fail to deploy.

Fixes:

  • FLA-502: Failing dependent resources are triggering infinite updates.
  • FLA-510: CRD status not updated correctly when handling errored dependents.

…hanced Customization

- Updated FlaisApplicationReconciler to standalone mode, removing managed workflow.
- Added all DependentResources and Conditions to Koin for improved dependency management.
- Refactored the reconciliation flow to initialize CRD status before processing DependentResources.
…ID handling and dependent errors

- Added test to check correlation ID is set if absent on FlaisApplication.
- Added test to verify existing correlation ID is not overwritten.
- Added test to handle and assert dependent errors during reconciliation.
- Added dependetErrors to FlaisApplicationStatus
…FLA-501

- Added `ErrorStatusHandler` for custom error handling during dependent resource reconciliation.
- Modified `determineNewStatus` to correctly update `dependentErrors` for errored dependents.
- Updated state so its not set to `FAILED` until the last reconciliation attempt.
…inite update loops - FLA-502

- Added `@GradualRetry(maxAttempts = 3)` to `FlaisApplicationReconciler` to limit retry attempts for failed dependent resources.
@murillio4 murillio4 merged commit 926042c into main Oct 19, 2024
5 checks passed
@murillio4 murillio4 deleted the feat/standalone-workflow branch October 19, 2024 22:18
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.

1 participant