-
Notifications
You must be signed in to change notification settings - Fork 404
Open
Labels
kind/bugSomething isn't workingSomething isn't working
Description
Description
When using profile patches with a wildcard path (e.g. images.*.docker), the patch is applied only to items where the target key already exists, if at least one item explicitly defines this key in the base config.
This happens for both op: replace and op: add.
As a result, items that do not define the key are skipped, even though the wildcard path matches them logically.
DevSpace version
DevSpace version : 6.3.18
Reproducible example
version: v2beta1
name: test
profiles:
- name: use_docker_cli
patches:
- op: replace
path: images.*.docker
value:
useCli: true
# same behavior with:
# - op: add
images:
image1:
image: image1
docker: {}
image2:
image: image2Command
devspace print -p use_docker_cli --skip-infoActual behavior
images:
image1:
image: image1
docker:
useCli: true
image2:
image: image2🔴 docker.useCli is not added to image2.
Expected behavior
images:
image1:
image: image1
docker:
useCli: true
image2:
image: image2
docker:
useCli: trueThe wildcard patch should be applied to all images, regardless of whether docker was defined in the base config.
Additional observation
If docker is removed from all images in the base config:
images:
image1:
image: image1
image2:
image: image2Then the same patch works correctly and creates docker.useCli for both images.
Why this is problematic
- Wildcard patches behave inconsistently depending on base config shape
op: addandop: replacedo not create missing keys when mixed with existing ones- Makes it difficult to apply global defaults via profiles
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't workingSomething isn't working