Skip to content

Restore variables in config-remote-sync#5053

Draft
ilyakuz-db wants to merge 11 commits intomainfrom
config-remote-sync-resolve-variables
Draft

Restore variables in config-remote-sync#5053
ilyakuz-db wants to merge 11 commits intomainfrom
config-remote-sync-resolve-variables

Conversation

@ilyakuz-db
Copy link
Copy Markdown
Contributor

@ilyakuz-db ilyakuz-db commented Apr 21, 2026

Changes

When config-remote-sync patches YAML files with remote changes, it now restores variable references rather than always hardcoding values. This prevents configs from losing ${var.X} references after UI edits.

Note: There is a lot of ambiguity in how to restore the variables, because it's not always clear what the user's intent is, and this is hard to describe with a simple heuristic. In this PR, we make a best-effort deterministic attempt as a first step.

Supported use cases:

  1. If any field that contains a variable was changed, and new values match this variable, we restore it. Safe guard
  2. string template /bundle/${bundle.target}/{var.foo} case is also supported
  3. new list item of the same type is added (job param / job task) -> if variables are used in existing items , and the field value matches the variable, we use this variable

Why

Improve the config-remote-sync experience for customers. We have received feedback that customers usually have their job parameteres defined as variables, and this PR aims to address some gaps there

Tests

@ilyakuz-db ilyakuz-db changed the title Config remote sync resolve variables Restore variables in config-remote-sync Apr 24, 2026
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.

1 participant