Create unique error message when state.find_name returns more than one match - #63673
Open
rhodesn wants to merge 3 commits into
Open
Create unique error message when state.find_name returns more than one match#63673rhodesn wants to merge 3 commits into
rhodesn wants to merge 3 commits into
Conversation
Contributor
|
@nrhodes91 This needs a changelog file, thanks. |
twangboy
requested changes
Apr 1, 2025
twangboy
left a comment
Contributor
There was a problem hiding this comment.
This needs a changelog and some tests
twangboy
requested changes
Jul 3, 2025
twangboy
left a comment
Contributor
There was a problem hiding this comment.
This looks great. Could we get a changelog and a test please?
…e match
It's possible for `state.find_name()` to return more than one match for a state ID, e.g. when a user
has their groups modified by multiple states (`remove_groups: false`). If a state then tried to
reference that user via their name:
```
testfile:
file.managed:
[...]
- require_in:
- user: nobody
```
Multiple states could match the requisite. The PR updates the error message returned when this
happens to explicitly state that there are multiple states for that ID, and hence it's not possible
to create the requisite.
dwoz
force-pushed
the
duplicate-requisite-id
branch
from
June 15, 2026 23:36
36794dc to
5a63fdc
Compare
twangboy
approved these changes
Jun 29, 2026
Contributor
|
If this is a bug, it should probably go against 3006.x |
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.
What does this PR do?
Updates the error message returned when users try to setup a requisite against an ID that appears multiple times within a highstate.
What issues does this PR fix or reference?
Fixes:
Previous Behavior
The previous error message was:
New Behavior
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
No
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.