Skip to content

feat: implement plugin config variable substitution in migrations

Dmitry Rodionov requested to merge dkr/config-substitution-in-migrations into master

Summary

  • feat: implement plugin config variable substitution in migrations

It is now possible to write in migration @_plugin_cfg.foo where foo is variable from plugin configuration. Note that configuration typically belongs to individual services, in catalog this field is called entity. For migration special values there is special entity called migration_context. So corresponding alter looks this way:

ALTER PLUGIN p 0.1.0 SET migration_context.foo = '"nondefault"'

(extra quotes are temporary, and should be dealt with separately)

Closes #659 (closed)

  • refactor: avoid blocking in migration file parsing

Previouslly we've blocked on scope termination before reading from channel, so blocking still occured.

With this patch there is new blocking wrapper function that executes provided closure on separate thread and yields until result is ready


Edited by Dmitry Rodionov

Merge request reports