Repository navigation
Uniquify requisite_in'd states checks. - #68409
gpernot-celeste wants to merge 1 commit into
Conversation
|
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here's some information that may help as you continue your Salt journey. There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. |
bdrx312
left a comment
There was a problem hiding this comment.
Thanks for the PR; please add tests.
9356b2d to
fa5de69
Compare
|
@bdrx312 Thanks for your review ! I added simplified code and unit tests. |
|
Thanks for the PR. Nice changes. |
Thanks :) It was buggy, but i now believe that the code is correct. Should I rebase/squash on 3006.x ? |
dwoz
left a comment
There was a problem hiding this comment.
- This needs a changelog.
- I'm super concerned that this could fix a bug and introduce others.
|
@dwoz changelog added. I tried my best with unit tests to avoid introducing bugs. Moreover, unit tests on |
|
Perhaps a functional or integration test, to provide a more thorough test. |
|
Please rebase and fix conflicts |
Introduce ``State._add_to_extend`` and route both call sites in
``State.requisite_in`` through it. The helper dedups
``{req_state_mod_name: req_id}`` entries so a target state's requisite
list no longer accumulates duplicate references when the same
``*_in`` is declared multiple times (issue saltstack#68408).
Tests cover ``_add_to_extend`` in isolation plus both call sites of
``requisite_in`` (dict-form and list-form) for ``require_in``,
``watch_in``, ``onfail_in`` and ``onchanges_in``, including a
negative control to make sure distinct sources are NOT collapsed.
Rebased onto current 3006.x; ``HashableOrderedDict([(...)])``
positional-init usage in the test cases was switched to a small
helper because the class no longer accepts an items iterable on
3006.x.
Co-authored-by: guillaume pernot <[email protected]>
|
We are not longer accepting bugfixes on the 3006.x branch. Please rebase this against the 3008.x branch. |
|
@gpernot-celeste 3006.x has entered security only. Please rebase these changes on 3008.x |
Fixes #68408
Introduce
_add_to_extendfor small factorization.The logic here is to prevent to append dependencies that are already in
extend[name][rstate][ind][rkey]: