Skip to content

Conversation

@dwoz
Copy link
Contributor

@dwoz dwoz commented Dec 14, 2025

When merging pillar data, None values were overwriting existing non-empty dictionaries. This fix adds a _filter_none_overwrites function that filters out None values during pillar merging to preserve existing data.

  • Added _filter_none_overwrites function to Pillar.render_pillar
  • Added test case to test_pillar.py to verify the fix

Fixes #33437

…llar data

When merging pillar data, if one pillar file is empty (e.g., due to
conditional rendering that produces no output), None values were
overwriting existing non-empty dictionaries.

This fix adds a _filter_none_overwrites function that recursively
removes None values that would overwrite existing non-empty dicts
during the pillar merge process.

- Added _filter_none_overwrites function to salt/pillar/__init__.py
- Applied filter before merging pillar state
- Added test case to test_pillar.py to verify the fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:coverage test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Merging pillars when one is empty gives empty result

1 participant