Skip to content

Remove redundant config refresh#1468

Merged
BurningAXE merged 2 commits into
mainfrom
feature/remove-redundant-config-refresh
Nov 21, 2025
Merged

Remove redundant config refresh#1468
BurningAXE merged 2 commits into
mainfrom
feature/remove-redundant-config-refresh

Conversation

@BurningAXE
Copy link
Copy Markdown
Contributor

@BurningAXE BurningAXE commented Nov 14, 2025

JIRA ticket
Will be released in: 2026.1.0

Notable changes

  • Doesn't explicitly refresh configuration inside upsync task - it's scheduled to refresh in a worker first thing in each sync cycle
  • Moves the DB migration scheduler out of ConfigManager and in the config worker - this way all post-config refresh tasks are in one place. Only tokenization is left inside ConfigManager as it was it's main purpose for existing
  • Moves local records reset before rescheduling workers and DB migration

Testing guidance

  • Sync and enjoy less needless work and more logical post-config refresh order

Additional work checklist

  • Effect on other features and security has been considered
  • Design document marked as "In development" (if applicable)
  • External (Gitbook) and internal (Confluence) Documentation is up to date (or ticket created)
  • Test cases in Testiny are up to date (or ticket created)
  • Other teams notified about the changes (if applicable)

Copy link
Copy Markdown

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 removes redundant configuration refreshes and reorganizes the RealmToRoomMigrationScheduler responsibility from ConfigManager to ProjectConfigDownSyncWorker.

Key Changes

  • Moved RealmToRoomMigrationScheduler invocation from ConfigManager.refreshProject() to ProjectConfigDownSyncWorker
  • Refactored EventUpSyncTask to use getProject() and getProjectConfiguration() instead of refreshProject() to avoid unnecessary config refreshes
  • Updated execution order in ProjectConfigDownSyncWorker: migration scheduler now runs before worker rescheduling

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
infra/config-sync/src/main/java/com/simprints/infra/config/sync/ConfigManager.kt Removed RealmToRoomMigrationScheduler dependency and call from refreshProject()
infra/config-sync/src/test/java/com/simprints/infra/config/sync/ConfigManagerTest.kt Updated test to reflect removal of migration scheduler from ConfigManager
infra/sync/src/main/java/com/simprints/infra/sync/config/worker/ProjectConfigDownSyncWorker.kt Added RealmToRoomMigrationScheduler dependency and invocation, reordered operations
infra/sync/src/test/java/com/simprints/infra/sync/config/worker/ProjectConfigDownSyncWorkerTest.kt Added migration scheduler mock and verification (contains order mismatch bug)
infra/event-sync/src/main/java/com/simprints/infra/eventsync/sync/up/tasks/EventUpSyncTask.kt Changed from refreshProject() to getProject()/getProjectConfiguration() to avoid redundant refresh

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…okenization in ConfigManager; Move local records reset before worker rescheduling
@BurningAXE BurningAXE force-pushed the feature/remove-redundant-config-refresh branch from 05a9a87 to 403fbd2 Compare November 14, 2025 17:45
@BurningAXE BurningAXE marked this pull request as ready for review November 14, 2025 17:45
@BurningAXE BurningAXE requested review from a team, TristramN, alex-vt, alexandr-simprints, luhmirin-s, meladRaouf and ybourgery and removed request for a team November 14, 2025 17:45
@sonarqubecloud
Copy link
Copy Markdown

@BurningAXE BurningAXE changed the title Feature/remove redundant config refresh Remove redundant config refresh Nov 19, 2025
@BurningAXE BurningAXE merged commit 5461f1e into main Nov 21, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants