-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add --diff support for ldap_attrs module #8073
Add --diff support for ldap_attrs module #8073
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! Can you please add a changelog fragment? Thanks.
b9cd1cd
to
2bdae53
Compare
Have added the changelog fragment and added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code-wise it looks good, now just a couple of minor adjustments for the documentation.
14e62f5
to
a7f8002
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nit for the changelog fragment :)
Co-authored-by: Felix Fontein <felix@fontein.de>
Backport to stable-8: 💚 backport PR created✅ Backport PR branch: Backported as #8099 🤖 @patchback |
* Add --diff support for ldap_attrs module * Change diff_mode support in docstring to full * Use _attrs suffix for old and new * Add version added to ldap_attrs diff mode * Add fragment for ldap_attrs diff mode * Update fragment to include link to PR and lowercase start * Update changelogs/fragments/8073-ldap-attrs-diff.yml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 09cded0)
@StopMotionCuber thanks for your contribution! |
…trs module (#8099) Add --diff support for ldap_attrs module (#8073) * Add --diff support for ldap_attrs module * Change diff_mode support in docstring to full * Use _attrs suffix for old and new * Add version added to ldap_attrs diff mode * Add fragment for ldap_attrs diff mode * Update fragment to include link to PR and lowercase start * Update changelogs/fragments/8073-ldap-attrs-diff.yml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 09cded0) Co-authored-by: StopMotionCuber <ruben.simons@web.de>
* Add --diff support for ldap_attrs module * Change diff_mode support in docstring to full * Use _attrs suffix for old and new * Add version added to ldap_attrs diff mode * Add fragment for ldap_attrs diff mode * Update fragment to include link to PR and lowercase start * Update changelogs/fragments/8073-ldap-attrs-diff.yml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
SUMMARY
This adds support for the
--diff
mode for theldap_attrs
module. For the otherldap
modules this does not really make sense, asldap_search
is read-only and forldap_entry
there is only a change if the entry is not there at all (so the state is quite clear).We would like to use this kind of feature for internal use of the module.
ISSUE TYPE
COMPONENT NAME
ldap_attrs
ADDITIONAL INFORMATION
Right now, the module does not search for all available attributes at the same time. The
--diff
mode therefore has difficulties if we are only adding/deleting single values of a multi value attribute to detect what was there before and what would be the final state.With
--exact
, we're replacing everything, therefore this issue is not present there.I'm not sure about the policy on this repo, whether a potentially misleading diff is worse than none. Could also change that to not use "before" and "after", but going for "prepared" and a message like "
<key>: Added value(s) [<value1>, <value2>]" for the
presentor
absentstate. We are only using the
exact` state, so partial diff support only for that state would be fine to us.Furthermore, attributes are not shown in the
--diff
if they are on the server, but not used within the module (probably not an issue).Yeah well, as you can see from the longish message here I also want to get the discussion going. I'll add the fragment as soon as the discussions here are cleared up and the path for the PR is more clear.