Skip to content

Fix lookup precedence bug#4916

Merged
janniklasrose merged 6 commits intomainfrom
janniklasrose/lookup-precedence-bug
Apr 8, 2026
Merged

Fix lookup precedence bug#4916
janniklasrose merged 6 commits intomainfrom
janniklasrose/lookup-precedence-bug

Conversation

@janniklasrose
Copy link
Copy Markdown
Contributor

@janniklasrose janniklasrose commented Apr 8, 2026

Changes

Remove lookup if explicit override exists for target

Why

Fixes #4915

Documentation says the order is:
4. Within any variables mappings, among the targets mappings within your bundle configuration files.
5. Any default value for that variable's definition, among the top-level variables mappings within your bundle configuration files.

Tests

Added unit and acceptance tests

@janniklasrose janniklasrose marked this pull request as ready for review April 8, 2026 14:58
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

Suggested reviewers

Based on git history of the changed files, these people are best suited to review:

  • @denik -- recent work in bundle/config/, acceptance/bundle/variables/variable_overrides_in_target/

Confidence: high

Eligible reviewers

Based on OWNERS, these people or teams could also review:

@andrewnester, @anton-107, @pietern, @shreyas-goenka, @simonfaltum

Suggestions based on git history of 5 changed files (3 scored). See OWNERS for path-specific ownership rules.

Comment on lines +5 to +6
trace $CLI bundle validate -o json -t override-lookup-variable-with-value | jq .variables.w_lookup.value
trace $CLI bundle validate -o json -t override-lookup-variable-with-lookup | jq .variables.w_lookup.value
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

.variables.w_lookup.value because the value isn't being used in .resources - didn't want to change the whole bundle definition with something that supports lookup

@janniklasrose janniklasrose enabled auto-merge April 8, 2026 16:28
@janniklasrose janniklasrose added this pull request to the merge queue Apr 8, 2026
Merged via the queue into main with commit 7688bec Apr 8, 2026
19 checks passed
@janniklasrose janniklasrose deleted the janniklasrose/lookup-precedence-bug branch April 8, 2026 16: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.

Variable precedence for lookups not respected

3 participants