Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store the annotated apps in memory (#116)
* Fix linting errors because of missing variables * Change the progressive sync to be a multi-region object * Sync first stage * Set second stage apps to progressing * Check the stages status while the second stage apps are progressing * Add a test for adding the annotation * Add a check to make sure the PS status is in progress after the first stage * Add a check to make sure the PS status is in progress after the second stage * Fix second stage cluster order * Add setAppHealthStatusProgressing and setAppStatusCompleted helper functions * Refactor second stage with helper functions * Add third stage * Fix failed stage test * WIP: update multi-stage test with syncedAt annotation * Eventual consistency for setting app status in tests * Update IsStageComplete to take into account MaxTargets * Add method to identify annotated apps * WIP: Progress on resolving reconciliation loop bugs * Use single namespace and different application names * Better variable names * Remove duplicate code * Remove ginkgo random stuff * Add more informative log messages * Fix GetAppsName comment * Fix IsStageInProgress by adding a condition on how many apps we still want to sync * Try increasing the timeout * Try increasing the timeout * Always log the progressive sync object * Restore --randomizeAllSpecs --randomizeSuites in ginkgo * More key values in the logs and fix typo * Remove ginkgo randomization * Restore create/delete a namespace after each test * Add namespace to the progressivesync log value * Add a condition to avoid moving to the next stage and exiting the reconciliation loop * Increment timeout to 60 seconds * Always requeue in case of error but with a delay * Increase the timeout to 120s * Add more verbose logging * Add annotations to log * Increase to 5 minutes timeout * Uncomment Remove Annotation * Annotate before syncing * Add more logging * Add a test to make sure we set the app annotation * Avoid deleting all the annotations if syncedAt key is missing * Comment out remove annotation and one test * Increase timeout * Re-add should fail if unable to sync application test * Re-comment out should fail if unable to sync application test * Delete ps object at the end of test * Semplify annotation logic * Add logging to scheduler * Add logic to protect againt more apps synced than maxTargets * Add scheduler unit test * Increase timeout for integration tests * Log when tests pass * Schedule progressing but out-of-sync apps as well * Remove delete annotation logic * Change GetSyncedAppsByStage to match only on sync status and not health status * Switch to GetAppsByAnnotation as more generic function * Fix IsStageFailed by passing a stage as well * Prefer GetSyncedAppsByStage over getting the app by status and then annotation * Prefer GetSyncedAppsByStage over getting the app by status and then annotation * Rename variables to have a more meaningful name * Explicity set Requeu to true and pass nil error * Re-add TestIsStageInProgress * Re-add TestStageComplete * Add nil case for TestStageFailed * Add Requeue: true along when setting RequeueAfter * Build a docker image on every PR * [skip ci] Minor tweaks in comments and remove the word rollout * Store the annotated apps in memory * Fix lint error * Add log for the syncedAtStage map * Restirct manager to a single namespace * Add test for synced and healthy apps * QUick fix tests * Fix tests * Fix the way we calculate the values for SyncedAppsPerStage * Bump kind action chart * Init syncedappsperstage map * Add an empty stage test with percentages * Fix merge conflict * Introduce state manager * Fix tests * Fix tests * Remove unnecessary test * Cleanup unneeded code Co-authored-by: Matteo Ruina <[email protected]> Co-authored-by: Diogo Campos <[email protected]> Co-authored-by: Nebojsa Prodana <[email protected]>
- Loading branch information