Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] salt-ssh does not merge master top returns per saltenv #65480

Closed
lkubb opened this issue Oct 28, 2023 · 0 comments · Fixed by #65481
Closed

[BUG] salt-ssh does not merge master top returns per saltenv #65480

lkubb opened this issue Oct 28, 2023 · 0 comments · Fixed by #65481
Labels
Bug broken, incorrect, or confusing behavior needs-triage Salt-SSH

Comments

@lkubb
Copy link
Contributor

lkubb commented Oct 28, 2023

Description
When multiple master top modules are defined and return targeted states for the same environment, salt-ssh does not merge the returns, but only keeps the last one. This is a discrepancy vs. regular Salt.

Setup
Enable two master top modules which return states for the same saltenv, e.g. base in the master config.

Steps to Reproduce the behavior
Check the output of salt-ssh foobar state.show_top.

Expected behavior
Lists should be merged, as usual.

Screenshots

for fun in self.tops:
if fun not in self.opts.get("master_tops", {}):
continue
try:
ret.update(self.tops[fun](opts=self.opts, grains=grains))

for fun in self.tops:
if fun not in self.opts.get("master_tops", {}):
continue
try:
ret = salt.utils.dictupdate.merge(
ret, self.tops[fun](opts=opts, grains=grains), merge_lists=True
)

Versions Report
current master

Additional context
I just stumbled over this while writing a PR for #65479. Thought it was noteworthy enough.

Tangentially related: #59802

@lkubb lkubb added Bug broken, incorrect, or confusing behavior needs-triage labels Oct 28, 2023
@lkubb lkubb changed the title [BUG] salt-ssh does not merge environments from master tops [BUG] salt-ssh does not merge master top returns per saltenv Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior needs-triage Salt-SSH
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants