-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Only migrate active and disable connection #9454
Conversation
@@ -234,13 +232,13 @@ public static void main(final String[] args) throws IOException, InterruptedExce | |||
configs.getDatabaseUser(), | |||
configs.getDatabasePassword(), | |||
configs.getDatabaseUrl()) | |||
.getInitialized(); | |||
.getInitialized(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably need to run gw format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -235,14 +236,15 @@ private static void migrateExistingConnection(final ConfigRepository configRepos | |||
throws JsonValidationException, ConfigNotFoundException, IOException { | |||
LOGGER.info("Start migration to the new scheduler..."); | |||
final Set<UUID> connectionIds = | |||
configRepository.listStandardSyncs().stream().map(standardSync -> standardSync.getConnectionId()).collect(Collectors.toSet()); | |||
configRepository.listStandardSyncs().stream() | |||
.filter(standardSync -> standardSync.getStatus() == Status.ACTIVE || standardSync.getStatus() == Status.INACTIVE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reasoning behind filtering down to only ACTIVE and INACTIVE?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACTIVE = enabled connections
INACTIVE = disabled connections
DEPRECATED = deleted connections
We need to start the enabled ones for an obvious reason. The disabled ones need to be started too so it can be re-enable later on. The workflow will await forever if it is disabled (like if it was a manual workflow).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that makes sense to me. Though we should probably get a confirmation from @jrhizor to be sure
…rate-active-wf-only
What
Filter out the deleted workflows.
Change a log to the right level.