Skip to content

Conversation

@jirkasemmler
Copy link
Contributor

Changes:

  • running manage:switch-storage-backend serialized with active waiting

Additional notes

⚠️ Don't forget to release new version after merge

Copy link

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 implements serialized batch processing for storage backend migration by adding active waiting functionality. Instead of firing off migration commands and moving on, the system now waits for each project to complete its migration before proceeding to the next one.

Key changes:

  • Added a new waitForProjectToMigrate method that polls project status every 2 seconds with a 5-minute timeout
  • Modified the execute method to capture command execution results and wait for completion before processing the next project
  • Added explicit type casting for parameters passed to the migration command

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

@keboola keboola deleted a comment from Copilot AI Dec 17, 2025
@keboola keboola deleted a comment from Copilot AI Dec 17, 2025
@keboola keboola deleted a comment from Copilot AI Dec 17, 2025
@keboola keboola deleted a comment from Copilot AI Dec 17, 2025
@keboola keboola deleted a comment from Copilot AI Dec 17, 2025
@jirkasemmler
Copy link
Contributor Author

jirkasemmler commented Dec 17, 2025

takhle jsem to pustil pri posledni migraci FL

WARN[0000] Found orphan containers ([cli-app-run-835c1519e2a7]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up. 

Deprecated: Return type of Symfony\Component\Console\Helper\HelperSet::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /code/vendor/symfony/console/Helper/HelperSet.php on line 104
Will set "19" projects to use storage backend "115"
FORCE MODE
Setting project 3856 to use storage ID 115
INFO: Storage backend switch for project "3856" in progress using command "command-01kcp8qvcpp4d7rh792jjex25p".
 - Project "3856" migrated successfully to backend "115".
SUSCCESS: Storage backend switch for project "3856" in progress using command "command-01kcp8qvcpp4d7rh792jjex25p".
Setting project 2496 to use storage ID 115
INFO: Storage backend switch for project "2496" in progress using command "command-01kcp8r0fb4h5v5bh5399dh97e".
 - Project "2496" did not migrate to backend "115" yet...waiting
 - Project "2496" migrated successfully to backend "115".
SUSCCESS: Storage backend switch for project "2496" in progress using command "command-01kcp8r0fb4h5v5bh5399dh97e".
Setting project 3563 to use storage ID 115
INFO: Storage backend switch for project "3563" in progress using command "command-01kcp8r7n6t2sqqjwapgrqeyq9".
 - Project "3563" migrated successfully to backend "115".
SUSCCESS: Storage backend switch for project "3563" in progress using command "command-01kcp8r7n6t2sqqjwapgrqeyq9".
Setting project 3669 to use storage ID 115
INFO: Storage backend switch for project "3669" in progress using command "command-01kcp8rcrev0f2f4aqsq5czmgq".
 - Project "3669" did not migrate to backend "115" yet...waiting
 - Project "3669" migrated successfully to backend "115".
SUSCCESS: Storage backend switch for project "3669" in progress using command "command-01kcp8rcrev0f2f4aqsq5czmgq".
Setting project 2514 to use storage ID 115
INFO: Storage backend switch for project "2514" in progress using command "command-01kcp8rkxhmyw33jvdjvq694ky".
 - Project "2514" migrated successfully to backend "115".
SUSCCESS: Storage backend switch for project "2514" in progress using command "command-01kcp8rkxhmyw33jvdjvq694ky".
Setting project 3738 to use storage ID 115
INFO: Storage backend switch for project "3738" in progress using command "command-01kcp8rs07cg1g8wkhtcfyht7f".
 - Project "3738" did not migrate to backend "115" yet...waiting
 - Project "3738" migrated successfully to backend "115".
SUSCCESS: Storage backend switch for project "3738" in progress using command "command-01kcp8rs07cg1g8wkhtcfyht7f".
Setting project 2513 to use storage ID 115
INFO: Storage backend switch for project "2513" in progress using command "command-01kcp8s063rtpyt05vfa6emnq9".
 - Project "2513" migrated successfully to backend "115".
SUSCCESS: Storage backend switch for project "2513" in progress using command "command-01kcp8s063rtpyt05vfa6emnq9".
Setting project 2550 to use storage ID 115
INFO: Storage backend switch for project "2550" in progress using command "command-01kcp8s59f8rqtdhw59nv3zpg1".
 - Project "2550" did not migrate to backend "115" yet...waiting
 - Project "2550" migrated successfully to backend "115".
SUSCCESS: Storage backend switch for project "2550" in progress using command "command-01kcp8s59f8rqtdhw59nv3zpg1".
Setting project 2549 to use storage ID 115
INFO: Storage backend switch for project "2549" in progress using command "command-01kcp8scfwge5zemzwkxjcver1".
 - Project "2549" did not migrate to backend "115" yet...waiting
 - Project "2549" migrated successfully to backend "115".
SUSCCESS: Storage backend switch for project "2549" in progress using command "command-01kcp8scfwge5zemzwkxjcver1".
Setting project 2552 to use storage ID 115
INFO: Storage backend switch for project "2552" in progress using command "command-01kcp8sknamzzsnb02wqzg1h8w".
 - Project "2552" migrated successfully to backend "115".
SUSCCESS: Storage backend switch for project "2552" in progress using command "command-01kcp8sknamzzsnb02wqzg1h8w".
Setting project 2554 to use storage ID 115
INFO: Storage backend switch for project "2554" in progress using command "command-01kcp8srsawccawg30prcwfdgj".
 - Project "2554" did not migrate to backend "115" yet...waiting
 - Project "2554" migrated successfully to backend "115".
SUSCCESS: Storage backend switch for project "2554" in progress using command "command-01kcp8srsawccawg30prcwfdgj".
Setting project 4025 to use storage ID 115
INFO: Storage backend switch for project "4025" in progress using command "command-01kcp8szy14crdqw65ryyzbeqh".
 - Project "4025" did not migrate to backend "115" yet...waiting
 - Project "4025" migrated successfully to backend "115".
SUSCCESS: Storage backend switch for project "4025" in progress using command "command-01kcp8szy14crdqw65ryyzbeqh".
Setting project 4253 to use storage ID 115
INFO: Storage backend switch for project "4253" in progress using command "command-01kcp8t73jz5d5pehqr99vxc2m".
 - Project "4253" migrated successfully to backend "115".
SUSCCESS: Storage backend switch for project "4253" in progress using command "command-01kcp8t73jz5d5pehqr99vxc2m".
Setting project 2624 to use storage ID 115
INFO: Storage backend switch for project "2624" in progress using command "command-01kcp8tc5krdyg7jwwzqw91vh1".
 - Project "2624" migrated successfully to backend "115".
SUSCCESS: Storage backend switch for project "2624" in progress using command "command-01kcp8tc5krdyg7jwwzqw91vh1".
Setting project 2622 to use storage ID 115
INFO: Storage backend switch for project "2622" in progress using command "command-01kcp8th8nm68p1c1zz021drba".
 - Project "2622" migrated successfully to backend "115".
SUSCCESS: Storage backend switch for project "2622" in progress using command "command-01kcp8th8nm68p1c1zz021drba".
Setting project 2626 to use storage ID 115
INFO: Storage backend switch for project "2626" in progress using command "command-01kcp8tpbh7kwbv61se1gwmak0".
 - Project "2626" did not migrate to backend "115" yet...waiting
 - Project "2626" migrated successfully to backend "115".
SUSCCESS: Storage backend switch for project "2626" in progress using command "command-01kcp8tpbh7kwbv61se1gwmak0".
Setting project 4026 to use storage ID 115
INFO: Storage backend switch for project "4026" in progress using command "command-01kcp8txh5s44msn68qntdg1mj".
 - Project "4026" migrated successfully to backend "115".
SUSCCESS: Storage backend switch for project "4026" in progress using command "command-01kcp8txh5s44msn68qntdg1mj".
Setting project 2625 to use storage ID 115
INFO: Storage backend switch for project "2625" in progress using command "command-01kcp8v2kpq145tnd5we4b4arm".
 - Project "2625" migrated successfully to backend "115".
SUSCCESS: Storage backend switch for project "2625" in progress using command "command-01kcp8v2kpq145tnd5we4b4arm".
Setting project 3739 to use storage ID 115
INFO: Storage backend switch for project "3739" in progress using command "command-01kcp8v7pc7dfgfasf6g6xj0pb".
 - Project "3739" migrated successfully to backend "115".
SUSCCESS: Storage backend switch for project "3739" in progress using command "command-01kcp8v7pc7dfgfasf6g6xj0pb".
All done.

@jirkasemmler jirkasemmler force-pushed the jirka/batch-switch-backend branch from 5d1281f to 5b804d1 Compare December 19, 2025 13:09
@jirkasemmler jirkasemmler requested review from a team and zajca and removed request for a team December 19, 2025 13:10
Copy link
Member

@zajca zajca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool

@jirkasemmler jirkasemmler merged commit 4188647 into main Dec 19, 2025
1 check passed
@jirkasemmler jirkasemmler deleted the jirka/batch-switch-backend branch December 19, 2025 13:55
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.

2 participants