direct: Fix processing of configs with dots in map keys#4977
Merged
Conversation
Add pipeline_config_dots.yml.tmpl that exercises: - Dots in pipeline configuration map keys (europris.swipe.*, europris.azure.*) - Cross-resource references in values (resources.schemas.my_schema.*) - Complex variable field access with dots (var.AZURE.subscription) Task: 001.md Co-authored-by: Isaac
Keys containing dots (e.g., "europris.swipe.egress_streaming_schema") were serialized without escaping, making them indistinguishable from nested paths when re-parsed. Now uses bracket notation ['key.with.dots'] for such keys. Also adds bracket notation parsing to NewPathFromString so the string representation roundtrips correctly. Task: 001.md Co-authored-by: Isaac
Task: 001.md Co-authored-by: Isaac
Dotted pipeline configuration keys are not supported by CLI v0.293.0, so exclude the pipeline_config_dots.yml.tmpl config from the continue_293 test variant. Task: 003.md Co-authored-by: Isaac
This reverts commit c77d25a8a2b51b656b63850fc682217f3ab33ea0.
This reverts commit ba72217472b15637881c3e453fc75a55470638b4.
Move the fix for dotted map keys (e.g. "europris.swipe.egress_streaming_schema") from libs/dyn/Path.String() to the specific boundary in bundle_plan.go where dyn.Path strings are consumed by structpath.ParsePath. The new dynPathToStructPath() helper converts dyn.Path to structpath.PathNode using NewBracketString, which already handles dotted keys correctly with ['key.with.dots'] notation. This avoids modifying the core dyn.Path API and keeps the fix localized to the direct engine's extractReferences function. Revert the previous changes to libs/dyn (bracket notation in Path.String() and NewPathFromString) since they are no longer needed. Add acceptance test confirming both terraform and direct engines handle dotted pipeline configuration keys correctly. Co-authored-by: Isaac
Co-authored-by: Isaac
Co-authored-by: Isaac
777458a to
abc77a0
Compare
Co-authored-by: Isaac
…hars Keys without dots or brackets use NewDotString for normal path segments; only fall back to NewBracketString when the key itself contains '.' or '['. Co-authored-by: Isaac
Delegate dot-vs-bracket logic to NewStringKey instead of reimplementing it inline, keeping the call site simple. Co-authored-by: Isaac
andrewnester
approved these changes
Apr 15, 2026
| } | ||
| // Store the original string that contains references, not individual references | ||
| refs[p.String()] = ref.Str | ||
| // Store the original string that contains references, not individual references. |
Contributor
There was a problem hiding this comment.
This comment is a bit confusing, what is the difference between "references" and "individual references"?
deco-sdk-tagging bot
added a commit
that referenced
this pull request
Apr 15, 2026
## Release v0.297.0 ### CLI * Auth commands now accept a profile name as a positional argument ([#4840](#4840)) * Add `auth logout` command for clearing cached OAuth tokens and optionally removing profiles ([#4613](#4613), [#4616](#4616), [#4647](#4647)) ### Bundles * Added support for lifecycle.started option for apps ([#4672](#4672)) * engine/direct: Fix permissions for resources.models ([#4941](#4941)) * Fix resource references not correctly resolved in apps config section ([#4964](#4964)) * Allow run_as for dashboards with embed_credentials set to false ([#4961](#4961)) * direct: Pass changed fields into update mask for apps instead of wildcard ([#4963](#4963)) * engine/direct: Fix deploy of configurations with dots in maps keys ([#4977](#4977))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
When calculating the plan, direct engine users dyn.Walk to figure out where remaining references are. It is used dyn.Path.String() method which lost information for configuration with dots in map keys.
Fixed the plan to convert dyn.Path to structpath.PathNode directly which preserves nodes.
Why
Fixes #4960
Tests
New dedicate test that shows that this type of config did not work on direct engine (even without migration).
New invariant test config with dots in maps keys to test the migration and other scenarios.